@sheerid/jslib 1.90.0 → 1.91.0
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.
- package/es5/Tmetrix.bundle.js +5 -5
- package/es5/messages_ar.bundle.js +5 -5
- package/es5/messages_bg.bundle.js +5 -5
- package/es5/messages_cs.bundle.js +5 -5
- package/es5/messages_da.bundle.js +5 -5
- package/es5/messages_de.bundle.js +5 -5
- package/es5/messages_el.bundle.js +5 -5
- package/es5/messages_en-GB.bundle.js +5 -5
- package/es5/messages_es-ES.bundle.js +5 -5
- package/es5/messages_es.bundle.js +5 -5
- package/es5/messages_fi.bundle.js +5 -5
- package/es5/messages_fr-CA.bundle.js +5 -5
- package/es5/messages_fr.bundle.js +5 -5
- package/es5/messages_ga.bundle.js +5 -5
- package/es5/messages_hr.bundle.js +5 -5
- package/es5/messages_hu.bundle.js +5 -5
- package/es5/messages_id.bundle.js +5 -5
- package/es5/messages_it.bundle.js +5 -5
- package/es5/messages_iw.bundle.js +5 -5
- package/es5/messages_ja.bundle.js +5 -5
- package/es5/messages_ko.bundle.js +5 -5
- package/es5/messages_lo.bundle.js +5 -5
- package/es5/messages_lt.bundle.js +5 -5
- package/es5/messages_ms.bundle.js +5 -5
- package/es5/messages_nl.bundle.js +5 -5
- package/es5/messages_no.bundle.js +5 -5
- package/es5/messages_pl.bundle.js +5 -5
- package/es5/messages_pt-BR.bundle.js +5 -5
- package/es5/messages_pt.bundle.js +5 -5
- package/es5/messages_ru.bundle.js +5 -5
- package/es5/messages_sk.bundle.js +5 -5
- package/es5/messages_sl.bundle.js +5 -5
- package/es5/messages_sr.bundle.js +5 -5
- package/es5/messages_sv.bundle.js +5 -5
- package/es5/messages_th.bundle.js +5 -5
- package/es5/messages_tr.bundle.js +5 -5
- package/es5/messages_zh-HK.bundle.js +5 -5
- package/es5/messages_zh.bundle.js +5 -5
- package/manifest.json +46 -46
- package/package.json +2 -1
- package/sheerid-requestOrg.css +4 -4
- package/sheerid-requestOrg.js +14 -14
- package/sheerid-requestOrg.js.map +1 -1
- package/sheerid-utils.js +9 -9
- package/sheerid-utils.js.map +1 -1
- package/sheerid.css +4 -4
- package/sheerid.js +18 -18
- package/sheerid.js.map +1 -1
- package/sheerides6.js +1598 -32
- package/sheerides6.js.map +1 -1
- package/src/components/AcceptableUploadsComponent/AcceptableUploadsComponent.d.ts +1 -0
- package/src/components/CustomCssWrapperComponent.d.ts +1 -0
- package/src/components/CustomTextWrapper.d.ts +1 -0
- package/src/components/FaqLink/FaqLinkComponent.d.ts +1 -0
- package/src/components/FeatureFlags/flags.d.ts +14 -0
- package/src/components/FeatureFlags/hooks.d.ts +3 -0
- package/src/components/FormFields/MarketConsentWrapper/MarketConsentWrapperComponent.d.ts +1 -0
- package/src/components/FormFields/OptIn/OptInComponent.d.ts +1 -0
- package/src/components/FormFields/PostalCode/PostalCodeComponent.d.ts +1 -0
- package/src/components/FormFooter/FormFooterComponent.d.ts +1 -0
- package/src/components/FormInputs/InputSelect/InputSelectButton/InputSelectButtonComponent.d.ts +1 -0
- package/src/components/FormInputs/InputSelect/InputSelectComponent.d.ts +1 -0
- package/src/components/FormInputs/InputSelect/InputSelectList/InputSelectListComponent.d.ts +1 -0
- package/src/components/FormInputs/OptInInput/OptInInputComponent.d.ts +1 -0
- package/src/components/FormInputs/Select/SelectButton/SelectButtonComponent.d.ts +1 -0
- package/src/components/FormInputs/Select/SelectComponent.d.ts +1 -0
- package/src/components/FormInputs/Select/SelectList/SelectListComponent.d.ts +1 -0
- package/src/components/FormInputs/Typeahead/TypeaheadComponent.d.ts +1 -0
- package/src/components/FormWrapper/FormWrapperComponent.d.ts +1 -0
- package/src/components/LoadStepComponent.d.ts +1 -0
- package/src/components/LoadingSpinner/LoadingSpinnerComponent.d.ts +1 -0
- package/src/components/LogoComponent/LogoComponent.d.ts +1 -0
- package/src/components/NewVerificationInnerComponent.d.ts +1 -0
- package/src/components/PoweredBy/PoweredByComponent.d.ts +1 -0
- package/src/components/RequestOrganization/NewRequestOrganizationComponent.d.ts +1 -0
- package/src/components/RequestOrganization/NewRequestOrganizationInnerComponent.d.ts +1 -0
- package/src/components/RequestOrganization/OrganizationResultComponent.d.ts +1 -0
- package/src/components/RequestOrganization/RequestOrganizationErrorComponent.d.ts +1 -0
- package/src/components/RequestOrganization/RequestOrganizationFormComponent.d.ts +1 -0
- package/src/components/RequestOrganization/RequestOrganizationFormFooterComponent.d.ts +1 -0
- package/src/components/RequestOrganization/RequestOrganizationLoadStepComponent.d.ts +1 -0
- package/src/components/RequestOrganization/RequestOrganizationSearchResultComponent.d.ts +1 -0
- package/src/components/RequestOrganization/RequestOrganizationSuccessComponent.d.ts +1 -0
- package/src/components/RequestOrganization/SearchFieldComponent.d.ts +1 -0
- package/src/components/RewardsRemaining/RewardsRemainingComponent.d.ts +1 -0
- package/src/components/ScreenReaderLabelComponent.d.ts +1 -0
- package/src/components/StepMilitaryPersonalInfo/StepCollectMilitaryStatusComponent.d.ts +1 -0
- package/src/components/StepPending/ReviewPendingComponent.d.ts +1 -0
- package/src/components/StepPending/SSOPendingComponent.d.ts +1 -0
- package/src/components/StepSSO/StepSSOComponent.d.ts +1 -0
- package/src/components/StepSocialSecurityNumber/SsnChoice.d.ts +1 -0
- package/src/components/StepSuccess/StepSuccessComponent.d.ts +1 -0
- package/src/components/TestModeFlag/TestModeFlagComponent.d.ts +1 -0
- package/src/components/TryAgainButtonComponent.d.ts +1 -0
- package/src/components/UploadInfoComponent/UploadInfoComponent.d.ts +1 -0
- package/src/constants.d.ts +10 -0
- package/src/lib/types/types.d.ts +1 -0
- package/src/lib/utils/customTagReplacer/index.d.ts +1 -0
- package/types-reference.zip +0 -0
package/sheerides6.js
CHANGED
|
@@ -13,6 +13,10 @@ function createCommonjsModule(fn, module) {
|
|
|
13
13
|
return module = { exports: {} }, fn(module, module.exports), module.exports;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
function getCjsExportFromNamespace (n) {
|
|
17
|
+
return n && n['default'] || n;
|
|
18
|
+
}
|
|
19
|
+
|
|
16
20
|
var clone_1 = createCommonjsModule(function (module) {
|
|
17
21
|
var clone = (function() {
|
|
18
22
|
|
|
@@ -1514,7 +1518,7 @@ const getSheerIdScriptBasePath = () => {
|
|
|
1514
1518
|
};
|
|
1515
1519
|
|
|
1516
1520
|
const country = "country";
|
|
1517
|
-
const name = "name";
|
|
1521
|
+
const name$1 = "name";
|
|
1518
1522
|
async function fetchProgramOrganizations(orgSearchUrl, searchTerm, countryCode, searchTags) {
|
|
1519
1523
|
if (!orgSearchUrl) {
|
|
1520
1524
|
return Promise.resolve([]);
|
|
@@ -1522,7 +1526,7 @@ async function fetchProgramOrganizations(orgSearchUrl, searchTerm, countryCode,
|
|
|
1522
1526
|
const searchUrl = new URL(orgSearchUrl);
|
|
1523
1527
|
const { origin, pathname, search } = searchUrl;
|
|
1524
1528
|
const searchParams = new URLSearchParams(search);
|
|
1525
|
-
searchParams.set(name, searchTerm);
|
|
1529
|
+
searchParams.set(name$1, searchTerm);
|
|
1526
1530
|
if (countryCode) {
|
|
1527
1531
|
searchParams.set(country, countryCode);
|
|
1528
1532
|
}
|
|
@@ -3577,7 +3581,7 @@ const getEmptyRequestOrganizationViewModel = () => {
|
|
|
3577
3581
|
return requestOrganizationEmptyClone;
|
|
3578
3582
|
};
|
|
3579
3583
|
|
|
3580
|
-
function n$5(n){for(var t=arguments.length,r=Array(t>1?t-1:0),e=1;e<t;e++)r[e-1]=arguments[e];if("production"!==process.env.NODE_ENV){var i=Y[n],o=i?"function"==typeof i?i.apply(null,r):i:"unknown error nr: "+n;throw Error("[Immer] "+o)}throw Error("[Immer] minified error nr: "+n+(r.length?" "+r.map((function(n){return "'"+n+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function t$4(n){return !!n&&!!n[Q]}function r$5(n){return !!n&&(function(n){if(!n||"object"!=typeof n)return !1;var t=Object.getPrototypeOf(n);if(null===t)return !0;var r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object||"function"==typeof r&&Function.toString.call(r)===Z}(n)||Array.isArray(n)||!!n[L]||!!n.constructor[L]||s(n)||v$4(n))}function i(n,t,r){void 0===r&&(r=!1),0===o(n)?(r?Object.keys:nn)(n).forEach((function(e){r&&"symbol"==typeof e||t(e,n[e],n);})):n.forEach((function(r,e){return t(e,r,n)}));}function o(n){var t=n[Q];return t?t.i>3?t.i-4:t.i:Array.isArray(n)?1:s(n)?2:v$4(n)?3:0}function u$1(n,t){return 2===o(n)?n.has(t):Object.prototype.hasOwnProperty.call(n,t)}function a(n,t){return 2===o(n)?n.get(t):n[t]}function f$4(n,t,r){var e=o(n);2===e?n.set(t,r):3===e?(n.delete(t),n.add(r)):n[t]=r;}function c$4(n,t){return n===t?0!==n||1/n==1/t:n!=n&&t!=t}function s(n){return X&&n instanceof Map}function v$4(n){return q$4&&n instanceof Set}function p$4(n){return n.o||n.t}function l$4(n){if(Array.isArray(n))return Array.prototype.slice.call(n);var t=tn(n);delete t[Q];for(var r=nn(t),e=0;e<r.length;e++){var i=r[e],o=t[i];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:n[i]});}return Object.create(Object.getPrototypeOf(n),t)}function d$4(n,e){return void 0===e&&(e=!1),y$4(n)||t$4(n)||!r$5(n)?n:(o(n)>1&&(n.set=n.add=n.clear=n.delete=h$4),Object.freeze(n),e&&i(n,(function(n,t){return d$4(t,!0)}),!0),n)}function h$4(){n$5(2);}function y$4(n){return null==n||"object"!=typeof n||Object.isFrozen(n)}function b$4(t){var r=rn[t];return r||n$5(18,t),r}function m$4(n,t){rn[n]||(rn[n]=t);}function _(){return "production"===process.env.NODE_ENV||U||n$5(0),U}function j(n,t){t&&(b$4("Patches"),n.u=[],n.s=[],n.v=t);}function O(n){g$4(n),n.p.forEach(S),n.p=null;}function g$4(n){n===U&&(U=n.l);}function w$4(n){return U={p:[],l:U,h:n,m:!0,_:0}}function S(n){var t=n[Q];0===t.i||1===t.i?t.j():t.O=!0;}function P(t,e){e._=e.p.length;var i=e.p[0],o=void 0!==t&&t!==i;return e.h.g||b$4("ES5").S(e,t,o),o?(i[Q].P&&(O(e),n$5(4)),r$5(t)&&(t=M(e,t),e.l||x$4(e,t)),e.u&&b$4("Patches").M(i[Q],t,e.u,e.s)):t=M(e,i,[]),O(e),e.u&&e.v(e.u,e.s),t!==H$1?t:void 0}function M(n,t,r){if(y$4(t))return t;var e=t[Q];if(!e)return i(t,(function(i,o){return A$4(n,e,t,i,o,r)}),!0),t;if(e.A!==n)return t;if(!e.P)return x$4(n,e.t,!0),e.t;if(!e.I){e.I=!0,e.A._--;var o=4===e.i||5===e.i?e.o=l$4(e.k):e.o;i(3===e.i?new Set(o):o,(function(t,i){return A$4(n,e,o,t,i,r)})),x$4(n,o,!1),r&&n.u&&b$4("Patches").R(e,r,n.u,n.s);}return e.o}function A$4(e,i,o,a,c,s){if("production"!==process.env.NODE_ENV&&c===o&&n$5(5),t$4(c)){var v=M(e,c,s&&i&&3!==i.i&&!u$1(i.D,a)?s.concat(a):void 0);if(f$4(o,a,v),!t$4(v))return;e.m=!1;}if(r$5(c)&&!y$4(c)){if(!e.h.F&&e._<1)return;M(e,c),i&&i.A.l||x$4(e,c);}}function x$4(n,t,r){void 0===r&&(r=!1),n.h.F&&n.m&&d$4(t,r);}function z$4(n,t){var r=n[Q];return (r?p$4(r):n)[t]}function I$1(n,t){if(t in n)for(var r=Object.getPrototypeOf(n);r;){var e=Object.getOwnPropertyDescriptor(r,t);if(e)return e;r=Object.getPrototypeOf(r);}}function k$4(n){n.P||(n.P=!0,n.l&&k$4(n.l));}function E$1(n){n.o||(n.o=l$4(n.t));}function R(n,t,r){var e=s(t)?b$4("MapSet").N(t,r):v$4(t)?b$4("MapSet").T(t,r):n.g?function(n,t){var r=Array.isArray(n),e={i:r?1:0,A:t?t.A:_(),P:!1,I:!1,D:{},l:t,t:n,k:null,o:null,j:null,C:!1},i=e,o=en;r&&(i=[e],o=on);var u=Proxy.revocable(i,o),a=u.revoke,f=u.proxy;return e.k=f,e.j=a,f}(t,r):b$4("ES5").J(t,r);return (r?r.A:_()).p.push(e),e}function D$1(e){return t$4(e)||n$5(22,e),function n(t){if(!r$5(t))return t;var e,u=t[Q],c=o(t);if(u){if(!u.P&&(u.i<4||!b$4("ES5").K(u)))return u.t;u.I=!0,e=F$1(t,c),u.I=!1;}else e=F$1(t,c);return i(e,(function(t,r){u&&a(u.t,t)===r||f$4(e,t,n(r));})),3===c?new Set(e):e}(e)}function F$1(n,t){switch(t){case 2:return new Map(n);case 3:return Array.from(n)}return l$4(n)}function N(){function r(n,t){var r=s[n];return r?r.enumerable=t:s[n]=r={configurable:!0,enumerable:t,get:function(){var t=this[Q];return "production"!==process.env.NODE_ENV&&f(t),en.get(t,n)},set:function(t){var r=this[Q];"production"!==process.env.NODE_ENV&&f(r),en.set(r,n,t);}},r}function e(n){for(var t=n.length-1;t>=0;t--){var r=n[t][Q];if(!r.P)switch(r.i){case 5:a(r)&&k$4(r);break;case 4:o(r)&&k$4(r);}}}function o(n){for(var t=n.t,r=n.k,e=nn(r),i=e.length-1;i>=0;i--){var o=e[i];if(o!==Q){var a=t[o];if(void 0===a&&!u$1(t,o))return !0;var f=r[o],s=f&&f[Q];if(s?s.t!==a:!c$4(f,a))return !0}}var v=!!t[Q];return e.length!==nn(t).length+(v?0:1)}function a(n){var t=n.k;if(t.length!==n.t.length)return !0;var r=Object.getOwnPropertyDescriptor(t,t.length-1);return !(!r||r.get)}function f(t){t.O&&n$5(3,JSON.stringify(p$4(t)));}var s={};m$4("ES5",{J:function(n,t){var e=Array.isArray(n),i=function(n,t){if(n){for(var e=Array(t.length),i=0;i<t.length;i++)Object.defineProperty(e,""+i,r(i,!0));return e}var o=tn(t);delete o[Q];for(var u=nn(o),a=0;a<u.length;a++){var f=u[a];o[f]=r(f,n||!!o[f].enumerable);}return Object.create(Object.getPrototypeOf(t),o)}(e,n),o={i:e?5:4,A:t?t.A:_(),P:!1,I:!1,D:{},l:t,t:n,k:i,o:null,O:!1,C:!1};return Object.defineProperty(i,Q,{value:o,writable:!0}),i},S:function(n,r,o){o?t$4(r)&&r[Q].A===n&&e(n.p):(n.u&&function n(t){if(t&&"object"==typeof t){var r=t[Q];if(r){var e=r.t,o=r.k,f=r.D,c=r.i;if(4===c)i(o,(function(t){t!==Q&&(void 0!==e[t]||u$1(e,t)?f[t]||n(o[t]):(f[t]=!0,k$4(r)));})),i(e,(function(n){void 0!==o[n]||u$1(o,n)||(f[n]=!1,k$4(r));}));else if(5===c){if(a(r)&&(k$4(r),f.length=!0),o.length<e.length)for(var s=o.length;s<e.length;s++)f[s]=!1;else for(var v=e.length;v<o.length;v++)f[v]=!0;for(var p=Math.min(o.length,e.length),l=0;l<p;l++)void 0===f[l]&&n(o[l]);}}}}(n.p[0]),e(n.p));},K:function(n){return 4===n.i?o(n):a(n)}});}var G$1,U,W="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),X="undefined"!=typeof Map,q$4="undefined"!=typeof Set,B$1="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,H$1=W?Symbol.for("immer-nothing"):((G$1={})["immer-nothing"]=!0,G$1),L=W?Symbol.for("immer-draftable"):"__$immer_draftable",Q=W?Symbol.for("immer-state"):"__$immer_state",Y={0:"Illegal state",1:"Immer drafts cannot have computed properties",2:"This object has been frozen and should not be mutated",3:function(n){return "Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+n},4:"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.",5:"Immer forbids circular references",6:"The first or second argument to `produce` must be a function",7:"The third argument to `produce` must be a function or undefined",8:"First argument to `createDraft` must be a plain object, an array, or an immerable object",9:"First argument to `finishDraft` must be a draft returned by `createDraft`",10:"The given draft is already finalized",11:"Object.defineProperty() cannot be used on an Immer draft",12:"Object.setPrototypeOf() cannot be used on an Immer draft",13:"Immer only supports deleting array indices",14:"Immer only supports setting array indices and the 'length' property",15:function(n){return "Cannot apply patch, path doesn't resolve: "+n},16:'Sets cannot have "replace" patches.',17:function(n){return "Unsupported patch operation: "+n},18:function(n){return "The plugin for '"+n+"' has not been loaded into Immer. To enable the plugin, import and call `enable"+n+"()` when initializing your application."},20:"Cannot use proxies if Proxy, Proxy.revocable or Reflect are not available",21:function(n){return "produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '"+n+"'"},22:function(n){return "'current' expects a draft, got: "+n},23:function(n){return "'original' expects a draft, got: "+n},24:"Patching reserved attributes like __proto__, prototype and constructor is not allowed"},Z=""+Object.prototype.constructor,nn="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(n){return Object.getOwnPropertyNames(n).concat(Object.getOwnPropertySymbols(n))}:Object.getOwnPropertyNames,tn=Object.getOwnPropertyDescriptors||function(n){var t={};return nn(n).forEach((function(r){t[r]=Object.getOwnPropertyDescriptor(n,r);})),t},rn={},en={get:function(n,t){if(t===Q)return n;var e=p$4(n);if(!u$1(e,t))return function(n,t,r){var e,i=I$1(t,r);return i?"value"in i?i.value:null===(e=i.get)||void 0===e?void 0:e.call(n.k):void 0}(n,e,t);var i=e[t];return n.I||!r$5(i)?i:i===z$4(n.t,t)?(E$1(n),n.o[t]=R(n.A.h,i,n)):i},has:function(n,t){return t in p$4(n)},ownKeys:function(n){return Reflect.ownKeys(p$4(n))},set:function(n,t,r){var e=I$1(p$4(n),t);if(null==e?void 0:e.set)return e.set.call(n.k,r),!0;if(!n.P){var i=z$4(p$4(n),t),o=null==i?void 0:i[Q];if(o&&o.t===r)return n.o[t]=r,n.D[t]=!1,!0;if(c$4(r,i)&&(void 0!==r||u$1(n.t,t)))return !0;E$1(n),k$4(n);}return n.o[t]===r&&"number"!=typeof r&&(void 0!==r||t in n.o)||(n.o[t]=r,n.D[t]=!0,!0)},deleteProperty:function(n,t){return void 0!==z$4(n.t,t)||t in n.t?(n.D[t]=!1,E$1(n),k$4(n)):delete n.D[t],n.o&&delete n.o[t],!0},getOwnPropertyDescriptor:function(n,t){var r=p$4(n),e=Reflect.getOwnPropertyDescriptor(r,t);return e?{writable:!0,configurable:1!==n.i||"length"!==t,enumerable:e.enumerable,value:r[t]}:e},defineProperty:function(){n$5(11);},getPrototypeOf:function(n){return Object.getPrototypeOf(n.t)},setPrototypeOf:function(){n$5(12);}},on={};i(en,(function(n,t){on[n]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)};})),on.deleteProperty=function(t,r){return "production"!==process.env.NODE_ENV&&isNaN(parseInt(r))&&n$5(13),en.deleteProperty.call(this,t[0],r)},on.set=function(t,r,e){return "production"!==process.env.NODE_ENV&&"length"!==r&&isNaN(parseInt(r))&&n$5(14),en.set.call(this,t[0],r,e,t[0])};var un=function(){function e(t){var e=this;this.g=B$1,this.F=!0,this.produce=function(t,i,o){if("function"==typeof t&&"function"!=typeof i){var u=i;i=t;var a=e;return function(n){var t=this;void 0===n&&(n=u);for(var r=arguments.length,e=Array(r>1?r-1:0),o=1;o<r;o++)e[o-1]=arguments[o];return a.produce(n,(function(n){var r;return (r=i).call.apply(r,[t,n].concat(e))}))}}var f;if("function"!=typeof i&&n$5(6),void 0!==o&&"function"!=typeof o&&n$5(7),r$5(t)){var c=w$4(e),s=R(e,t,void 0),v=!0;try{f=i(s),v=!1;}finally{v?O(c):g$4(c);}return "undefined"!=typeof Promise&&f instanceof Promise?f.then((function(n){return j(c,o),P(n,c)}),(function(n){throw O(c),n})):(j(c,o),P(f,c))}if(!t||"object"!=typeof t){if((f=i(t))===H$1)return;return void 0===f&&(f=t),e.F&&d$4(f,!0),f}n$5(21,t);},this.produceWithPatches=function(n,t){return "function"==typeof n?function(t){for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return e.produceWithPatches(t,(function(t){return n.apply(void 0,[t].concat(i))}))}:[e.produce(n,t,(function(n,t){r=n,i=t;})),r,i];var r,i;},"boolean"==typeof(null==t?void 0:t.useProxies)&&this.setUseProxies(t.useProxies),"boolean"==typeof(null==t?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze);}var i=e.prototype;return i.createDraft=function(e){r$5(e)||n$5(8),t$4(e)&&(e=D$1(e));var i=w$4(this),o=R(this,e,void 0);return o[Q].C=!0,g$4(i),o},i.finishDraft=function(t,r){var e=t&&t[Q];"production"!==process.env.NODE_ENV&&(e&&e.C||n$5(9),e.I&&n$5(10));var i=e.A;return j(i,r),P(void 0,i)},i.setAutoFreeze=function(n){this.F=n;},i.setUseProxies=function(t){t&&!B$1&&n$5(20),this.g=t;},i.applyPatches=function(n,r){var e;for(e=r.length-1;e>=0;e--){var i=r[e];if(0===i.path.length&&"replace"===i.op){n=i.value;break}}var o=b$4("Patches").$;return t$4(n)?o(n,r):this.produce(n,(function(n){return o(n,r.slice(e+1))}))},e}(),an=new un,fn=an.produce;an.produceWithPatches.bind(an);an.setAutoFreeze.bind(an);an.setUseProxies.bind(an);an.applyPatches.bind(an);an.createDraft.bind(an);an.finishDraft.bind(an);
|
|
3584
|
+
function n$6(n){for(var t=arguments.length,r=Array(t>1?t-1:0),e=1;e<t;e++)r[e-1]=arguments[e];if("production"!==process.env.NODE_ENV){var i=Y$1[n],o=i?"function"==typeof i?i.apply(null,r):i:"unknown error nr: "+n;throw Error("[Immer] "+o)}throw Error("[Immer] minified error nr: "+n+(r.length?" "+r.map((function(n){return "'"+n+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function t$5(n){return !!n&&!!n[Q$1]}function r$6(n){return !!n&&(function(n){if(!n||"object"!=typeof n)return !1;var t=Object.getPrototypeOf(n);if(null===t)return !0;var r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object||"function"==typeof r&&Function.toString.call(r)===Z$1}(n)||Array.isArray(n)||!!n[L$1]||!!n.constructor[L$1]||s$1(n)||v$5(n))}function i$1(n,t,r){void 0===r&&(r=!1),0===o$1(n)?(r?Object.keys:nn)(n).forEach((function(e){r&&"symbol"==typeof e||t(e,n[e],n);})):n.forEach((function(r,e){return t(e,r,n)}));}function o$1(n){var t=n[Q$1];return t?t.i>3?t.i-4:t.i:Array.isArray(n)?1:s$1(n)?2:v$5(n)?3:0}function u$2(n,t){return 2===o$1(n)?n.has(t):Object.prototype.hasOwnProperty.call(n,t)}function a$1(n,t){return 2===o$1(n)?n.get(t):n[t]}function f$5(n,t,r){var e=o$1(n);2===e?n.set(t,r):3===e?(n.delete(t),n.add(r)):n[t]=r;}function c$5(n,t){return n===t?0!==n||1/n==1/t:n!=n&&t!=t}function s$1(n){return X$1&&n instanceof Map}function v$5(n){return q$5&&n instanceof Set}function p$5(n){return n.o||n.t}function l$5(n){if(Array.isArray(n))return Array.prototype.slice.call(n);var t=tn(n);delete t[Q$1];for(var r=nn(t),e=0;e<r.length;e++){var i=r[e],o=t[i];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:n[i]});}return Object.create(Object.getPrototypeOf(n),t)}function d$5(n,e){return void 0===e&&(e=!1),y$5(n)||t$5(n)||!r$6(n)?n:(o$1(n)>1&&(n.set=n.add=n.clear=n.delete=h$5),Object.freeze(n),e&&i$1(n,(function(n,t){return d$5(t,!0)}),!0),n)}function h$5(){n$6(2);}function y$5(n){return null==n||"object"!=typeof n||Object.isFrozen(n)}function b$5(t){var r=rn[t];return r||n$6(18,t),r}function m$5(n,t){rn[n]||(rn[n]=t);}function _$1(){return "production"===process.env.NODE_ENV||U$1||n$6(0),U$1}function j$1(n,t){t&&(b$5("Patches"),n.u=[],n.s=[],n.v=t);}function O$1(n){g$5(n),n.p.forEach(S$1),n.p=null;}function g$5(n){n===U$1&&(U$1=n.l);}function w$5(n){return U$1={p:[],l:U$1,h:n,m:!0,_:0}}function S$1(n){var t=n[Q$1];0===t.i||1===t.i?t.j():t.O=!0;}function P$1(t,e){e._=e.p.length;var i=e.p[0],o=void 0!==t&&t!==i;return e.h.g||b$5("ES5").S(e,t,o),o?(i[Q$1].P&&(O$1(e),n$6(4)),r$6(t)&&(t=M$1(e,t),e.l||x$5(e,t)),e.u&&b$5("Patches").M(i[Q$1],t,e.u,e.s)):t=M$1(e,i,[]),O$1(e),e.u&&e.v(e.u,e.s),t!==H$2?t:void 0}function M$1(n,t,r){if(y$5(t))return t;var e=t[Q$1];if(!e)return i$1(t,(function(i,o){return A$5(n,e,t,i,o,r)}),!0),t;if(e.A!==n)return t;if(!e.P)return x$5(n,e.t,!0),e.t;if(!e.I){e.I=!0,e.A._--;var o=4===e.i||5===e.i?e.o=l$5(e.k):e.o;i$1(3===e.i?new Set(o):o,(function(t,i){return A$5(n,e,o,t,i,r)})),x$5(n,o,!1),r&&n.u&&b$5("Patches").R(e,r,n.u,n.s);}return e.o}function A$5(e,i,o,a,c,s){if("production"!==process.env.NODE_ENV&&c===o&&n$6(5),t$5(c)){var v=M$1(e,c,s&&i&&3!==i.i&&!u$2(i.D,a)?s.concat(a):void 0);if(f$5(o,a,v),!t$5(v))return;e.m=!1;}if(r$6(c)&&!y$5(c)){if(!e.h.F&&e._<1)return;M$1(e,c),i&&i.A.l||x$5(e,c);}}function x$5(n,t,r){void 0===r&&(r=!1),n.h.F&&n.m&&d$5(t,r);}function z$5(n,t){var r=n[Q$1];return (r?p$5(r):n)[t]}function I$2(n,t){if(t in n)for(var r=Object.getPrototypeOf(n);r;){var e=Object.getOwnPropertyDescriptor(r,t);if(e)return e;r=Object.getPrototypeOf(r);}}function k$5(n){n.P||(n.P=!0,n.l&&k$5(n.l));}function E$2(n){n.o||(n.o=l$5(n.t));}function R$1(n,t,r){var e=s$1(t)?b$5("MapSet").N(t,r):v$5(t)?b$5("MapSet").T(t,r):n.g?function(n,t){var r=Array.isArray(n),e={i:r?1:0,A:t?t.A:_$1(),P:!1,I:!1,D:{},l:t,t:n,k:null,o:null,j:null,C:!1},i=e,o=en;r&&(i=[e],o=on);var u=Proxy.revocable(i,o),a=u.revoke,f=u.proxy;return e.k=f,e.j=a,f}(t,r):b$5("ES5").J(t,r);return (r?r.A:_$1()).p.push(e),e}function D$2(e){return t$5(e)||n$6(22,e),function n(t){if(!r$6(t))return t;var e,u=t[Q$1],c=o$1(t);if(u){if(!u.P&&(u.i<4||!b$5("ES5").K(u)))return u.t;u.I=!0,e=F$2(t,c),u.I=!1;}else e=F$2(t,c);return i$1(e,(function(t,r){u&&a$1(u.t,t)===r||f$5(e,t,n(r));})),3===c?new Set(e):e}(e)}function F$2(n,t){switch(t){case 2:return new Map(n);case 3:return Array.from(n)}return l$5(n)}function N$1(){function r(n,t){var r=s[n];return r?r.enumerable=t:s[n]=r={configurable:!0,enumerable:t,get:function(){var t=this[Q$1];return "production"!==process.env.NODE_ENV&&f(t),en.get(t,n)},set:function(t){var r=this[Q$1];"production"!==process.env.NODE_ENV&&f(r),en.set(r,n,t);}},r}function e(n){for(var t=n.length-1;t>=0;t--){var r=n[t][Q$1];if(!r.P)switch(r.i){case 5:a(r)&&k$5(r);break;case 4:o(r)&&k$5(r);}}}function o(n){for(var t=n.t,r=n.k,e=nn(r),i=e.length-1;i>=0;i--){var o=e[i];if(o!==Q$1){var a=t[o];if(void 0===a&&!u$2(t,o))return !0;var f=r[o],s=f&&f[Q$1];if(s?s.t!==a:!c$5(f,a))return !0}}var v=!!t[Q$1];return e.length!==nn(t).length+(v?0:1)}function a(n){var t=n.k;if(t.length!==n.t.length)return !0;var r=Object.getOwnPropertyDescriptor(t,t.length-1);return !(!r||r.get)}function f(t){t.O&&n$6(3,JSON.stringify(p$5(t)));}var s={};m$5("ES5",{J:function(n,t){var e=Array.isArray(n),i=function(n,t){if(n){for(var e=Array(t.length),i=0;i<t.length;i++)Object.defineProperty(e,""+i,r(i,!0));return e}var o=tn(t);delete o[Q$1];for(var u=nn(o),a=0;a<u.length;a++){var f=u[a];o[f]=r(f,n||!!o[f].enumerable);}return Object.create(Object.getPrototypeOf(t),o)}(e,n),o={i:e?5:4,A:t?t.A:_$1(),P:!1,I:!1,D:{},l:t,t:n,k:i,o:null,O:!1,C:!1};return Object.defineProperty(i,Q$1,{value:o,writable:!0}),i},S:function(n,r,o){o?t$5(r)&&r[Q$1].A===n&&e(n.p):(n.u&&function n(t){if(t&&"object"==typeof t){var r=t[Q$1];if(r){var e=r.t,o=r.k,f=r.D,c=r.i;if(4===c)i$1(o,(function(t){t!==Q$1&&(void 0!==e[t]||u$2(e,t)?f[t]||n(o[t]):(f[t]=!0,k$5(r)));})),i$1(e,(function(n){void 0!==o[n]||u$2(o,n)||(f[n]=!1,k$5(r));}));else if(5===c){if(a(r)&&(k$5(r),f.length=!0),o.length<e.length)for(var s=o.length;s<e.length;s++)f[s]=!1;else for(var v=e.length;v<o.length;v++)f[v]=!0;for(var p=Math.min(o.length,e.length),l=0;l<p;l++)void 0===f[l]&&n(o[l]);}}}}(n.p[0]),e(n.p));},K:function(n){return 4===n.i?o(n):a(n)}});}var G$2,U$1,W$1="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),X$1="undefined"!=typeof Map,q$5="undefined"!=typeof Set,B$2="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,H$2=W$1?Symbol.for("immer-nothing"):((G$2={})["immer-nothing"]=!0,G$2),L$1=W$1?Symbol.for("immer-draftable"):"__$immer_draftable",Q$1=W$1?Symbol.for("immer-state"):"__$immer_state",Y$1={0:"Illegal state",1:"Immer drafts cannot have computed properties",2:"This object has been frozen and should not be mutated",3:function(n){return "Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+n},4:"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.",5:"Immer forbids circular references",6:"The first or second argument to `produce` must be a function",7:"The third argument to `produce` must be a function or undefined",8:"First argument to `createDraft` must be a plain object, an array, or an immerable object",9:"First argument to `finishDraft` must be a draft returned by `createDraft`",10:"The given draft is already finalized",11:"Object.defineProperty() cannot be used on an Immer draft",12:"Object.setPrototypeOf() cannot be used on an Immer draft",13:"Immer only supports deleting array indices",14:"Immer only supports setting array indices and the 'length' property",15:function(n){return "Cannot apply patch, path doesn't resolve: "+n},16:'Sets cannot have "replace" patches.',17:function(n){return "Unsupported patch operation: "+n},18:function(n){return "The plugin for '"+n+"' has not been loaded into Immer. To enable the plugin, import and call `enable"+n+"()` when initializing your application."},20:"Cannot use proxies if Proxy, Proxy.revocable or Reflect are not available",21:function(n){return "produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '"+n+"'"},22:function(n){return "'current' expects a draft, got: "+n},23:function(n){return "'original' expects a draft, got: "+n},24:"Patching reserved attributes like __proto__, prototype and constructor is not allowed"},Z$1=""+Object.prototype.constructor,nn="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(n){return Object.getOwnPropertyNames(n).concat(Object.getOwnPropertySymbols(n))}:Object.getOwnPropertyNames,tn=Object.getOwnPropertyDescriptors||function(n){var t={};return nn(n).forEach((function(r){t[r]=Object.getOwnPropertyDescriptor(n,r);})),t},rn={},en={get:function(n,t){if(t===Q$1)return n;var e=p$5(n);if(!u$2(e,t))return function(n,t,r){var e,i=I$2(t,r);return i?"value"in i?i.value:null===(e=i.get)||void 0===e?void 0:e.call(n.k):void 0}(n,e,t);var i=e[t];return n.I||!r$6(i)?i:i===z$5(n.t,t)?(E$2(n),n.o[t]=R$1(n.A.h,i,n)):i},has:function(n,t){return t in p$5(n)},ownKeys:function(n){return Reflect.ownKeys(p$5(n))},set:function(n,t,r){var e=I$2(p$5(n),t);if(null==e?void 0:e.set)return e.set.call(n.k,r),!0;if(!n.P){var i=z$5(p$5(n),t),o=null==i?void 0:i[Q$1];if(o&&o.t===r)return n.o[t]=r,n.D[t]=!1,!0;if(c$5(r,i)&&(void 0!==r||u$2(n.t,t)))return !0;E$2(n),k$5(n);}return n.o[t]===r&&"number"!=typeof r&&(void 0!==r||t in n.o)||(n.o[t]=r,n.D[t]=!0,!0)},deleteProperty:function(n,t){return void 0!==z$5(n.t,t)||t in n.t?(n.D[t]=!1,E$2(n),k$5(n)):delete n.D[t],n.o&&delete n.o[t],!0},getOwnPropertyDescriptor:function(n,t){var r=p$5(n),e=Reflect.getOwnPropertyDescriptor(r,t);return e?{writable:!0,configurable:1!==n.i||"length"!==t,enumerable:e.enumerable,value:r[t]}:e},defineProperty:function(){n$6(11);},getPrototypeOf:function(n){return Object.getPrototypeOf(n.t)},setPrototypeOf:function(){n$6(12);}},on={};i$1(en,(function(n,t){on[n]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)};})),on.deleteProperty=function(t,r){return "production"!==process.env.NODE_ENV&&isNaN(parseInt(r))&&n$6(13),en.deleteProperty.call(this,t[0],r)},on.set=function(t,r,e){return "production"!==process.env.NODE_ENV&&"length"!==r&&isNaN(parseInt(r))&&n$6(14),en.set.call(this,t[0],r,e,t[0])};var un=function(){function e(t){var e=this;this.g=B$2,this.F=!0,this.produce=function(t,i,o){if("function"==typeof t&&"function"!=typeof i){var u=i;i=t;var a=e;return function(n){var t=this;void 0===n&&(n=u);for(var r=arguments.length,e=Array(r>1?r-1:0),o=1;o<r;o++)e[o-1]=arguments[o];return a.produce(n,(function(n){var r;return (r=i).call.apply(r,[t,n].concat(e))}))}}var f;if("function"!=typeof i&&n$6(6),void 0!==o&&"function"!=typeof o&&n$6(7),r$6(t)){var c=w$5(e),s=R$1(e,t,void 0),v=!0;try{f=i(s),v=!1;}finally{v?O$1(c):g$5(c);}return "undefined"!=typeof Promise&&f instanceof Promise?f.then((function(n){return j$1(c,o),P$1(n,c)}),(function(n){throw O$1(c),n})):(j$1(c,o),P$1(f,c))}if(!t||"object"!=typeof t){if((f=i(t))===H$2)return;return void 0===f&&(f=t),e.F&&d$5(f,!0),f}n$6(21,t);},this.produceWithPatches=function(n,t){return "function"==typeof n?function(t){for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return e.produceWithPatches(t,(function(t){return n.apply(void 0,[t].concat(i))}))}:[e.produce(n,t,(function(n,t){r=n,i=t;})),r,i];var r,i;},"boolean"==typeof(null==t?void 0:t.useProxies)&&this.setUseProxies(t.useProxies),"boolean"==typeof(null==t?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze);}var i=e.prototype;return i.createDraft=function(e){r$6(e)||n$6(8),t$5(e)&&(e=D$2(e));var i=w$5(this),o=R$1(this,e,void 0);return o[Q$1].C=!0,g$5(i),o},i.finishDraft=function(t,r){var e=t&&t[Q$1];"production"!==process.env.NODE_ENV&&(e&&e.C||n$6(9),e.I&&n$6(10));var i=e.A;return j$1(i,r),P$1(void 0,i)},i.setAutoFreeze=function(n){this.F=n;},i.setUseProxies=function(t){t&&!B$2&&n$6(20),this.g=t;},i.applyPatches=function(n,r){var e;for(e=r.length-1;e>=0;e--){var i=r[e];if(0===i.path.length&&"replace"===i.op){n=i.value;break}}var o=b$5("Patches").$;return t$5(n)?o(n,r):this.produce(n,(function(n){return o(n,r.slice(e+1))}))},e}(),an=new un,fn=an.produce;an.produceWithPatches.bind(an);an.setAutoFreeze.bind(an);an.setUseProxies.bind(an);an.applyPatches.bind(an);an.createDraft.bind(an);an.finishDraft.bind(an);
|
|
3581
3585
|
|
|
3582
3586
|
const requestOrganizationReducer = (state, action) => {
|
|
3583
3587
|
switch (action.type) {
|
|
@@ -4996,12 +5000,12 @@ function _inheritsLoose(subClass, superClass) {
|
|
|
4996
5000
|
* This source code is licensed under the MIT license found in the
|
|
4997
5001
|
* LICENSE file in the root directory of this source tree.
|
|
4998
5002
|
*/
|
|
4999
|
-
var b$
|
|
5000
|
-
Symbol.for("react.suspense_list"):60120,r$
|
|
5001
|
-
function z$
|
|
5002
|
-
var Profiler$3=g$
|
|
5003
|
-
var isMemo$3=function(a){return z$
|
|
5004
|
-
var isValidElementType$3=function(a){return "string"===typeof a||"function"===typeof a||a===e$
|
|
5003
|
+
var b$4="function"===typeof Symbol&&Symbol.for,c$4=b$4?Symbol.for("react.element"):60103,d$4=b$4?Symbol.for("react.portal"):60106,e$5=b$4?Symbol.for("react.fragment"):60107,f$4=b$4?Symbol.for("react.strict_mode"):60108,g$4=b$4?Symbol.for("react.profiler"):60114,h$4=b$4?Symbol.for("react.provider"):60109,k$4=b$4?Symbol.for("react.context"):60110,l$4=b$4?Symbol.for("react.async_mode"):60111,m$4=b$4?Symbol.for("react.concurrent_mode"):60111,n$5=b$4?Symbol.for("react.forward_ref"):60112,p$4=b$4?Symbol.for("react.suspense"):60113,q$4=b$4?
|
|
5004
|
+
Symbol.for("react.suspense_list"):60120,r$5=b$4?Symbol.for("react.memo"):60115,t$4=b$4?Symbol.for("react.lazy"):60116,v$4=b$4?Symbol.for("react.block"):60121,w$4=b$4?Symbol.for("react.fundamental"):60117,x$4=b$4?Symbol.for("react.responder"):60118,y$4=b$4?Symbol.for("react.scope"):60119;
|
|
5005
|
+
function z$4(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c$4:switch(a=a.type,a){case l$4:case m$4:case e$5:case g$4:case f$4:case p$4:return a;default:switch(a=a&&a.$$typeof,a){case k$4:case n$5:case t$4:case r$5:case h$4:return a;default:return u}}case d$4:return u}}}function A$4(a){return z$4(a)===m$4}var AsyncMode$2=l$4;var ConcurrentMode$2=m$4;var ContextConsumer$3=k$4;var ContextProvider$3=h$4;var Element$3=c$4;var ForwardRef$3=n$5;var Fragment$3=e$5;var Lazy$3=t$4;var Memo$3=r$5;var Portal$3=d$4;
|
|
5006
|
+
var Profiler$3=g$4;var StrictMode$3=f$4;var Suspense$3=p$4;var isAsyncMode$3=function(a){return A$4(a)||z$4(a)===l$4};var isConcurrentMode$3=A$4;var isContextConsumer$3=function(a){return z$4(a)===k$4};var isContextProvider$3=function(a){return z$4(a)===h$4};var isElement$3=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c$4};var isForwardRef$3=function(a){return z$4(a)===n$5};var isFragment$3=function(a){return z$4(a)===e$5};var isLazy$3=function(a){return z$4(a)===t$4};
|
|
5007
|
+
var isMemo$3=function(a){return z$4(a)===r$5};var isPortal$3=function(a){return z$4(a)===d$4};var isProfiler$3=function(a){return z$4(a)===g$4};var isStrictMode$3=function(a){return z$4(a)===f$4};var isSuspense$3=function(a){return z$4(a)===p$4};
|
|
5008
|
+
var isValidElementType$3=function(a){return "string"===typeof a||"function"===typeof a||a===e$5||a===m$4||a===g$4||a===f$4||a===p$4||a===q$4||"object"===typeof a&&null!==a&&(a.$$typeof===t$4||a.$$typeof===r$5||a.$$typeof===h$4||a.$$typeof===k$4||a.$$typeof===n$5||a.$$typeof===w$4||a.$$typeof===x$4||a.$$typeof===y$4||a.$$typeof===v$4)};var typeOf$3=z$4;
|
|
5005
5009
|
|
|
5006
5010
|
var reactIs_production_min$3 = {
|
|
5007
5011
|
AsyncMode: AsyncMode$2,
|
|
@@ -6108,12 +6112,12 @@ propTypes.shape;
|
|
|
6108
6112
|
* This source code is licensed under the MIT license found in the
|
|
6109
6113
|
* LICENSE file in the root directory of this source tree.
|
|
6110
6114
|
*/
|
|
6111
|
-
var b$
|
|
6112
|
-
if("function"===typeof Symbol&&Symbol.for){var x$
|
|
6113
|
-
function y$
|
|
6114
|
-
var Suspense$2=I;var isAsyncMode$2=function(){return !1};var isConcurrentMode$2=function(){return !1};var isContextConsumer$2=function(a){return y$
|
|
6115
|
-
var isPortal$2=function(a){return y$
|
|
6116
|
-
var typeOf$2=y$
|
|
6115
|
+
var b$3=60103,c$3=60106,d$3=60107,e$4=60108,f$3=60114,g$3=60109,h$3=60110,k$3=60112,l$3=60113,m$3=60120,n$4=60115,p$3=60116,q$3=60121,r$4=60122,u$1=60117,v$3=60129,w$3=60131;
|
|
6116
|
+
if("function"===typeof Symbol&&Symbol.for){var x$3=Symbol.for;b$3=x$3("react.element");c$3=x$3("react.portal");d$3=x$3("react.fragment");e$4=x$3("react.strict_mode");f$3=x$3("react.profiler");g$3=x$3("react.provider");h$3=x$3("react.context");k$3=x$3("react.forward_ref");l$3=x$3("react.suspense");m$3=x$3("react.suspense_list");n$4=x$3("react.memo");p$3=x$3("react.lazy");q$3=x$3("react.block");r$4=x$3("react.server.block");u$1=x$3("react.fundamental");v$3=x$3("react.debug_trace_mode");w$3=x$3("react.legacy_hidden");}
|
|
6117
|
+
function y$3(a){if("object"===typeof a&&null!==a){var t=a.$$typeof;switch(t){case b$3:switch(a=a.type,a){case d$3:case f$3:case e$4:case l$3:case m$3:return a;default:switch(a=a&&a.$$typeof,a){case h$3:case k$3:case p$3:case n$4:case g$3:return a;default:return t}}case c$3:return t}}}var z$3=g$3,A$3=b$3,B$1=k$3,C$1=d$3,D$1=p$3,E$1=n$4,F$1=c$3,G$1=f$3,H$1=e$4,I$1=l$3;var ContextConsumer$2=h$3;var ContextProvider$2=z$3;var Element$2=A$3;var ForwardRef$2=B$1;var Fragment$2=C$1;var Lazy$2=D$1;var Memo$2=E$1;var Portal$2=F$1;var Profiler$2=G$1;var StrictMode$2=H$1;
|
|
6118
|
+
var Suspense$2=I$1;var isAsyncMode$2=function(){return !1};var isConcurrentMode$2=function(){return !1};var isContextConsumer$2=function(a){return y$3(a)===h$3};var isContextProvider$2=function(a){return y$3(a)===g$3};var isElement$2=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===b$3};var isForwardRef$2=function(a){return y$3(a)===k$3};var isFragment$2=function(a){return y$3(a)===d$3};var isLazy$2=function(a){return y$3(a)===p$3};var isMemo$2=function(a){return y$3(a)===n$4};
|
|
6119
|
+
var isPortal$2=function(a){return y$3(a)===c$3};var isProfiler$2=function(a){return y$3(a)===f$3};var isStrictMode$2=function(a){return y$3(a)===e$4};var isSuspense$2=function(a){return y$3(a)===l$3};var isValidElementType$2=function(a){return "string"===typeof a||"function"===typeof a||a===d$3||a===f$3||a===v$3||a===e$4||a===l$3||a===m$3||a===w$3||"object"===typeof a&&null!==a&&(a.$$typeof===p$3||a.$$typeof===n$4||a.$$typeof===g$3||a.$$typeof===h$3||a.$$typeof===k$3||a.$$typeof===u$1||a.$$typeof===q$3||a[0]===r$4)?!0:!1};
|
|
6120
|
+
var typeOf$2=y$3;
|
|
6117
6121
|
|
|
6118
6122
|
var reactIs_production_min$2 = {
|
|
6119
6123
|
ContextConsumer: ContextConsumer$2,
|
|
@@ -6397,7 +6401,7 @@ reactIs$2.isValidElementType;
|
|
|
6397
6401
|
reactIs$2.isContextConsumer;
|
|
6398
6402
|
var reactIs_3 = reactIs$2.isForwardRef;
|
|
6399
6403
|
|
|
6400
|
-
function t$
|
|
6404
|
+
function t$3(t){return "object"==typeof t&&null!=t&&1===t.nodeType}function e$3(t,e){return (!e||"hidden"!==t)&&"visible"!==t&&"clip"!==t}function n$3(t,n){if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){var r=getComputedStyle(t,null);return e$3(r.overflowY,n)||e$3(r.overflowX,n)||function(t){var e=function(t){if(!t.ownerDocument||!t.ownerDocument.defaultView)return null;try{return t.ownerDocument.defaultView.frameElement}catch(t){return null}}(t);return !!e&&(e.clientHeight<t.scrollHeight||e.clientWidth<t.scrollWidth)}(t)}return !1}function r$3(t,e,n,r,i,o,l,d){return o<t&&l>e||o>t&&l<e?0:o<=t&&d<=n||l>=e&&d>=n?o-t-r:l>e&&d<n||o<t&&d>n?l-e+i:0}function computeScrollIntoView(e,i){var o=window,l=i.scrollMode,d=i.block,u=i.inline,h=i.boundary,a=i.skipOverflowHiddenElements,c="function"==typeof h?h:function(t){return t!==h};if(!t$3(e))throw new TypeError("Invalid target");for(var f=document.scrollingElement||document.documentElement,s=[],p=e;t$3(p)&&c(p);){if((p=p.parentElement)===f){s.push(p);break}null!=p&&p===document.body&&n$3(p)&&!n$3(document.documentElement)||null!=p&&n$3(p,a)&&s.push(p);}for(var m=o.visualViewport?o.visualViewport.width:innerWidth,g=o.visualViewport?o.visualViewport.height:innerHeight,w=window.scrollX||pageXOffset,v=window.scrollY||pageYOffset,W=e.getBoundingClientRect(),b=W.height,H=W.width,y=W.top,E=W.right,M=W.bottom,V=W.left,x="start"===d||"nearest"===d?y:"end"===d?M:y+b/2,I="center"===u?V+H/2:"end"===u?E:V,C=[],T=0;T<s.length;T++){var k=s[T],B=k.getBoundingClientRect(),D=B.height,O=B.width,R=B.top,X=B.right,Y=B.bottom,L=B.left;if("if-needed"===l&&y>=0&&V>=0&&M<=g&&E<=m&&y>=R&&M<=Y&&V>=L&&E<=X)return C;var S=getComputedStyle(k),j=parseInt(S.borderLeftWidth,10),q=parseInt(S.borderTopWidth,10),z=parseInt(S.borderRightWidth,10),A=parseInt(S.borderBottomWidth,10),F=0,G=0,J="offsetWidth"in k?k.offsetWidth-k.clientWidth-j-z:0,K="offsetHeight"in k?k.offsetHeight-k.clientHeight-q-A:0;if(f===k)F="start"===d?x:"end"===d?x-g:"nearest"===d?r$3(v,v+g,g,q,A,v+x,v+x+b,b):x-g/2,G="start"===u?I:"center"===u?I-m/2:"end"===u?I-m:r$3(w,w+m,m,j,z,w+I,w+I+H,H),F=Math.max(0,F+v),G=Math.max(0,G+w);else {F="start"===d?x-R-q:"end"===d?x-Y+A+K:"nearest"===d?r$3(R,Y,D,q,A+K,x,x+b,b):x-(R+D/2)+K/2,G="start"===u?I-L-j:"center"===u?I-(L+O/2)+J/2:"end"===u?I-X+z+J:r$3(L,X,O,j,z+J,I,I+H,H);var N=k.scrollLeft,P=k.scrollTop;x+=P-(F=Math.max(0,Math.min(P+F,k.scrollHeight-D+K))),I+=N-(G=Math.max(0,Math.min(N+G,k.scrollWidth-O+J)));}C.push({el:k,top:F,left:G});}return C}
|
|
6401
6405
|
|
|
6402
6406
|
var idCounter = 0;
|
|
6403
6407
|
/**
|
|
@@ -14564,12 +14568,12 @@ Provider.propTypes = {
|
|
|
14564
14568
|
* This source code is licensed under the MIT license found in the
|
|
14565
14569
|
* LICENSE file in the root directory of this source tree.
|
|
14566
14570
|
*/
|
|
14567
|
-
var b$
|
|
14568
|
-
Symbol.for("react.suspense_list"):60120,r$
|
|
14569
|
-
function z$
|
|
14570
|
-
var Profiler$1=g$
|
|
14571
|
-
var isMemo$1=function(a){return z$
|
|
14572
|
-
var isValidElementType$1=function(a){return "string"===typeof a||"function"===typeof a||a===e$
|
|
14571
|
+
var b$2="function"===typeof Symbol&&Symbol.for,c$2=b$2?Symbol.for("react.element"):60103,d$2=b$2?Symbol.for("react.portal"):60106,e$2=b$2?Symbol.for("react.fragment"):60107,f$2=b$2?Symbol.for("react.strict_mode"):60108,g$2=b$2?Symbol.for("react.profiler"):60114,h$2=b$2?Symbol.for("react.provider"):60109,k$2=b$2?Symbol.for("react.context"):60110,l$2=b$2?Symbol.for("react.async_mode"):60111,m$2=b$2?Symbol.for("react.concurrent_mode"):60111,n$2=b$2?Symbol.for("react.forward_ref"):60112,p$2=b$2?Symbol.for("react.suspense"):60113,q$2=b$2?
|
|
14572
|
+
Symbol.for("react.suspense_list"):60120,r$2=b$2?Symbol.for("react.memo"):60115,t$2=b$2?Symbol.for("react.lazy"):60116,v$2=b$2?Symbol.for("react.block"):60121,w$2=b$2?Symbol.for("react.fundamental"):60117,x$2=b$2?Symbol.for("react.responder"):60118,y$2=b$2?Symbol.for("react.scope"):60119;
|
|
14573
|
+
function z$2(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c$2:switch(a=a.type,a){case l$2:case m$2:case e$2:case g$2:case f$2:case p$2:return a;default:switch(a=a&&a.$$typeof,a){case k$2:case n$2:case t$2:case r$2:case h$2:return a;default:return u}}case d$2:return u}}}function A$2(a){return z$2(a)===m$2}var AsyncMode$1=l$2;var ConcurrentMode$1=m$2;var ContextConsumer$1=k$2;var ContextProvider$1=h$2;var Element$1=c$2;var ForwardRef$1=n$2;var Fragment$1=e$2;var Lazy$1=t$2;var Memo$1=r$2;var Portal$1=d$2;
|
|
14574
|
+
var Profiler$1=g$2;var StrictMode$1=f$2;var Suspense$1=p$2;var isAsyncMode$1=function(a){return A$2(a)||z$2(a)===l$2};var isConcurrentMode$1=A$2;var isContextConsumer$1=function(a){return z$2(a)===k$2};var isContextProvider$1=function(a){return z$2(a)===h$2};var isElement$1=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c$2};var isForwardRef$1=function(a){return z$2(a)===n$2};var isFragment$1=function(a){return z$2(a)===e$2};var isLazy$1=function(a){return z$2(a)===t$2};
|
|
14575
|
+
var isMemo$1=function(a){return z$2(a)===r$2};var isPortal$1=function(a){return z$2(a)===d$2};var isProfiler$1=function(a){return z$2(a)===g$2};var isStrictMode$1=function(a){return z$2(a)===f$2};var isSuspense$1=function(a){return z$2(a)===p$2};
|
|
14576
|
+
var isValidElementType$1=function(a){return "string"===typeof a||"function"===typeof a||a===e$2||a===m$2||a===g$2||a===f$2||a===p$2||a===q$2||"object"===typeof a&&null!==a&&(a.$$typeof===t$2||a.$$typeof===r$2||a.$$typeof===h$2||a.$$typeof===k$2||a.$$typeof===n$2||a.$$typeof===w$2||a.$$typeof===x$2||a.$$typeof===y$2||a.$$typeof===v$2)};var typeOf$1=z$2;
|
|
14573
14577
|
|
|
14574
14578
|
var reactIs_production_min$1 = {
|
|
14575
14579
|
AsyncMode: AsyncMode$1,
|
|
@@ -14970,12 +14974,12 @@ var invariant_1 = invariant;
|
|
|
14970
14974
|
* This source code is licensed under the MIT license found in the
|
|
14971
14975
|
* LICENSE file in the root directory of this source tree.
|
|
14972
14976
|
*/
|
|
14973
|
-
var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?
|
|
14974
|
-
Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119;
|
|
14975
|
-
function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}var AsyncMode=l;var ConcurrentMode=m;var ContextConsumer=k;var ContextProvider=h;var Element=c;var ForwardRef=n;var Fragment=e;var Lazy=t;var Memo=r;var Portal=d;
|
|
14976
|
-
var Profiler=g;var StrictMode=f;var Suspense=p;var isAsyncMode=function(a){return A(a)||z(a)===l};var isConcurrentMode=A;var isContextConsumer=function(a){return z(a)===k};var isContextProvider=function(a){return z(a)===h};var isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c};var isForwardRef=function(a){return z(a)===n};var isFragment=function(a){return z(a)===e};var isLazy=function(a){return z(a)===t};
|
|
14977
|
-
var isMemo=function(a){return z(a)===r};var isPortal=function(a){return z(a)===d};var isProfiler=function(a){return z(a)===g};var isStrictMode=function(a){return z(a)===f};var isSuspense=function(a){return z(a)===p};
|
|
14978
|
-
var isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};var typeOf=z;
|
|
14977
|
+
var b$1="function"===typeof Symbol&&Symbol.for,c$1=b$1?Symbol.for("react.element"):60103,d$1=b$1?Symbol.for("react.portal"):60106,e$1=b$1?Symbol.for("react.fragment"):60107,f$1=b$1?Symbol.for("react.strict_mode"):60108,g$1=b$1?Symbol.for("react.profiler"):60114,h$1=b$1?Symbol.for("react.provider"):60109,k$1=b$1?Symbol.for("react.context"):60110,l$1=b$1?Symbol.for("react.async_mode"):60111,m$1=b$1?Symbol.for("react.concurrent_mode"):60111,n$1=b$1?Symbol.for("react.forward_ref"):60112,p$1=b$1?Symbol.for("react.suspense"):60113,q$1=b$1?
|
|
14978
|
+
Symbol.for("react.suspense_list"):60120,r$1=b$1?Symbol.for("react.memo"):60115,t$1=b$1?Symbol.for("react.lazy"):60116,v$1=b$1?Symbol.for("react.block"):60121,w$1=b$1?Symbol.for("react.fundamental"):60117,x$1=b$1?Symbol.for("react.responder"):60118,y$1=b$1?Symbol.for("react.scope"):60119;
|
|
14979
|
+
function z$1(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c$1:switch(a=a.type,a){case l$1:case m$1:case e$1:case g$1:case f$1:case p$1:return a;default:switch(a=a&&a.$$typeof,a){case k$1:case n$1:case t$1:case r$1:case h$1:return a;default:return u}}case d$1:return u}}}function A$1(a){return z$1(a)===m$1}var AsyncMode=l$1;var ConcurrentMode=m$1;var ContextConsumer=k$1;var ContextProvider=h$1;var Element=c$1;var ForwardRef=n$1;var Fragment=e$1;var Lazy=t$1;var Memo=r$1;var Portal=d$1;
|
|
14980
|
+
var Profiler=g$1;var StrictMode=f$1;var Suspense=p$1;var isAsyncMode=function(a){return A$1(a)||z$1(a)===l$1};var isConcurrentMode=A$1;var isContextConsumer=function(a){return z$1(a)===k$1};var isContextProvider=function(a){return z$1(a)===h$1};var isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c$1};var isForwardRef=function(a){return z$1(a)===n$1};var isFragment=function(a){return z$1(a)===e$1};var isLazy=function(a){return z$1(a)===t$1};
|
|
14981
|
+
var isMemo=function(a){return z$1(a)===r$1};var isPortal=function(a){return z$1(a)===d$1};var isProfiler=function(a){return z$1(a)===g$1};var isStrictMode=function(a){return z$1(a)===f$1};var isSuspense=function(a){return z$1(a)===p$1};
|
|
14982
|
+
var isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===e$1||a===m$1||a===g$1||a===f$1||a===p$1||a===q$1||"object"===typeof a&&null!==a&&(a.$$typeof===t$1||a.$$typeof===r$1||a.$$typeof===h$1||a.$$typeof===k$1||a.$$typeof===n$1||a.$$typeof===w$1||a.$$typeof===x$1||a.$$typeof===y$1||a.$$typeof===v$1)};var typeOf=z$1;
|
|
14979
14983
|
|
|
14980
14984
|
var reactIs_production_min = {
|
|
14981
14985
|
AsyncMode: AsyncMode,
|
|
@@ -15806,6 +15810,1567 @@ function createConnect(_temp) {
|
|
|
15806
15810
|
}
|
|
15807
15811
|
var connect = createConnect();
|
|
15808
15812
|
|
|
15813
|
+
var types$1 = createCommonjsModule(function (module, exports) {
|
|
15814
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15815
|
+
exports.defaultReactOptions = void 0;
|
|
15816
|
+
/**
|
|
15817
|
+
* Contains default values for the `reactOptions` object.
|
|
15818
|
+
*/
|
|
15819
|
+
exports.defaultReactOptions = { useCamelCaseFlagKeys: true };
|
|
15820
|
+
|
|
15821
|
+
});
|
|
15822
|
+
|
|
15823
|
+
unwrapExports(types$1);
|
|
15824
|
+
types$1.defaultReactOptions;
|
|
15825
|
+
|
|
15826
|
+
var context_1 = createCommonjsModule(function (module, exports) {
|
|
15827
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15828
|
+
exports.Consumer = exports.Provider = void 0;
|
|
15829
|
+
|
|
15830
|
+
/**
|
|
15831
|
+
* @ignore
|
|
15832
|
+
*/
|
|
15833
|
+
var context = (0, React.createContext)({ flags: {}, ldClient: undefined });
|
|
15834
|
+
var
|
|
15835
|
+
/**
|
|
15836
|
+
* @ignore
|
|
15837
|
+
*/
|
|
15838
|
+
Provider = context.Provider,
|
|
15839
|
+
/**
|
|
15840
|
+
* @ignore
|
|
15841
|
+
*/
|
|
15842
|
+
Consumer = context.Consumer;
|
|
15843
|
+
exports.Provider = Provider;
|
|
15844
|
+
exports.Consumer = Consumer;
|
|
15845
|
+
exports.default = context;
|
|
15846
|
+
|
|
15847
|
+
});
|
|
15848
|
+
|
|
15849
|
+
unwrapExports(context_1);
|
|
15850
|
+
context_1.Consumer;
|
|
15851
|
+
context_1.Provider;
|
|
15852
|
+
|
|
15853
|
+
function e(n){return (e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(n)}function n(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function t(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r);}return t}function r(e){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?t(o,!0).forEach((function(t){n(e,t,o[t]);})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):t(o).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n));}));}return e}function o(e){return function(e){if(Array.isArray(e)){for(var n=0,t=new Array(e.length);n<e.length;n++)t[n]=e[n];return t}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function i(e){function n(e,n){Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.message=e,this.code=n;}return n.prototype=new Error,n.prototype.name=e,n.prototype.constructor=n,n}var a=i("LaunchDarklyUnexpectedResponseError"),u=i("LaunchDarklyInvalidEnvironmentIdError"),s=i("LaunchDarklyInvalidUserError"),c=i("LaunchDarklyInvalidEventKeyError"),l=i("LaunchDarklyInvalidArgumentError"),f=i("LaunchDarklyFlagFetchError"),d=i("LaunchDarklyInvalidDataError");function v(e){return !(e>=400&&e<500)||400===e||408===e||429===e}for(var g=Object.freeze({__proto__:null,LDUnexpectedResponseError:a,LDInvalidEnvironmentIdError:u,LDInvalidUserError:s,LDInvalidEventKeyError:c,LDInvalidArgumentError:l,LDFlagFetchError:f,LDInvalidDataError:d,isHttpErrorRecoverable:v}),p=[],m=[],h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",y=0,w=h.length;y<w;++y)p[y]=h[y],m[h.charCodeAt(y)]=y;function b(e,n,t){for(var r,o,i=[],a=n;a<t;a+=3)r=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),i.push(p[(o=r)>>18&63]+p[o>>12&63]+p[o>>6&63]+p[63&o]);return i.join("")}m["-".charCodeAt(0)]=62,m["_".charCodeAt(0)]=63;var k=Array.isArray,E=Object.keys,D=Object.prototype.hasOwnProperty,S=["key","secondary","ip","country","email","firstName","lastName","avatar","name"];function O(e){return function(e){for(var n,t=e.length,r=t%3,o=[],i=0,a=t-r;i<a;i+=16383)o.push(b(e,i,i+16383>a?a:i+16383));return 1===r?(n=e[t-1],o.push(p[n>>2]+p[n<<4&63]+"==")):2===r&&(n=(e[t-2]<<8)+e[t-1],o.push(p[n>>10]+p[n>>4&63]+p[n<<2&63]+"=")),o.join("")}(function(e){for(var n=[],t=0;t<e.length;t++)n.push(e.charCodeAt(t));return n}(unescape(encodeURIComponent(e))))}function P(e){return O(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function U(e){return JSON.parse(JSON.stringify(e))}function R(e,n){return function e(n,t){if(n===t)return !0;if(n&&t&&"object"==typeof n&&"object"==typeof t){var r,o,i,a=k(n),u=k(t);if(a&&u){if((o=n.length)!=t.length)return !1;for(r=o;0!=r--;)if(!e(n[r],t[r]))return !1;return !0}if(a!=u)return !1;var s=n instanceof Date,c=t instanceof Date;if(s!=c)return !1;if(s&&c)return n.getTime()==t.getTime();var l=n instanceof RegExp,f=t instanceof RegExp;if(l!=f)return !1;if(l&&f)return n.toString()==t.toString();var d=E(n);if((o=d.length)!==E(t).length)return !1;for(r=o;0!=r--;)if(!D.call(t,d[r]))return !1;for(r=o;0!=r--;)if(!e(n[i=d[r]],t[i]))return !1;return !0}return n!=n&&t!=t}(e,n)}function j(e){setTimeout(e,0);}function I(e,n){var t=e.then((function(e){return n&&setTimeout((function(){n(null,e);}),0),e}),(function(e){if(!n)return Promise.reject(e);setTimeout((function(){n(e,null);}),0);}));return n?void 0:t}function T(e){var n={};for(var t in e)q(e,t)&&(n[t]={value:e[t],version:0});return n}function L(e){var n={};for(var t in e)q(e,t)&&(n[t]=e[t].value);return n}function N(e,n){for(var t,r=n.slice(0),o=[],i=e;r.length>0;){for(t=[];i>0;){var a=r.shift();if(!a)break;(i-=P(JSON.stringify(a)).length)<0&&t.length>0?r.unshift(a):t.push(a);}i=e,o.push(t);}return o}function x(e){var n=e.version||"3.5.1";return e.userAgent+"/"+n}function F(e,n){if(n&&!n.sendLDHeaders)return {};var t={"X-LaunchDarkly-User-Agent":x(e)};return n&&n.wrapperName&&(t["X-LaunchDarkly-Wrapper"]=n.wrapperVersion?n.wrapperName+"/"+n.wrapperVersion:n.wrapperName),t}function A(e,n){return n&&n.requestHeaderTransform?n.requestHeaderTransform(r({},e)):e}function C(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return n.reduce((function(e,n){return r({},e,{},n)}),{})}function q(e,n){return Object.prototype.hasOwnProperty.call(e,n)}function V(e){if(!e)return e;var n;for(var t in S){var o=S[t],i=e[o];void 0!==i&&"string"!=typeof i&&((n=n||r({},e))[o]=String(i));}return n||e}Object.freeze({__proto__:null,btoa:O,base64URLEncode:P,clone:U,deepEquals:R,onNextTick:j,wrapPromiseCallback:I,transformValuesToVersionedValues:T,transformVersionedValuesToValues:L,chunkUserEventsForUrl:N,getLDUserAgentString:x,getLDHeaders:F,transformHeaders:A,extend:C,objectHasOwnProperty:q,sanitizeUser:V});for(var _=function(e,n){return function(e){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var t=new Uint8Array(16);e.exports=function(){return n(t),t};}else {var r=new Array(16);e.exports=function(){for(var e,n=0;n<16;n++)0==(3&n)&&(e=4294967296*Math.random()),r[n]=e>>>((3&n)<<3)&255;return r};}}(n={exports:{}}),n.exports}(),J=[],z=0;z<256;++z)J[z]=(z+256).toString(16).substr(1);var M,H,K=0,$=0,B=function(e,n,t){var r=n&&t||0,o=n||[],i=(e=e||{}).node||M,a=void 0!==e.clockseq?e.clockseq:H;if(null==i||null==a){var u=_();null==i&&(i=M=[1|u[0],u[1],u[2],u[3],u[4],u[5]]),null==a&&(a=H=16383&(u[6]<<8|u[7]));}var s=void 0!==e.msecs?e.msecs:(new Date).getTime(),c=void 0!==e.nsecs?e.nsecs:$+1,l=s-K+(c-$)/1e4;if(l<0&&void 0===e.clockseq&&(a=a+1&16383),(l<0||s>K)&&void 0===e.nsecs&&(c=0),c>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");K=s,$=c,H=a;var f=(1e4*(268435455&(s+=122192928e5))+c)%4294967296;o[r++]=f>>>24&255,o[r++]=f>>>16&255,o[r++]=f>>>8&255,o[r++]=255&f;var d=s/4294967296*1e4&268435455;o[r++]=d>>>8&255,o[r++]=255&d,o[r++]=d>>>24&15|16,o[r++]=d>>>16&255,o[r++]=a>>>8|128,o[r++]=255&a;for(var v=0;v<6;++v)o[r+v]=i[v];return n||function(e,n){var t=n||0,r=J;return [r[e[t++]],r[e[t++]],r[e[t++]],r[e[t++]],"-",r[e[t++]],r[e[t++]],"-",r[e[t++]],r[e[t++]],"-",r[e[t++]],r[e[t++]],"-",r[e[t++]],r[e[t++]],r[e[t++]],r[e[t++]],r[e[t++]],r[e[t++]]].join("")}(o)};function G(e,n,t){var r="/a/"+n+".gif",o=C({"Content-Type":"application/json"},F(e,t)),i=e.httpFallbackPing,a={sendChunk:function(n,a,u,s){var c=JSON.stringify(n),l=u?null:B();return s?function n(r){var i=u?o:C({},o,{"X-LaunchDarkly-Event-Schema":"3","X-LaunchDarkly-Payload-ID":l});return e.httpRequest("POST",a,A(i,t),c).promise.then((function(e){if(e)return e.status>=400&&v(e.status)&&r?n(!1):function(e){var n={status:e.status},t=e.header("date");if(t){var r=Date.parse(t);r&&(n.serverTime=r);}return n}(e)})).catch((function(){return r?n(!1):Promise.reject()}))}(!0).catch((function(){})):(i&&i(a+r+"?d="+P(c)),Promise.resolve())},sendEvents:function(n,t,r){if(!e.httpRequest)return Promise.resolve();var o,i=e.httpAllowsPost();o=i?[n]:N(2e3-t.length,n);for(var u=[],s=0;s<o.length;s++)u.push(a.sendChunk(o[s],t,r,i));return Promise.all(u)}};return a}function X(){var e={},n=0,t=0,r={};return e.summarizeEvent=function(e){if("feature"===e.kind){var o=e.key+":"+(null!==e.variation&&void 0!==e.variation?e.variation:"")+":"+(null!==e.version&&void 0!==e.version?e.version:""),i=r[o];i?i.count=i.count+1:r[o]={count:1,key:e.key,variation:e.variation,version:e.version,value:e.value,default:e.default},(0===n||e.creationDate<n)&&(n=e.creationDate),e.creationDate>t&&(t=e.creationDate);}},e.getSummary=function(){var e={},o=!0;for(var i in r){var a=r[i],u=e[a.key];u||(u={default:a.default,counters:[]},e[a.key]=u);var s={value:a.value,count:a.count};void 0!==a.variation&&null!==a.variation&&(s.variation=a.variation),a.version?s.version=a.version:s.unknown=!0,u.counters.push(s),o=!1;}return o?null:{startDate:n,endDate:t,features:e}},e.clearSummary=function(){n=0,t=0,r={};},e}function W(e){var n={},t=e.allAttributesPrivate,r=e.privateAttributeNames||[],o={key:!0,custom:!0,anonymous:!0},i={key:!0,secondary:!0,ip:!0,country:!0,email:!0,firstName:!0,lastName:!0,avatar:!0,name:!0,anonymous:!0,custom:!0};return n.filterUser=function(e){if(!e)return null;var n=e.privateAttributeNames||[],a=function(e,i){return Object.keys(e).reduce((function(a,u){var s=a;return i(u)&&(function(e){return !o[e]&&(t||-1!==n.indexOf(e)||-1!==r.indexOf(e))}(u)?s[1][u]=!0:s[0][u]=e[u]),s}),[{},{}])},u=a(e,(function(e){return i[e]})),s=u[0],c=u[1];if(e.custom){var l=a(e.custom,(function(){return !0}));s.custom=l[0],c=C({},c,l[1]);}var f=Object.keys(c);return f.length&&(f.sort(),s.privateAttrs=f),s},n}function Q(e){return e&&e.message?e.message:"string"==typeof e||e instanceof String?e:JSON.stringify(e)}var Y=" Please see https://docs.launchdarkly.com/sdk/client-side/javascript#initializing-the-client for instructions on SDK initialization.",Z=function(e){return 'Expected application/json content type but got "'+e+'"'},ee=function(e){return "local storage is unavailable: "+Q(e)},ne=function(e){return "network error"+(e?" ("+e+")":"")},te=function(e){return 'Custom event "'+e+'" does not exist'},re=function(){return "Environment not found. Double check that you specified a valid environment/client-side ID."+Y},oe=function(){return "No environment/client-side ID was specified."+Y},ie=function(e){return "Error fetching flag settings: "+Q(e)},ae=function(){return "No user specified."+Y},ue=function(){return "Invalid user specified."+Y},se=function(){return "LaunchDarkly client was initialized with bootstrap data that did not include flag metadata. Events may not be sent correctly."+Y},ce=function(e,n){return n?'"'+e+'" is deprecated, please use "'+n+'"':'"'+e+'" is deprecated'},le=function(e,n,t){return "Received error "+e+(401===e?" (invalid SDK key)":"")+" for "+n+" - "+(v(e)?t:"giving up permanently")},fe=function(){return "Cannot make HTTP requests in this environment."+Y},de=function(e){return "Opening stream connection to "+e},ve=function(e,n){return "Error on stream connection: "+Q(e)+", will continue retrying every "+n+" milliseconds."},ge=function(e){return 'Ignoring unknown config option "'+e+'"'},pe=function(e,n,t){return 'Config option "'+e+'" should be of type '+n+", got "+t+", using default value"},me=function(e,n){return 'Config option "'+e+'" should be a boolean, got '+n+", converting to boolean"},he=function(e,n,t){return 'Config option "'+e+'" was set to '+n+", changing to minimum value of "+t},ye=function(e){return "polling for feature flags at "+e},we=function(e){return 'received streaming update for flag "'+e+'"'},be=function(e){return 'received streaming update for flag "'+e+'" but ignored due to version check'},ke=function(e){return 'received streaming deletion for flag "'+e+'"'},Ee=function(e){return 'received streaming deletion for flag "'+e+'" but ignored due to version check'},De=function(e){return 'enqueueing "'+e+'" event'},Se=function(e){return "sending "+e+" events"},Oe=Object.freeze({__proto__:null,clientInitialized:function(){return "LaunchDarkly client initialized"},clientNotReady:function(){return "LaunchDarkly client is not ready"},eventCapacityExceeded:function(){return "Exceeded event queue capacity. Increase capacity to avoid dropping events."},eventWithoutUser:function(){return "Be sure to call `identify` in the LaunchDarkly client: https://docs.launchdarkly.com/sdk/features/identify#javascript"},invalidContentType:Z,invalidKey:function(){return "Event key must be a string"},localStorageUnavailable:ee,networkError:ne,unknownCustomEventKey:te,environmentNotFound:re,environmentNotSpecified:oe,errorFetchingFlags:ie,userNotSpecified:ae,invalidUser:ue,invalidData:function(){return "Invalid data received from LaunchDarkly; connection may have been interrupted"},bootstrapOldFormat:se,bootstrapInvalid:function(){return "LaunchDarkly bootstrap data is not available because the back end could not read the flags."},deprecated:ce,httpErrorMessage:le,httpUnavailable:fe,identifyDisabled:function(){return "identify() has no effect here; it must be called on the main client instance"},streamClosing:function(){return "Closing stream connection"},streamConnecting:de,streamError:ve,unknownOption:ge,wrongOptionType:pe,wrongOptionTypeBoolean:me,optionBelowMinimum:he,debugPolling:ye,debugStreamPing:function(){return "received ping message from stream"},debugStreamPut:function(){return "received streaming update for all flags"},debugStreamPatch:we,debugStreamPatchIgnored:be,debugStreamDelete:ke,debugStreamDeleteIgnored:Ee,debugEnqueueingEvent:De,debugPostingEvents:Se,debugPostingDiagnosticEvent:function(e){return "sending diagnostic event ("+e.kind+")"}});function Pe(e,n,t,r){var o={};function i(){var e="",o=r.getUser();return o&&(e=t||O(JSON.stringify(o))),"ld:"+n+":"+e}return o.loadFlags=function(){return e.get(i()).then((function(e){if(null==e)return null;try{var n=JSON.parse(e);if(n){var t=n.$schema;void 0===t||t<1?n=T(n):delete n.$schema;}return n}catch(e){return o.clearFlags().then((function(){return null}))}}))},o.saveFlags=function(n){var t=C({},n,{$schema:1});return e.set(i(),JSON.stringify(t))},o.clearFlags=function(){return e.clear(i())},o}function Ue(e,n,t,r){var o,i=n.streamUrl,a=n.logger,u={},s=i+"/eval/"+t,c=n.useReport,l=n.evaluationReasons,f=n.streamReconnectDelay,d=F(e,n),v=!1,g=null,p=null,m=null,h=null,y=null;function w(e){v||(a.warn(ve(e,f)),v=!0),D(!1),E(),b(f);}function b(e){p||(e?p=setTimeout(k,e):k());}function k(){var r;p=null;var u="",f={headers:d,readTimeoutMillis:3e5};if(e.eventSourceFactory){for(var v in null!=h&&(u="h="+h),c?e.eventSourceAllowsReport?(r=s,f.method="REPORT",f.headers["Content-Type"]="application/json",f.body=JSON.stringify(m)):(r=i+"/ping/"+t,u=""):r=s+"/"+P(JSON.stringify(m)),f.headers=A(f.headers,n),l&&(u=u+(u?"&":"")+"withReasons=true"),r=r+(u?"?":"")+u,E(),a.info(de(r)),o=(new Date).getTime(),g=e.eventSourceFactory(r,f),y)q(y,v)&&g.addEventListener(v,y[v]);g.onerror=w;}}function E(){g&&(a.info("Closing stream connection"),g.close(),g=null);}function D(e){o&&r&&r.recordStreamInit(o,!e,(new Date).getTime()-o),o=null;}return u.connect=function(e,n,t){m=e,h=n,y={};var r=function(e){y[e]=function(n){v=!1,D(!0),t[e]&&t[e](n);};};for(var o in t||{})r(o);b();},u.disconnect=function(){clearTimeout(p),p=null,E();},u.isConnected=function(){return !!(g&&e.eventSourceIsActive&&e.eventSourceIsActive(g))},u}function Re(e,n,t){var r=n.baseUrl,o=n.useReport,i=n.evaluationReasons,a=n.logger,s={},c={};function l(t,r){if(!e.httpRequest)return new Promise((function(e,n){n(new f(fe()));}));var o=r?"REPORT":"GET",i=F(e,n);r&&(i["Content-Type"]="application/json");var a=c[t];a||(a=function(e){var n,t,r,o,i={addPromise:function(i,a){n=i,t&&t(),t=a,i.then((function(t){n===i&&(r(t),e&&e());}),(function(t){n===i&&(o(t),e&&e());}));}};return i.resultPromise=new Promise((function(e,n){r=e,o=n;})),i}((function(){delete c[t];})),c[t]=a);var s=e.httpRequest(o,t,A(i,n),r),l=s.promise.then((function(e){if(200===e.status){if(e.header("content-type")&&"application/json"===e.header("content-type").substring(0,"application/json".length))return JSON.parse(e.body);var n=Z(e.header("content-type")||"");return Promise.reject(new f(n))}return Promise.reject(function(e){return 404===e.status?new u(re()):new f(ie(e.statusText||String(e.status)))}(e))}),(function(e){return Promise.reject(new f(ne(e)))}));return a.addPromise(l,(function(){s.cancel&&s.cancel();})),a.resultPromise}return s.fetchJSON=function(e){return l(r+e,null)},s.fetchFlagSettings=function(e,n){var u,s,c,f="";return o?(s=[r,"/sdk/evalx/",t,"/user"].join(""),c=JSON.stringify(e)):(u=P(JSON.stringify(e)),s=[r,"/sdk/evalx/",t,"/users/",u].join("")),n&&(f="h="+n),i&&(f=f+(f?"&":"")+"withReasons=true"),s=s+(f?"?":"")+f,a.debug(ye(s)),l(s,c)},s}function je(e){var n={validateUser:function(n){if(!n)return Promise.reject(new s(ae()));var t=U(n);return null!==t.key&&void 0!==t.key?(t.key=t.key.toString(),Promise.resolve(t)):t.anonymous?e.get("ld:$anonUserId").then((function(n){if(n)return t.key=n,t;var r=B();return t.key=r,function(n){return e.set("ld:$anonUserId",n)}(r).then((function(){return t}))})):Promise.reject(new s(ue()))}};return n}var Ie=["debug","info","warn","error","none"];function Te(e,n){return function(e,n){if(e&&e.destination&&"function"!=typeof e.destination)throw new Error("destination for basicLogger was set to a non-function");function t(e){return function(n){console&&console[e]&&console[e].call(console,n);}}var r=e&&e.destination?[e.destination,e.destination,e.destination,e.destination]:[t("log"),t("info"),t("warn"),t("error")],i=!(!e||!e.destination),a=e&&void 0!==e.prefix&&null!==e.prefix?e.prefix:"[LaunchDarkly] ",u=1;if(e&&e.level)for(var s=0;s<Ie.length;s++)Ie[s]===e.level&&(u=s);function c(e,t,u){if(!(u.length<1)){var s,c=i?t+": "+a:a;if(1!==u.length&&n){var l=o(u);l[0]=c+l[0],s=n.apply(void 0,o(l));}else s=c+u[0];try{r[e](s);}catch(e){console&&console.log&&console.log("[LaunchDarkly] Configured logger's "+t+" method threw an exception: "+e);}}}for(var l={},f=function(e){var n=Ie[e];if("none"!==n)if(e<u)l[n]=function(){};else {var t=e;l[n]=function(){c(t,n,arguments);};}},d=0;d<Ie.length;d++)f(d);return l}({level:e,prefix:n})}var Le={baseUrl:{default:"https://app.launchdarkly.com"},streamUrl:{default:"https://clientstream.launchdarkly.com"},eventsUrl:{default:"https://events.launchdarkly.com"},sendEvents:{default:!0},streaming:{type:"boolean"},sendLDHeaders:{default:!0},requestHeaderTransform:{type:"function"},inlineUsersInEvents:{default:!1},allowFrequentDuplicateEvents:{default:!1},sendEventsOnlyForVariation:{default:!1},useReport:{default:!1},evaluationReasons:{default:!1},eventCapacity:{default:100,minimum:1},flushInterval:{default:2e3,minimum:2e3},samplingInterval:{default:0,minimum:0},streamReconnectDelay:{default:1e3,minimum:0},allAttributesPrivate:{default:!1},privateAttributeNames:{default:[]},bootstrap:{type:"string|object"},diagnosticRecordingInterval:{default:9e5,minimum:2e3},diagnosticOptOut:{default:!1},wrapperName:{type:"string"},wrapperVersion:{type:"string"},stateProvider:{type:"object"},autoAliasingOptOut:{default:!1}};function Ne(n,t,r,o){var i=C({logger:{default:o}},Le,r),a={all_attributes_private:"allAttributesPrivate",private_attribute_names:"privateAttributeNames",samplingInterval:null};function u(e){j((function(){t&&t.maybeReportError(new l(e));}));}var s=C({},n||{});return function(e){var n=e;Object.keys(a).forEach((function(e){if(void 0!==n[e]){var t=a[e];o&&o.warn(ce(e,t)),t&&(void 0===n[t]&&(n[t]=n[e]),delete n[e]);}}));}(s),function(e){Ie.forEach((function(n){if("none"!==n&&(!e[n]||"function"!=typeof e[n]))throw new Error("Provided logger instance must support logger."+n+"(...) method")}));}((s=function(n){var t=C({},n),r=function(n){if(null===n)return "any";if(void 0!==n){if(Array.isArray(n))return "array";var t=e(n);return "boolean"===t||"string"===t||"number"===t||"function"===t?t:"object"}};return Object.keys(n).forEach((function(e){var o=n[e];if(null!=o){var a=i[e];if(void 0===a)u(ge(e));else {var s=a.type||r(a.default);if("any"!==s){var c=s.split("|"),l=r(o);c.indexOf(l)<0?"boolean"===s?(t[e]=!!o,u(me(e,l))):(u(pe(e,s,l)),t[e]=a.default):"number"===l&&void 0!==a.minimum&&o<a.minimum&&(u(he(e,o,a.minimum)),t[e]=a.minimum);}}}})),t}(s=function(e){var n=C({},e);return Object.keys(i).forEach((function(e){void 0!==n[e]&&null!==n[e]||(n[e]=i[e]&&i[e].default);})),n}(s))).logger),s}var xe=Object.freeze({__proto__:null,baseOptionDefs:Le,validate:Ne}).baseOptionDefs,Fe=function(e){var n={diagnosticId:B()};return e&&(n.sdkKeySuffix=e.length>6?e.substring(e.length-6):e),n};function Ae(n,t,o,i,s){var l,g,p,m=o&&o.logger?o.logger:s&&s.logger&&s.logger.default||Te("warn"),h=function(e){var n={},t={};return n.on=function(e,n,r){t[e]=t[e]||[],t[e]=t[e].concat({handler:n,context:r});},n.off=function(e,n,r){if(t[e])for(var o=0;o<t[e].length;o++)t[e][o].handler===n&&t[e][o].context===r&&(t[e]=t[e].slice(0,o).concat(t[e].slice(o+1)));},n.emit=function(e){if(t[e])for(var n=t[e].slice(0),r=0;r<n.length;r++)n[r].handler.apply(n[r].context,Array.prototype.slice.call(arguments,1));},n.getEvents=function(){return Object.keys(t)},n.getEventListenerCount=function(e){return t[e]?t[e].length:0},n.maybeReportError=function(n){n&&(t.error?this.emit("error",n):(e||console).error(n.message));},n}(m),y=function(e){var n=!1,t=!1,r=null,o=null,i=new Promise((function(n){e.on("ready",(function t(){e.off("ready",t),n();}));})).catch((function(){}));return {getInitializationPromise:function(){return o||(n?Promise.resolve():t?Promise.reject(r):o=new Promise((function(n,t){e.on("initialized",(function t(){e.off("initialized",t),n();})),e.on("failed",(function n(r){e.off("failed",n),t(r);}));})))},getReadyPromise:function(){return i},signalSuccess:function(){n||t||(n=!0,e.emit("initialized"),e.emit("ready"));},signalFailure:function(o){n||t||(t=!0,r=o,e.emit("failed",o),e.emit("ready")),e.maybeReportError(o);}}}(h),w=Ne(o,h,s,m),b=w.sendEvents,k=n,E=w.hash,D=function(e,n){var t={},r=!1,o=function(e){r||(r=!0,n.warn(ee(e)));};return t.isEnabled=function(){return !!e},t.get=function(n){return new Promise((function(t){e?e.get(n).then(t).catch((function(e){o(e),t(void 0);})):t(void 0);}))},t.set=function(n,t){return new Promise((function(r){e?e.set(n,t).then((function(){return r(!0)})).catch((function(e){o(e),r(!1);})):r(!1);}))},t.clear=function(n){return new Promise((function(t){e?e.clear(n).then((function(){return t(!0)})).catch((function(e){o(e),t(!1);})):t(!1);}))},t}(i.localStorage,m),S=G(i,k,w),O=w.sendEvents&&!w.diagnosticOptOut,P=O?Fe(k):null,T=O?function(e){var n,t,r,o;function i(e){n=e,t=0,r=0,o=[];}return i(e),{getProps:function(){return {dataSinceDate:n,droppedEvents:t,eventsInLastBatch:r,streamInits:o}},setProps:function(e){n=e.dataSinceDate,t=e.droppedEvents||0,r=e.eventsInLastBatch||0,o=e.streamInits||[];},incrementDroppedEvents:function(){t++;},setEventsInLastBatch:function(e){r=e;},recordStreamInit:function(e,n,t){var r={timestamp:e,failed:n,durationMillis:t};o.push(r);},reset:i}}((new Date).getTime()):null,N=O?function(e,n,t,o,i,a,u){var s,c,l=!!e.diagnosticUseCombinedEvent,f="ld:"+i+":$diagnostics",d=a.eventsUrl+"/events/diagnostic/"+i,v=a.diagnosticRecordingInterval,g=t,p=!!a.streaming,m={};function h(){return {sdk:b(),configuration:(n={customBaseURI:a.baseUrl!==xe.baseUrl.default,customStreamURI:a.streamUrl!==xe.streamUrl.default,customEventsURI:a.eventsUrl!==xe.eventsUrl.default,eventsCapacity:a.eventCapacity,eventsFlushIntervalMillis:a.flushInterval,reconnectTimeMillis:a.streamReconnectDelay,streamingDisabled:!p,allAttributesPrivate:!!a.allAttributesPrivate,inlineUsersInEvents:!!a.inlineUsersInEvents,diagnosticRecordingIntervalMillis:a.diagnosticRecordingInterval,usingSecureMode:!!a.hash,bootstrapMode:!!a.bootstrap,fetchGoalsDisabled:!a.fetchGoals,allowFrequentDuplicateEvents:!!a.allowFrequentDuplicateEvents,sendEventsOnlyForVariation:!!a.sendEventsOnlyForVariation,autoAliasingOptOut:!!a.autoAliasingOptOut},n),platform:e.diagnosticPlatformData};var n;}function y(e){a.logger&&a.logger.debug(Oe.debugPostingDiagnosticEvent(e)),o.sendEvents(e,d,!0).then((function(){})).catch((function(){}));}function w(){var e,t;y((e=(new Date).getTime(),t=r({kind:l?"diagnostic-combined":"diagnostic",id:u,creationDate:e},g.getProps()),l&&(t=r({},t,{},h())),g.reset(e),t)),c=setTimeout(w,v),s=(new Date).getTime(),l&&function(){if(n.isEnabled()){var e=r({},g.getProps());n.set(f,JSON.stringify(e));}}();}function b(){var n=r({},e.diagnosticSdkData);return a.wrapperName&&(n.wrapperName=a.wrapperName),a.wrapperVersion&&(n.wrapperVersion=a.wrapperVersion),n}return m.start=function(){l?function(e){if(!n.isEnabled())return e(!1);n.get(f).then((function(n){if(n)try{var t=JSON.parse(n);g.setProps(t),s=t.dataSinceDate;}catch(e){}e(!0);})).catch((function(){e(!1);}));}((function(e){if(e){var n=(s||0)+v,t=(new Date).getTime();t>=n?w():c=setTimeout(w,n-t);}else 0===Math.floor(4*Math.random())?w():c=setTimeout(w,v);})):(y(r({kind:"diagnostic-init",id:u,creationDate:g.getProps().dataSinceDate},h())),c=setTimeout(w,v));},m.stop=function(){c&&clearTimeout(c);},m.setStreaming=function(e){p=e;},m}(i,D,T,S,k,w,P):null,x=Ue(i,w,k,T),F=w.eventProcessor||function(e,n,t){var r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,u=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,s={},c=u||G(e,t,n),l=n.eventsUrl+"/events/bulk/"+t,f=X(),d=W(n),g=n.inlineUsersInEvents,p=n.samplingInterval,m=n.eventCapacity,h=n.flushInterval,y=n.logger,w=[],b=0,k=!1,E=!1;function D(){return 0===p||0===Math.floor(Math.random()*p)}function S(e){return !!e.debugEventsUntilDate&&e.debugEventsUntilDate>b&&e.debugEventsUntilDate>(new Date).getTime()}function O(e){var n=C({},e);return "alias"===e.kind||(g||"identify"===e.kind?n.user=d.filterUser(e.user):(n.userKey=e.user.key,delete n.user),"feature"===e.kind&&(delete n.trackEvents,delete n.debugEventsUntilDate)),n}function P(e){w.length<m?(w.push(e),E=!1):(E||(E=!0,y.warn("Exceeded event queue capacity. Increase capacity to avoid dropping events.")),o&&o.incrementDroppedEvents());}return s.enqueue=function(e){if(!k){var n=!1,t=!1;if(f.summarizeEvent(e),"feature"===e.kind?D()&&(n=!!e.trackEvents,t=S(e)):n=D(),n&&P(O(e)),t){var r=C({},e,{kind:"debug"});r.user=d.filterUser(r.user),delete r.trackEvents,delete r.debugEventsUntilDate,P(r);}}},s.flush=function(){if(k)return Promise.resolve();var e=w,n=f.getSummary();return f.clearSummary(),n&&(n.kind="summary",e.push(n)),o&&o.setEventsInLastBatch(e.length),0===e.length?Promise.resolve():(w=[],y.debug(Se(e.length)),c.sendEvents(e,l).then((function(e){e&&(e.serverTime&&(b=e.serverTime),v(e.status)||(k=!0),e.status>=400&&j((function(){i.maybeReportError(new a(le(e.status,"event posting","some events were dropped")));})));})))},s.start=function(){r=setTimeout((function e(){s.flush(),r=setTimeout(e,h);}),h);},s.stop=function(){clearTimeout(r);},s}(i,w,k,T,h,S),A=Re(i,w,k),_={},J={},z=w.streaming,M=!1,H=!1,K=!0,$=w.stateProvider,B=function(e,n){var t,r={setUser:function(e){var r=t&&U(t);(t=V(e))&&n&&n(U(t),r);},getUser:function(){return t?U(t):null}};return r}(0,(function(e,n){((function(e){$||e&&Z({kind:"identify",key:e.key,user:e,creationDate:(new Date).getTime()});}))(e),!w.autoAliasingOptOut&&n&&n.anonymous&&e&&!e.anonymous&&ce(e,n);})),Q=je(D),Y=D.isEnabled()?new Pe(D,k,E,B,m):null;function Z(e){if(k&&!($&&$.enqueueEvent&&$.enqueueEvent(e))){if("alias"!==e.kind){if(!e.user)return void(K&&(m.warn("Be sure to call `identify` in the LaunchDarkly client: https://docs.launchdarkly.com/sdk/features/identify#javascript"),K=!1));K=!1;}!b||H||i.isDoNotTrack()||(m.debug(De(e.kind)),F.enqueue(e));}}function ne(e,n,t,r){var o=B.getUser(),i=new Date,a=n?n.value:null;if(!w.allowFrequentDuplicateEvents){var u=JSON.stringify(a)+(o&&o.key?o.key:"")+e,s=_[u];if(s&&i-s<3e5)return;_[u]=i;}var c={kind:"feature",key:e,user:o,value:a,variation:n?n.variationIndex:null,default:t,creationDate:i.getTime()};o&&o.anonymous&&(c.contextKind=ue(o));var l=J[e];l&&(c.version=l.flagVersion?l.flagVersion:l.version,c.trackEvents=l.trackEvents,c.debugEventsUntilDate=l.debugEventsUntilDate),(r||l&&l.trackReason)&&n&&(c.reason=n.reason),Z(c);}function re(e,n,t,r){var o;if(J&&q(J,e)&&J[e]&&!J[e].deleted){var i=J[e];o=ae(i),null!==i.value&&void 0!==i.value||(o.value=n);}else o={value:n,variationIndex:null,reason:{kind:"ERROR",errorKind:"FLAG_NOT_FOUND"}};return t&&ne(e,o,n,r),o}function ae(e){return {value:e.value,variationIndex:void 0===e.variation?null:e.variation,reason:e.reason||null}}function ue(e){return e.anonymous?"anonymousUser":"user"}function ce(e,n){$||e&&n&&Z({kind:"alias",key:e.key,contextKind:ue(e),previousKey:n.key,previousContextKind:ue(n),creationDate:(new Date).getTime()});}function fe(){if(g=!0,B.getUser()){var e=function(e){try{return JSON.parse(e)}catch(e){return void h.maybeReportError(new d("Invalid data received from LaunchDarkly; connection may have been interrupted"))}};x.connect(B.getUser(),E,{ping:function(){m.debug("received ping message from stream");var e=B.getUser();A.fetchFlagSettings(e,E).then((function(n){R(e,B.getUser())&&ve(n||{});})).catch((function(e){h.maybeReportError(new f(ie(e)));}));},put:function(n){var t=e(n.data);t&&(m.debug("received streaming update for all flags"),ve(t));},patch:function(n){var t=e(n.data);if(t){var r=J[t.key];if(!r||!r.version||!t.version||r.version<t.version){m.debug(we(t.key));var o={},i=C({},t);delete i.key,J[t.key]=i;var a=ae(i);o[t.key]=r?{previous:r.value,current:a}:{current:a},ge(o);}else m.debug(be(t.key));}},delete:function(n){var t=e(n.data);if(t)if(!J[t.key]||J[t.key].version<t.version){m.debug(ke(t.key));var r={};J[t.key]&&!J[t.key].deleted&&(r[t.key]={previous:J[t.key].value}),J[t.key]={version:t.version,deleted:!0},ge(r);}else m.debug(Ee(t.key));}});}}function de(){g&&(x.disconnect(),g=!1);}function ve(e){var n={};if(!e)return Promise.resolve();for(var t in J)q(J,t)&&J[t]&&(e[t]&&!R(e[t].value,J[t].value)?n[t]={previous:J[t].value,current:ae(e[t])}:e[t]&&!e[t].deleted||(n[t]={previous:J[t].value}));for(var o in e)q(e,o)&&e[o]&&(!J[o]||J[o].deleted)&&(n[o]={current:ae(e[o])});return J=r({},e),ge(n).catch((function(){}))}function ge(e){var n=Object.keys(e);if(n.length>0){var t={};n.forEach((function(n){var r=e[n].current,o=r?r.value:void 0,i=e[n].previous;h.emit("change:"+n,o,i),t[n]=r?{current:o,previous:i}:{previous:i};})),h.emit("change",t),h.emit("internal-change",J),w.sendEventsOnlyForVariation||$||n.forEach((function(n){ne(n,e[n].current);}));}return l&&Y?Y.saveFlags(J):Promise.resolve()}function pe(){var e=z||p&&void 0===z;e&&!g?fe():!e&&g&&de(),N&&N.setStreaming(e);}function me(e){return "change"===e||"change:"===e.substr(0,"change".length+1)}if("string"==typeof w.bootstrap&&"LOCALSTORAGE"===w.bootstrap.toUpperCase()&&(Y?l=!0:m.warn(ee())),"object"===e(w.bootstrap)&&(J=function(e){var n=Object.keys(e),t=e.$flagsState;!t&&n.length&&m.warn(se()),!1===e.$valid&&m.warn("LaunchDarkly bootstrap data is not available because the back end could not read the flags.");var r={};return n.forEach((function(n){if("$flagsState"!==n&&"$valid"!==n){var o={value:e[n]};t&&t[n]?o=C(o,t[n]):o.version=0,r[n]=o;}})),r}(w.bootstrap)),$){var he=$.getInitialState();he?ye(he):$.on("init",ye),$.on("update",(function(e){e.user&&B.setUser(e.user),e.flags&&ve(e.flags);}));}else (n?Q.validateUser(t).then((function(n){return B.setUser(n),"object"===e(w.bootstrap)?Ie():l?Y.loadFlags().then((function(e){return null==e?(J={},A.fetchFlagSettings(B.getUser(),E).then((function(e){return ve(e||{})})).then(Ie).catch((function(e){Le(new f(ie(e)));}))):(J=e,j(Ie),A.fetchFlagSettings(B.getUser(),E).then((function(e){return ve(e)})).catch((function(e){return h.maybeReportError(e)})))})):A.fetchFlagSettings(B.getUser(),E).then((function(e){J=e||{},Ie();})).catch((function(e){J={},Le(e);}))})):Promise.reject(new u(oe()))).catch(Le);function ye(e){k=e.environment,B.setUser(e.user),J=r({},e.flags),j(Ie);}function Ie(){m.info("LaunchDarkly client initialized"),M=!0,pe(),y.signalSuccess();}function Le(e){y.signalFailure(e);}return {client:{waitForInitialization:function(){return y.getInitializationPromise()},waitUntilReady:function(){return y.getReadyPromise()},identify:function(e,n,t){return H?I(Promise.resolve({}),t):$?(m.warn("identify() has no effect here; it must be called on the main client instance"),I(Promise.resolve(L(J)),t)):I((l&&Y?Y.clearFlags():Promise.resolve()).then((function(){return Q.validateUser(e)})).then((function(e){return A.fetchFlagSettings(e,n).then((function(t){var r=L(t);return B.setUser(e),E=n,t?ve(t).then((function(){return r})):r}))})).then((function(e){return g&&fe(),e})).catch((function(e){return h.maybeReportError(e),Promise.reject(e)})),t)},getUser:function(){return B.getUser()},variation:function(e,n){return re(e,n,!0,!1).value},variationDetail:function(e,n){return re(e,n,!0,!0)},track:function(e,n,t){if("string"==typeof e){i.customEventFilter&&!i.customEventFilter(e)&&m.warn(te(e));var r=B.getUser(),o={kind:"custom",key:e,user:r,url:i.getCurrentUrl(),creationDate:(new Date).getTime()};r&&r.anonymous&&(o.contextKind=ue(r)),null!=n&&(o.data=n),null!=t&&(o.metricValue=t),Z(o);}else h.maybeReportError(new c(te(e)));},alias:ce,on:function(e,n,t){me(e)?(p=!0,M&&pe(),h.on(e,n,t)):h.on.apply(h,arguments);},off:function(e){if(h.off.apply(h,arguments),me(e)){var n=!1;h.getEvents().forEach((function(e){me(e)&&h.getEventListenerCount(e)>0&&(n=!0);})),n||(p=!1,g&&void 0===z&&de());}},setStreaming:function(e){var n=null===e?void 0:e;n!==z&&(z=n,pe());},flush:function(e){return I(b?F.flush():Promise.resolve(),e)},allFlags:function(){var e={};if(!J)return e;for(var n in J)q(J,n)&&(e[n]=re(n,null,!w.sendEventsOnlyForVariation).value);return e},close:function(e){if(H)return I(Promise.resolve(),e);var n=function(){H=!0,J={};};return I(Promise.resolve().then((function(){if(de(),N&&N.stop(),b)return F.stop(),F.flush()})).then(n).catch(n),e)}},options:w,emitter:h,ident:B,logger:m,requestor:A,start:function(){b&&(N&&N.start(),F.start());},enqueueEvent:Z,getFlagsInternal:function(){return J},getEnvironmentId:function(){return k},internalChangeEventName:"internal-change"}}function Ce(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function qe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r);}return t}function Ve(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?qe(Object(t),!0).forEach((function(n){Ce(e,n,t[n]);})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):qe(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n));}));}return e}var _e={promise:Promise.resolve({status:200,header:function(){return null},body:null})};function Je(e,n,t,r,o){if(o&&!function(){var e=window.navigator&&window.navigator.userAgent;if(e){var n=e.match(/Chrom(e|ium)\/([0-9]+)\./);if(n)return parseInt(n[2],10)<73}return !0}())return _e;var i=new window.XMLHttpRequest;for(var a in i.open(e,n,!o),t||{})Object.prototype.hasOwnProperty.call(t,a)&&i.setRequestHeader(a,t[a]);if(o)return i.send(r),_e;var u;return {promise:new Promise((function(e,n){i.addEventListener("load",(function(){u||e({status:i.status,header:function(e){return i.getResponseHeader(e)},body:i.responseText});})),i.addEventListener("error",(function(){u||n(new Error);})),i.send(r);})),cancel:function(){u=!0,i.abort();}}}function ze(e){var n,t={synchronousFlush:!1};if(window.XMLHttpRequest){var r=e&&e.disableSyncEventPost;t.httpRequest=function(e,n,o,i){var a=t.synchronousFlush&!r;return t.synchronousFlush=!1,Je(e,n,o,i,a)};}t.httpAllowsPost=function(){return void 0===n&&(n=!!window.XMLHttpRequest&&"withCredentials"in new window.XMLHttpRequest),n},t.httpFallbackPing=function(e){(new window.Image).src=e;};var o,i=e&&e.eventUrlTransformer;t.getCurrentUrl=function(){return i?i(window.location.href):window.location.href},t.isDoNotTrack=function(){var e;return 1===(e=window.navigator&&void 0!==window.navigator.doNotTrack?window.navigator.doNotTrack:window.navigator&&void 0!==window.navigator.msDoNotTrack?window.navigator.msDoNotTrack:window.doNotTrack)||!0===e||"1"===e||"yes"===e};try{window.localStorage&&(t.localStorage={get:function(e){return new Promise((function(n){n(window.localStorage.getItem(e));}))},set:function(e,n){return new Promise((function(t){window.localStorage.setItem(e,n),t();}))},clear:function(e){return new Promise((function(n){window.localStorage.removeItem(e),n();}))}});}catch(e){t.localStorage=null;}if(e&&e.useReport&&"function"==typeof window.EventSourcePolyfill&&window.EventSourcePolyfill.supportedOptions&&window.EventSourcePolyfill.supportedOptions.method?(t.eventSourceAllowsReport=!0,o=window.EventSourcePolyfill):(t.eventSourceAllowsReport=!1,o=window.EventSource),window.EventSource){var a=3e5;t.eventSourceFactory=function(e,n){var t=Ve(Ve({},{heartbeatTimeout:a,silentTimeout:a,skipDefaultHeaders:!0}),n);return new o(e,t)},t.eventSourceIsActive=function(e){return e.readyState===window.EventSource.OPEN||e.readyState===window.EventSource.CONNECTING};}return t.userAgent="JSClient",t.version="2.20.2",t.diagnosticSdkData={name:"js-client-sdk",version:"2.20.2"},t.diagnosticPlatformData={name:"JS"},t.diagnosticUseCombinedEvent=!0,t}var Me=/[|\\{}()[\]^$+*?.]/g,He=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(Me,"\\$&")};function Ke(e,n,t,r){var o,i,a=(("substring"===e.kind||"regex"===e.kind)&&r.includes("/")?n:n.replace(r,"")).replace(t,"");switch(e.kind){case"exact":i=n,o=new RegExp("^"+He(e.url)+"/?$");break;case"canonical":i=a,o=new RegExp("^"+He(e.url)+"/?$");break;case"substring":i=a,o=new RegExp(".*"+He(e.substring)+".*$");break;case"regex":i=a,o=new RegExp(e.pattern);break;default:return !1}return o.test(i)}function $e(e,n){for(var t={},r=null,o=[],i=0;i<e.length;i++)for(var a=e[i],u=a.urls||[],s=0;s<u.length;s++)if(Ke(u[s],window.location.href,window.location.search,window.location.hash)){"pageview"===a.kind?n("pageview",a):(o.push(a),n("click_pageview",a));break}return o.length>0&&(r=function(e){for(var t=function(e,n){for(var t=[],r=0;r<n.length;r++)for(var o=e.target,i=n[r],a=i.selector,u=document.querySelectorAll(a);o&&u.length>0;){for(var s=0;s<u.length;s++)o===u[s]&&t.push(i);o=o.parentNode;}return t}(e,o),r=0;r<t.length;r++)n("click",t[r]);},document.addEventListener("click",r)),t.dispose=function(){document.removeEventListener("click",r);},t}function Be(e,n){var t,r;function o(){r&&r.dispose(),t&&t.length&&(r=$e(t,i));}function i(n,t){var r=e.ident.getUser(),o={kind:n,key:t.key,data:null,url:window.location.href,user:r,creationDate:(new Date).getTime()};return r&&r.anonymous&&(o.contextKind="anonymousUser"),"click"===n&&(o.selector=t.selector),e.enqueueEvent(o)}return e.requestor.fetchJSON("/sdk/goals/"+e.getEnvironmentId()).then((function(e){e&&e.length>0&&(r=$e(t=e,i),function(e,n){var t,r=window.location.href;function o(){(t=window.location.href)!==r&&(r=t,n());}!function e(n,t){n(),setTimeout((function(){e(n,t);}),t);}(o,e),window.history&&window.history.pushState?window.addEventListener("popstate",o):window.addEventListener("hashchange",o);}(300,o)),n();})).catch((function(t){e.emitter.maybeReportError(new g.LDUnexpectedResponseError((t&&t.message,t.message))),n();})),{}}var Ge={fetchGoals:{default:!0},hash:{type:"string"},eventProcessor:{type:"object"},eventUrlTransformer:{type:"function"},disableSyncEventPost:{default:!1}};function Xe(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=ze(t),o=Ae(e,n,t,r,Ge),i=o.client,a=o.options,u=o.emitter,s=new Promise((function(e){var n=u.on("goalsReady",(function(){u.off("goalsReady",n),e();}));}));i.waitUntilGoalsReady=function(){return s},a.fetchGoals?Be(o,(function(){return u.emit("goalsReady")})):u.emit("goalsReady"),"complete"!==document.readyState?window.addEventListener("load",o.start):o.start();var c=function(){r.synchronousFlush=!0,i.flush().catch((function(){})),r.synchronousFlush=!1;};return window.addEventListener("beforeunload",c),window.addEventListener("unload",c),i}var Ye={initialize:function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return console&&console.warn&&console.warn(Oe.deprecated("default export","named LDClient export")),Xe(e,n,t)},version:"2.20.2"};
|
|
15854
|
+
|
|
15855
|
+
/**
|
|
15856
|
+
* lodash (Custom Build) <https://lodash.com/>
|
|
15857
|
+
* Build: `lodash modularize exports="npm" -o ./`
|
|
15858
|
+
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
|
15859
|
+
* Released under MIT license <https://lodash.com/license>
|
|
15860
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
15861
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
15862
|
+
*/
|
|
15863
|
+
|
|
15864
|
+
/** Used as references for various `Number` constants. */
|
|
15865
|
+
var INFINITY = 1 / 0;
|
|
15866
|
+
|
|
15867
|
+
/** `Object#toString` result references. */
|
|
15868
|
+
var symbolTag = '[object Symbol]';
|
|
15869
|
+
|
|
15870
|
+
/** Used to match words composed of alphanumeric characters. */
|
|
15871
|
+
var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
|
|
15872
|
+
|
|
15873
|
+
/** Used to match Latin Unicode letters (excluding mathematical operators). */
|
|
15874
|
+
var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
|
|
15875
|
+
|
|
15876
|
+
/** Used to compose unicode character classes. */
|
|
15877
|
+
var rsAstralRange = '\\ud800-\\udfff',
|
|
15878
|
+
rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23',
|
|
15879
|
+
rsComboSymbolsRange = '\\u20d0-\\u20f0',
|
|
15880
|
+
rsDingbatRange = '\\u2700-\\u27bf',
|
|
15881
|
+
rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
|
|
15882
|
+
rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
|
|
15883
|
+
rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
|
|
15884
|
+
rsPunctuationRange = '\\u2000-\\u206f',
|
|
15885
|
+
rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
|
|
15886
|
+
rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
|
|
15887
|
+
rsVarRange = '\\ufe0e\\ufe0f',
|
|
15888
|
+
rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
|
|
15889
|
+
|
|
15890
|
+
/** Used to compose unicode capture groups. */
|
|
15891
|
+
var rsApos = "['\u2019]",
|
|
15892
|
+
rsAstral = '[' + rsAstralRange + ']',
|
|
15893
|
+
rsBreak = '[' + rsBreakRange + ']',
|
|
15894
|
+
rsCombo = '[' + rsComboMarksRange + rsComboSymbolsRange + ']',
|
|
15895
|
+
rsDigits = '\\d+',
|
|
15896
|
+
rsDingbat = '[' + rsDingbatRange + ']',
|
|
15897
|
+
rsLower = '[' + rsLowerRange + ']',
|
|
15898
|
+
rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
|
|
15899
|
+
rsFitz = '\\ud83c[\\udffb-\\udfff]',
|
|
15900
|
+
rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
|
|
15901
|
+
rsNonAstral = '[^' + rsAstralRange + ']',
|
|
15902
|
+
rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
|
|
15903
|
+
rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
|
|
15904
|
+
rsUpper = '[' + rsUpperRange + ']',
|
|
15905
|
+
rsZWJ = '\\u200d';
|
|
15906
|
+
|
|
15907
|
+
/** Used to compose unicode regexes. */
|
|
15908
|
+
var rsLowerMisc = '(?:' + rsLower + '|' + rsMisc + ')',
|
|
15909
|
+
rsUpperMisc = '(?:' + rsUpper + '|' + rsMisc + ')',
|
|
15910
|
+
rsOptLowerContr = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
|
|
15911
|
+
rsOptUpperContr = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
|
|
15912
|
+
reOptMod = rsModifier + '?',
|
|
15913
|
+
rsOptVar = '[' + rsVarRange + ']?',
|
|
15914
|
+
rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
|
|
15915
|
+
rsSeq = rsOptVar + reOptMod + rsOptJoin,
|
|
15916
|
+
rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,
|
|
15917
|
+
rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
|
|
15918
|
+
|
|
15919
|
+
/** Used to match apostrophes. */
|
|
15920
|
+
var reApos = RegExp(rsApos, 'g');
|
|
15921
|
+
|
|
15922
|
+
/**
|
|
15923
|
+
* Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
|
|
15924
|
+
* [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
|
|
15925
|
+
*/
|
|
15926
|
+
var reComboMark = RegExp(rsCombo, 'g');
|
|
15927
|
+
|
|
15928
|
+
/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
|
|
15929
|
+
var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
|
|
15930
|
+
|
|
15931
|
+
/** Used to match complex or compound words. */
|
|
15932
|
+
var reUnicodeWord = RegExp([
|
|
15933
|
+
rsUpper + '?' + rsLower + '+' + rsOptLowerContr + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
|
|
15934
|
+
rsUpperMisc + '+' + rsOptUpperContr + '(?=' + [rsBreak, rsUpper + rsLowerMisc, '$'].join('|') + ')',
|
|
15935
|
+
rsUpper + '?' + rsLowerMisc + '+' + rsOptLowerContr,
|
|
15936
|
+
rsUpper + '+' + rsOptUpperContr,
|
|
15937
|
+
rsDigits,
|
|
15938
|
+
rsEmoji
|
|
15939
|
+
].join('|'), 'g');
|
|
15940
|
+
|
|
15941
|
+
/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
|
|
15942
|
+
var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboMarksRange + rsComboSymbolsRange + rsVarRange + ']');
|
|
15943
|
+
|
|
15944
|
+
/** Used to detect strings that need a more robust regexp to match words. */
|
|
15945
|
+
var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
|
|
15946
|
+
|
|
15947
|
+
/** Used to map Latin Unicode letters to basic Latin letters. */
|
|
15948
|
+
var deburredLetters = {
|
|
15949
|
+
// Latin-1 Supplement block.
|
|
15950
|
+
'\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
|
|
15951
|
+
'\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
|
|
15952
|
+
'\xc7': 'C', '\xe7': 'c',
|
|
15953
|
+
'\xd0': 'D', '\xf0': 'd',
|
|
15954
|
+
'\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
|
|
15955
|
+
'\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
|
|
15956
|
+
'\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
|
|
15957
|
+
'\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
|
|
15958
|
+
'\xd1': 'N', '\xf1': 'n',
|
|
15959
|
+
'\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
|
|
15960
|
+
'\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
|
|
15961
|
+
'\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
|
|
15962
|
+
'\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
|
|
15963
|
+
'\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
|
|
15964
|
+
'\xc6': 'Ae', '\xe6': 'ae',
|
|
15965
|
+
'\xde': 'Th', '\xfe': 'th',
|
|
15966
|
+
'\xdf': 'ss',
|
|
15967
|
+
// Latin Extended-A block.
|
|
15968
|
+
'\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
|
|
15969
|
+
'\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
|
|
15970
|
+
'\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
|
|
15971
|
+
'\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
|
|
15972
|
+
'\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
|
|
15973
|
+
'\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
|
|
15974
|
+
'\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
|
|
15975
|
+
'\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
|
|
15976
|
+
'\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
|
|
15977
|
+
'\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
|
|
15978
|
+
'\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
|
|
15979
|
+
'\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
|
|
15980
|
+
'\u0134': 'J', '\u0135': 'j',
|
|
15981
|
+
'\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
|
|
15982
|
+
'\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
|
|
15983
|
+
'\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
|
|
15984
|
+
'\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
|
|
15985
|
+
'\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
|
|
15986
|
+
'\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
|
|
15987
|
+
'\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
|
|
15988
|
+
'\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
|
|
15989
|
+
'\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
|
|
15990
|
+
'\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
|
|
15991
|
+
'\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
|
|
15992
|
+
'\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
|
|
15993
|
+
'\u0163': 't', '\u0165': 't', '\u0167': 't',
|
|
15994
|
+
'\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
|
|
15995
|
+
'\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
|
|
15996
|
+
'\u0174': 'W', '\u0175': 'w',
|
|
15997
|
+
'\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
|
|
15998
|
+
'\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
|
|
15999
|
+
'\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
|
|
16000
|
+
'\u0132': 'IJ', '\u0133': 'ij',
|
|
16001
|
+
'\u0152': 'Oe', '\u0153': 'oe',
|
|
16002
|
+
'\u0149': "'n", '\u017f': 'ss'
|
|
16003
|
+
};
|
|
16004
|
+
|
|
16005
|
+
/** Detect free variable `global` from Node.js. */
|
|
16006
|
+
var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
|
16007
|
+
|
|
16008
|
+
/** Detect free variable `self`. */
|
|
16009
|
+
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
|
16010
|
+
|
|
16011
|
+
/** Used as a reference to the global object. */
|
|
16012
|
+
var root = freeGlobal || freeSelf || Function('return this')();
|
|
16013
|
+
|
|
16014
|
+
/**
|
|
16015
|
+
* A specialized version of `_.reduce` for arrays without support for
|
|
16016
|
+
* iteratee shorthands.
|
|
16017
|
+
*
|
|
16018
|
+
* @private
|
|
16019
|
+
* @param {Array} [array] The array to iterate over.
|
|
16020
|
+
* @param {Function} iteratee The function invoked per iteration.
|
|
16021
|
+
* @param {*} [accumulator] The initial value.
|
|
16022
|
+
* @param {boolean} [initAccum] Specify using the first element of `array` as
|
|
16023
|
+
* the initial value.
|
|
16024
|
+
* @returns {*} Returns the accumulated value.
|
|
16025
|
+
*/
|
|
16026
|
+
function arrayReduce(array, iteratee, accumulator, initAccum) {
|
|
16027
|
+
var index = -1,
|
|
16028
|
+
length = array ? array.length : 0;
|
|
16029
|
+
|
|
16030
|
+
if (initAccum && length) {
|
|
16031
|
+
accumulator = array[++index];
|
|
16032
|
+
}
|
|
16033
|
+
while (++index < length) {
|
|
16034
|
+
accumulator = iteratee(accumulator, array[index], index, array);
|
|
16035
|
+
}
|
|
16036
|
+
return accumulator;
|
|
16037
|
+
}
|
|
16038
|
+
|
|
16039
|
+
/**
|
|
16040
|
+
* Converts an ASCII `string` to an array.
|
|
16041
|
+
*
|
|
16042
|
+
* @private
|
|
16043
|
+
* @param {string} string The string to convert.
|
|
16044
|
+
* @returns {Array} Returns the converted array.
|
|
16045
|
+
*/
|
|
16046
|
+
function asciiToArray(string) {
|
|
16047
|
+
return string.split('');
|
|
16048
|
+
}
|
|
16049
|
+
|
|
16050
|
+
/**
|
|
16051
|
+
* Splits an ASCII `string` into an array of its words.
|
|
16052
|
+
*
|
|
16053
|
+
* @private
|
|
16054
|
+
* @param {string} The string to inspect.
|
|
16055
|
+
* @returns {Array} Returns the words of `string`.
|
|
16056
|
+
*/
|
|
16057
|
+
function asciiWords(string) {
|
|
16058
|
+
return string.match(reAsciiWord) || [];
|
|
16059
|
+
}
|
|
16060
|
+
|
|
16061
|
+
/**
|
|
16062
|
+
* The base implementation of `_.propertyOf` without support for deep paths.
|
|
16063
|
+
*
|
|
16064
|
+
* @private
|
|
16065
|
+
* @param {Object} object The object to query.
|
|
16066
|
+
* @returns {Function} Returns the new accessor function.
|
|
16067
|
+
*/
|
|
16068
|
+
function basePropertyOf(object) {
|
|
16069
|
+
return function(key) {
|
|
16070
|
+
return object == null ? undefined : object[key];
|
|
16071
|
+
};
|
|
16072
|
+
}
|
|
16073
|
+
|
|
16074
|
+
/**
|
|
16075
|
+
* Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
|
|
16076
|
+
* letters to basic Latin letters.
|
|
16077
|
+
*
|
|
16078
|
+
* @private
|
|
16079
|
+
* @param {string} letter The matched letter to deburr.
|
|
16080
|
+
* @returns {string} Returns the deburred letter.
|
|
16081
|
+
*/
|
|
16082
|
+
var deburrLetter = basePropertyOf(deburredLetters);
|
|
16083
|
+
|
|
16084
|
+
/**
|
|
16085
|
+
* Checks if `string` contains Unicode symbols.
|
|
16086
|
+
*
|
|
16087
|
+
* @private
|
|
16088
|
+
* @param {string} string The string to inspect.
|
|
16089
|
+
* @returns {boolean} Returns `true` if a symbol is found, else `false`.
|
|
16090
|
+
*/
|
|
16091
|
+
function hasUnicode(string) {
|
|
16092
|
+
return reHasUnicode.test(string);
|
|
16093
|
+
}
|
|
16094
|
+
|
|
16095
|
+
/**
|
|
16096
|
+
* Checks if `string` contains a word composed of Unicode symbols.
|
|
16097
|
+
*
|
|
16098
|
+
* @private
|
|
16099
|
+
* @param {string} string The string to inspect.
|
|
16100
|
+
* @returns {boolean} Returns `true` if a word is found, else `false`.
|
|
16101
|
+
*/
|
|
16102
|
+
function hasUnicodeWord(string) {
|
|
16103
|
+
return reHasUnicodeWord.test(string);
|
|
16104
|
+
}
|
|
16105
|
+
|
|
16106
|
+
/**
|
|
16107
|
+
* Converts `string` to an array.
|
|
16108
|
+
*
|
|
16109
|
+
* @private
|
|
16110
|
+
* @param {string} string The string to convert.
|
|
16111
|
+
* @returns {Array} Returns the converted array.
|
|
16112
|
+
*/
|
|
16113
|
+
function stringToArray(string) {
|
|
16114
|
+
return hasUnicode(string)
|
|
16115
|
+
? unicodeToArray(string)
|
|
16116
|
+
: asciiToArray(string);
|
|
16117
|
+
}
|
|
16118
|
+
|
|
16119
|
+
/**
|
|
16120
|
+
* Converts a Unicode `string` to an array.
|
|
16121
|
+
*
|
|
16122
|
+
* @private
|
|
16123
|
+
* @param {string} string The string to convert.
|
|
16124
|
+
* @returns {Array} Returns the converted array.
|
|
16125
|
+
*/
|
|
16126
|
+
function unicodeToArray(string) {
|
|
16127
|
+
return string.match(reUnicode) || [];
|
|
16128
|
+
}
|
|
16129
|
+
|
|
16130
|
+
/**
|
|
16131
|
+
* Splits a Unicode `string` into an array of its words.
|
|
16132
|
+
*
|
|
16133
|
+
* @private
|
|
16134
|
+
* @param {string} The string to inspect.
|
|
16135
|
+
* @returns {Array} Returns the words of `string`.
|
|
16136
|
+
*/
|
|
16137
|
+
function unicodeWords(string) {
|
|
16138
|
+
return string.match(reUnicodeWord) || [];
|
|
16139
|
+
}
|
|
16140
|
+
|
|
16141
|
+
/** Used for built-in method references. */
|
|
16142
|
+
var objectProto = Object.prototype;
|
|
16143
|
+
|
|
16144
|
+
/**
|
|
16145
|
+
* Used to resolve the
|
|
16146
|
+
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
16147
|
+
* of values.
|
|
16148
|
+
*/
|
|
16149
|
+
var objectToString = objectProto.toString;
|
|
16150
|
+
|
|
16151
|
+
/** Built-in value references. */
|
|
16152
|
+
var Symbol$1 = root.Symbol;
|
|
16153
|
+
|
|
16154
|
+
/** Used to convert symbols to primitives and strings. */
|
|
16155
|
+
var symbolProto = Symbol$1 ? Symbol$1.prototype : undefined,
|
|
16156
|
+
symbolToString = symbolProto ? symbolProto.toString : undefined;
|
|
16157
|
+
|
|
16158
|
+
/**
|
|
16159
|
+
* The base implementation of `_.slice` without an iteratee call guard.
|
|
16160
|
+
*
|
|
16161
|
+
* @private
|
|
16162
|
+
* @param {Array} array The array to slice.
|
|
16163
|
+
* @param {number} [start=0] The start position.
|
|
16164
|
+
* @param {number} [end=array.length] The end position.
|
|
16165
|
+
* @returns {Array} Returns the slice of `array`.
|
|
16166
|
+
*/
|
|
16167
|
+
function baseSlice(array, start, end) {
|
|
16168
|
+
var index = -1,
|
|
16169
|
+
length = array.length;
|
|
16170
|
+
|
|
16171
|
+
if (start < 0) {
|
|
16172
|
+
start = -start > length ? 0 : (length + start);
|
|
16173
|
+
}
|
|
16174
|
+
end = end > length ? length : end;
|
|
16175
|
+
if (end < 0) {
|
|
16176
|
+
end += length;
|
|
16177
|
+
}
|
|
16178
|
+
length = start > end ? 0 : ((end - start) >>> 0);
|
|
16179
|
+
start >>>= 0;
|
|
16180
|
+
|
|
16181
|
+
var result = Array(length);
|
|
16182
|
+
while (++index < length) {
|
|
16183
|
+
result[index] = array[index + start];
|
|
16184
|
+
}
|
|
16185
|
+
return result;
|
|
16186
|
+
}
|
|
16187
|
+
|
|
16188
|
+
/**
|
|
16189
|
+
* The base implementation of `_.toString` which doesn't convert nullish
|
|
16190
|
+
* values to empty strings.
|
|
16191
|
+
*
|
|
16192
|
+
* @private
|
|
16193
|
+
* @param {*} value The value to process.
|
|
16194
|
+
* @returns {string} Returns the string.
|
|
16195
|
+
*/
|
|
16196
|
+
function baseToString(value) {
|
|
16197
|
+
// Exit early for strings to avoid a performance hit in some environments.
|
|
16198
|
+
if (typeof value == 'string') {
|
|
16199
|
+
return value;
|
|
16200
|
+
}
|
|
16201
|
+
if (isSymbol(value)) {
|
|
16202
|
+
return symbolToString ? symbolToString.call(value) : '';
|
|
16203
|
+
}
|
|
16204
|
+
var result = (value + '');
|
|
16205
|
+
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
|
|
16206
|
+
}
|
|
16207
|
+
|
|
16208
|
+
/**
|
|
16209
|
+
* Casts `array` to a slice if it's needed.
|
|
16210
|
+
*
|
|
16211
|
+
* @private
|
|
16212
|
+
* @param {Array} array The array to inspect.
|
|
16213
|
+
* @param {number} start The start position.
|
|
16214
|
+
* @param {number} [end=array.length] The end position.
|
|
16215
|
+
* @returns {Array} Returns the cast slice.
|
|
16216
|
+
*/
|
|
16217
|
+
function castSlice(array, start, end) {
|
|
16218
|
+
var length = array.length;
|
|
16219
|
+
end = end === undefined ? length : end;
|
|
16220
|
+
return (!start && end >= length) ? array : baseSlice(array, start, end);
|
|
16221
|
+
}
|
|
16222
|
+
|
|
16223
|
+
/**
|
|
16224
|
+
* Creates a function like `_.lowerFirst`.
|
|
16225
|
+
*
|
|
16226
|
+
* @private
|
|
16227
|
+
* @param {string} methodName The name of the `String` case method to use.
|
|
16228
|
+
* @returns {Function} Returns the new case function.
|
|
16229
|
+
*/
|
|
16230
|
+
function createCaseFirst(methodName) {
|
|
16231
|
+
return function(string) {
|
|
16232
|
+
string = toString(string);
|
|
16233
|
+
|
|
16234
|
+
var strSymbols = hasUnicode(string)
|
|
16235
|
+
? stringToArray(string)
|
|
16236
|
+
: undefined;
|
|
16237
|
+
|
|
16238
|
+
var chr = strSymbols
|
|
16239
|
+
? strSymbols[0]
|
|
16240
|
+
: string.charAt(0);
|
|
16241
|
+
|
|
16242
|
+
var trailing = strSymbols
|
|
16243
|
+
? castSlice(strSymbols, 1).join('')
|
|
16244
|
+
: string.slice(1);
|
|
16245
|
+
|
|
16246
|
+
return chr[methodName]() + trailing;
|
|
16247
|
+
};
|
|
16248
|
+
}
|
|
16249
|
+
|
|
16250
|
+
/**
|
|
16251
|
+
* Creates a function like `_.camelCase`.
|
|
16252
|
+
*
|
|
16253
|
+
* @private
|
|
16254
|
+
* @param {Function} callback The function to combine each word.
|
|
16255
|
+
* @returns {Function} Returns the new compounder function.
|
|
16256
|
+
*/
|
|
16257
|
+
function createCompounder(callback) {
|
|
16258
|
+
return function(string) {
|
|
16259
|
+
return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
|
|
16260
|
+
};
|
|
16261
|
+
}
|
|
16262
|
+
|
|
16263
|
+
/**
|
|
16264
|
+
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
16265
|
+
* and has a `typeof` result of "object".
|
|
16266
|
+
*
|
|
16267
|
+
* @static
|
|
16268
|
+
* @memberOf _
|
|
16269
|
+
* @since 4.0.0
|
|
16270
|
+
* @category Lang
|
|
16271
|
+
* @param {*} value The value to check.
|
|
16272
|
+
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
16273
|
+
* @example
|
|
16274
|
+
*
|
|
16275
|
+
* _.isObjectLike({});
|
|
16276
|
+
* // => true
|
|
16277
|
+
*
|
|
16278
|
+
* _.isObjectLike([1, 2, 3]);
|
|
16279
|
+
* // => true
|
|
16280
|
+
*
|
|
16281
|
+
* _.isObjectLike(_.noop);
|
|
16282
|
+
* // => false
|
|
16283
|
+
*
|
|
16284
|
+
* _.isObjectLike(null);
|
|
16285
|
+
* // => false
|
|
16286
|
+
*/
|
|
16287
|
+
function isObjectLike(value) {
|
|
16288
|
+
return !!value && typeof value == 'object';
|
|
16289
|
+
}
|
|
16290
|
+
|
|
16291
|
+
/**
|
|
16292
|
+
* Checks if `value` is classified as a `Symbol` primitive or object.
|
|
16293
|
+
*
|
|
16294
|
+
* @static
|
|
16295
|
+
* @memberOf _
|
|
16296
|
+
* @since 4.0.0
|
|
16297
|
+
* @category Lang
|
|
16298
|
+
* @param {*} value The value to check.
|
|
16299
|
+
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
|
16300
|
+
* @example
|
|
16301
|
+
*
|
|
16302
|
+
* _.isSymbol(Symbol.iterator);
|
|
16303
|
+
* // => true
|
|
16304
|
+
*
|
|
16305
|
+
* _.isSymbol('abc');
|
|
16306
|
+
* // => false
|
|
16307
|
+
*/
|
|
16308
|
+
function isSymbol(value) {
|
|
16309
|
+
return typeof value == 'symbol' ||
|
|
16310
|
+
(isObjectLike(value) && objectToString.call(value) == symbolTag);
|
|
16311
|
+
}
|
|
16312
|
+
|
|
16313
|
+
/**
|
|
16314
|
+
* Converts `value` to a string. An empty string is returned for `null`
|
|
16315
|
+
* and `undefined` values. The sign of `-0` is preserved.
|
|
16316
|
+
*
|
|
16317
|
+
* @static
|
|
16318
|
+
* @memberOf _
|
|
16319
|
+
* @since 4.0.0
|
|
16320
|
+
* @category Lang
|
|
16321
|
+
* @param {*} value The value to process.
|
|
16322
|
+
* @returns {string} Returns the string.
|
|
16323
|
+
* @example
|
|
16324
|
+
*
|
|
16325
|
+
* _.toString(null);
|
|
16326
|
+
* // => ''
|
|
16327
|
+
*
|
|
16328
|
+
* _.toString(-0);
|
|
16329
|
+
* // => '-0'
|
|
16330
|
+
*
|
|
16331
|
+
* _.toString([1, 2, 3]);
|
|
16332
|
+
* // => '1,2,3'
|
|
16333
|
+
*/
|
|
16334
|
+
function toString(value) {
|
|
16335
|
+
return value == null ? '' : baseToString(value);
|
|
16336
|
+
}
|
|
16337
|
+
|
|
16338
|
+
/**
|
|
16339
|
+
* Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
|
|
16340
|
+
*
|
|
16341
|
+
* @static
|
|
16342
|
+
* @memberOf _
|
|
16343
|
+
* @since 3.0.0
|
|
16344
|
+
* @category String
|
|
16345
|
+
* @param {string} [string=''] The string to convert.
|
|
16346
|
+
* @returns {string} Returns the camel cased string.
|
|
16347
|
+
* @example
|
|
16348
|
+
*
|
|
16349
|
+
* _.camelCase('Foo Bar');
|
|
16350
|
+
* // => 'fooBar'
|
|
16351
|
+
*
|
|
16352
|
+
* _.camelCase('--foo-bar--');
|
|
16353
|
+
* // => 'fooBar'
|
|
16354
|
+
*
|
|
16355
|
+
* _.camelCase('__FOO_BAR__');
|
|
16356
|
+
* // => 'fooBar'
|
|
16357
|
+
*/
|
|
16358
|
+
var camelCase = createCompounder(function(result, word, index) {
|
|
16359
|
+
word = word.toLowerCase();
|
|
16360
|
+
return result + (index ? capitalize(word) : word);
|
|
16361
|
+
});
|
|
16362
|
+
|
|
16363
|
+
/**
|
|
16364
|
+
* Converts the first character of `string` to upper case and the remaining
|
|
16365
|
+
* to lower case.
|
|
16366
|
+
*
|
|
16367
|
+
* @static
|
|
16368
|
+
* @memberOf _
|
|
16369
|
+
* @since 3.0.0
|
|
16370
|
+
* @category String
|
|
16371
|
+
* @param {string} [string=''] The string to capitalize.
|
|
16372
|
+
* @returns {string} Returns the capitalized string.
|
|
16373
|
+
* @example
|
|
16374
|
+
*
|
|
16375
|
+
* _.capitalize('FRED');
|
|
16376
|
+
* // => 'Fred'
|
|
16377
|
+
*/
|
|
16378
|
+
function capitalize(string) {
|
|
16379
|
+
return upperFirst(toString(string).toLowerCase());
|
|
16380
|
+
}
|
|
16381
|
+
|
|
16382
|
+
/**
|
|
16383
|
+
* Deburrs `string` by converting
|
|
16384
|
+
* [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
|
|
16385
|
+
* and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
|
|
16386
|
+
* letters to basic Latin letters and removing
|
|
16387
|
+
* [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
|
|
16388
|
+
*
|
|
16389
|
+
* @static
|
|
16390
|
+
* @memberOf _
|
|
16391
|
+
* @since 3.0.0
|
|
16392
|
+
* @category String
|
|
16393
|
+
* @param {string} [string=''] The string to deburr.
|
|
16394
|
+
* @returns {string} Returns the deburred string.
|
|
16395
|
+
* @example
|
|
16396
|
+
*
|
|
16397
|
+
* _.deburr('déjà vu');
|
|
16398
|
+
* // => 'deja vu'
|
|
16399
|
+
*/
|
|
16400
|
+
function deburr(string) {
|
|
16401
|
+
string = toString(string);
|
|
16402
|
+
return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');
|
|
16403
|
+
}
|
|
16404
|
+
|
|
16405
|
+
/**
|
|
16406
|
+
* Converts the first character of `string` to upper case.
|
|
16407
|
+
*
|
|
16408
|
+
* @static
|
|
16409
|
+
* @memberOf _
|
|
16410
|
+
* @since 4.0.0
|
|
16411
|
+
* @category String
|
|
16412
|
+
* @param {string} [string=''] The string to convert.
|
|
16413
|
+
* @returns {string} Returns the converted string.
|
|
16414
|
+
* @example
|
|
16415
|
+
*
|
|
16416
|
+
* _.upperFirst('fred');
|
|
16417
|
+
* // => 'Fred'
|
|
16418
|
+
*
|
|
16419
|
+
* _.upperFirst('FRED');
|
|
16420
|
+
* // => 'FRED'
|
|
16421
|
+
*/
|
|
16422
|
+
var upperFirst = createCaseFirst('toUpperCase');
|
|
16423
|
+
|
|
16424
|
+
/**
|
|
16425
|
+
* Splits `string` into an array of its words.
|
|
16426
|
+
*
|
|
16427
|
+
* @static
|
|
16428
|
+
* @memberOf _
|
|
16429
|
+
* @since 3.0.0
|
|
16430
|
+
* @category String
|
|
16431
|
+
* @param {string} [string=''] The string to inspect.
|
|
16432
|
+
* @param {RegExp|string} [pattern] The pattern to match words.
|
|
16433
|
+
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
|
|
16434
|
+
* @returns {Array} Returns the words of `string`.
|
|
16435
|
+
* @example
|
|
16436
|
+
*
|
|
16437
|
+
* _.words('fred, barney, & pebbles');
|
|
16438
|
+
* // => ['fred', 'barney', 'pebbles']
|
|
16439
|
+
*
|
|
16440
|
+
* _.words('fred, barney, & pebbles', /[^, ]+/g);
|
|
16441
|
+
* // => ['fred', 'barney', '&', 'pebbles']
|
|
16442
|
+
*/
|
|
16443
|
+
function words(string, pattern, guard) {
|
|
16444
|
+
string = toString(string);
|
|
16445
|
+
pattern = guard ? undefined : pattern;
|
|
16446
|
+
|
|
16447
|
+
if (pattern === undefined) {
|
|
16448
|
+
return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
|
|
16449
|
+
}
|
|
16450
|
+
return string.match(pattern) || [];
|
|
16451
|
+
}
|
|
16452
|
+
|
|
16453
|
+
var lodash_camelcase = camelCase;
|
|
16454
|
+
|
|
16455
|
+
var utils = createCommonjsModule(function (module, exports) {
|
|
16456
|
+
var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
|
|
16457
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
16458
|
+
};
|
|
16459
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16460
|
+
exports.fetchFlags = exports.getFlattenedFlagsFromChangeset = exports.camelCaseKeys = void 0;
|
|
16461
|
+
var lodash_camelcase_1 = __importDefault(lodash_camelcase);
|
|
16462
|
+
|
|
16463
|
+
/**
|
|
16464
|
+
* Transforms a set of flags so that their keys are camelCased. This function ignores
|
|
16465
|
+
* flag keys which start with `$`.
|
|
16466
|
+
*
|
|
16467
|
+
* @param rawFlags A mapping of flag keys and their values
|
|
16468
|
+
* @return A transformed `LDFlagSet` with camelCased flag keys
|
|
16469
|
+
*/
|
|
16470
|
+
var camelCaseKeys = function (rawFlags) {
|
|
16471
|
+
var flags = {};
|
|
16472
|
+
for (var rawFlag in rawFlags) {
|
|
16473
|
+
// Exclude system keys
|
|
16474
|
+
if (rawFlag.indexOf('$') !== 0) {
|
|
16475
|
+
flags[(0, lodash_camelcase_1.default)(rawFlag)] = rawFlags[rawFlag]; // tslint:disable-line:no-unsafe-any
|
|
16476
|
+
}
|
|
16477
|
+
}
|
|
16478
|
+
return flags;
|
|
16479
|
+
};
|
|
16480
|
+
exports.camelCaseKeys = camelCaseKeys;
|
|
16481
|
+
/**
|
|
16482
|
+
* Gets the flags to pass to the provider from the changeset.
|
|
16483
|
+
*
|
|
16484
|
+
* @param changes the `LDFlagChangeset` from the ldClient onchange handler.
|
|
16485
|
+
* @param targetFlags if targetFlags are specified, changes to other flags are ignored and not returned in the
|
|
16486
|
+
* flattened `LDFlagSet`
|
|
16487
|
+
* @param reactOptions reactOptions.useCamelCaseFlagKeys determines whether to change the flag keys to camelCase
|
|
16488
|
+
* @return an `LDFlagSet` with the current flag values from the LDFlagChangeset filtered by `targetFlags`. The returned
|
|
16489
|
+
* object may be empty `{}` if none of the targetFlags were changed.
|
|
16490
|
+
*/
|
|
16491
|
+
var getFlattenedFlagsFromChangeset = function (changes, targetFlags, reactOptions) {
|
|
16492
|
+
var flattened = {};
|
|
16493
|
+
for (var key in changes) {
|
|
16494
|
+
if (!targetFlags || targetFlags[key] !== undefined) {
|
|
16495
|
+
// tslint:disable-next-line:no-unsafe-any
|
|
16496
|
+
var flagKey = reactOptions.useCamelCaseFlagKeys ? (0, lodash_camelcase_1.default)(key) : key;
|
|
16497
|
+
flattened[flagKey] = changes[key].current;
|
|
16498
|
+
}
|
|
16499
|
+
}
|
|
16500
|
+
return flattened;
|
|
16501
|
+
};
|
|
16502
|
+
exports.getFlattenedFlagsFromChangeset = getFlattenedFlagsFromChangeset;
|
|
16503
|
+
/**
|
|
16504
|
+
* Retrieves flag values.
|
|
16505
|
+
*
|
|
16506
|
+
* @param ldClient LaunchDarkly client
|
|
16507
|
+
* @param reactOptions Initialization options for the LaunchDarkly React SDK
|
|
16508
|
+
* @param targetFlags If specified, `launchdarkly-react-client-sdk` will only request and listen to these flags.
|
|
16509
|
+
*
|
|
16510
|
+
* @returns an `LDFlagSet` with the current flag values from LaunchDarkly filtered by `targetFlags`.
|
|
16511
|
+
*/
|
|
16512
|
+
var fetchFlags = function (ldClient, reactOptions, targetFlags) {
|
|
16513
|
+
if (reactOptions === void 0) { reactOptions = types$1.defaultReactOptions; }
|
|
16514
|
+
var rawFlags = {};
|
|
16515
|
+
if (targetFlags) {
|
|
16516
|
+
for (var flag in targetFlags) {
|
|
16517
|
+
rawFlags[flag] = ldClient.variation(flag, targetFlags[flag]);
|
|
16518
|
+
}
|
|
16519
|
+
}
|
|
16520
|
+
else {
|
|
16521
|
+
rawFlags = ldClient.allFlags();
|
|
16522
|
+
}
|
|
16523
|
+
return reactOptions.useCamelCaseFlagKeys ? (0, exports.camelCaseKeys)(rawFlags) : rawFlags;
|
|
16524
|
+
};
|
|
16525
|
+
exports.fetchFlags = fetchFlags;
|
|
16526
|
+
/**
|
|
16527
|
+
* @deprecated The `camelCaseKeys.camelCaseKeys` property will be removed in a future version,
|
|
16528
|
+
* please update your code to use the `camelCaseKeys` function directly.
|
|
16529
|
+
*/
|
|
16530
|
+
// tslint:disable-next-line deprecation
|
|
16531
|
+
exports.camelCaseKeys.camelCaseKeys = exports.camelCaseKeys;
|
|
16532
|
+
exports.default = { camelCaseKeys: exports.camelCaseKeys, getFlattenedFlagsFromChangeset: exports.getFlattenedFlagsFromChangeset, fetchFlags: exports.fetchFlags };
|
|
16533
|
+
|
|
16534
|
+
});
|
|
16535
|
+
|
|
16536
|
+
unwrapExports(utils);
|
|
16537
|
+
utils.fetchFlags;
|
|
16538
|
+
utils.getFlattenedFlagsFromChangeset;
|
|
16539
|
+
utils.camelCaseKeys;
|
|
16540
|
+
|
|
16541
|
+
var name = "launchdarkly-react-client-sdk";
|
|
16542
|
+
var version = "2.25.1";
|
|
16543
|
+
var description = "LaunchDarkly SDK for React";
|
|
16544
|
+
var author = "LaunchDarkly <team@launchdarkly.com>";
|
|
16545
|
+
var license = "Apache-2.0";
|
|
16546
|
+
var keywords = [
|
|
16547
|
+
"launchdarkly",
|
|
16548
|
+
"launch",
|
|
16549
|
+
"darkly",
|
|
16550
|
+
"react",
|
|
16551
|
+
"sdk",
|
|
16552
|
+
"bindings"
|
|
16553
|
+
];
|
|
16554
|
+
var main = "lib/index.js";
|
|
16555
|
+
var types = "lib/index.d.ts";
|
|
16556
|
+
var files = [
|
|
16557
|
+
"lib",
|
|
16558
|
+
"src",
|
|
16559
|
+
"!**/*.test.*",
|
|
16560
|
+
"!**/__snapshots__"
|
|
16561
|
+
];
|
|
16562
|
+
var scripts = {
|
|
16563
|
+
test: "jest",
|
|
16564
|
+
"test:junit": "jest --ci --reporters=default --reporters=jest-junit",
|
|
16565
|
+
build: "rimraf lib/* && tsc && mv lib/src/* lib && rimraf lib/package.json lib/src lib/*.test.*",
|
|
16566
|
+
lint: "tslint -p tsconfig.json 'src/**/*.ts*'",
|
|
16567
|
+
"lint:all": "npm run lint",
|
|
16568
|
+
"check-typescript": "tsc",
|
|
16569
|
+
prepublishOnly: "npm run build",
|
|
16570
|
+
prettier: "prettier --write 'src/*.@(js|ts|tsx|json|css)'",
|
|
16571
|
+
"link-dev": "./link-dev.sh"
|
|
16572
|
+
};
|
|
16573
|
+
var repository = {
|
|
16574
|
+
type: "git",
|
|
16575
|
+
url: "git://github.com/launchdarkly/react-client-sdk.git"
|
|
16576
|
+
};
|
|
16577
|
+
var homepage = "https://github.com/launchdarkly/react-client-sdk";
|
|
16578
|
+
var devDependencies = {
|
|
16579
|
+
"@testing-library/jest-dom": "^5.16.1",
|
|
16580
|
+
"@testing-library/react": "^12.1.2",
|
|
16581
|
+
"@types/enzyme": "^3.10.3",
|
|
16582
|
+
"@types/hoist-non-react-statics": "^3.3.1",
|
|
16583
|
+
"@types/jest": "^27.0.3",
|
|
16584
|
+
"@types/lodash.camelcase": "^4.3.6",
|
|
16585
|
+
"@types/prop-types": "^15.7.4",
|
|
16586
|
+
"@types/react": "^17.0.37",
|
|
16587
|
+
"@types/react-dom": "^17.0.11",
|
|
16588
|
+
"@types/react-test-renderer": "^17.0.1",
|
|
16589
|
+
"@types/uuid": "^3.4.5",
|
|
16590
|
+
enzyme: "^3.10.0",
|
|
16591
|
+
"enzyme-adapter-react-16": "^1.14.0",
|
|
16592
|
+
jest: "^27.4.4",
|
|
16593
|
+
"jest-environment-jsdom-global": "^3.0.0",
|
|
16594
|
+
"jest-junit": "^13.0.0",
|
|
16595
|
+
prettier: "^1.18.2",
|
|
16596
|
+
"prop-types": "^15.7.2",
|
|
16597
|
+
react: "^17.0.0",
|
|
16598
|
+
"react-dom": "^17.0.0",
|
|
16599
|
+
"react-test-renderer": "^17.0.2",
|
|
16600
|
+
rimraf: "^3.0.0",
|
|
16601
|
+
"ts-jest": "^27.1.1",
|
|
16602
|
+
tslint: "^6.1.3",
|
|
16603
|
+
"tslint-config-prettier": "^1.18.0",
|
|
16604
|
+
"tslint-plugin-prettier": "^2.3.0",
|
|
16605
|
+
typescript: "^4.5.3"
|
|
16606
|
+
};
|
|
16607
|
+
var dependencies = {
|
|
16608
|
+
"hoist-non-react-statics": "^3.3.2",
|
|
16609
|
+
"launchdarkly-js-client-sdk": "2.20.2",
|
|
16610
|
+
"lodash.camelcase": "^4.3.0",
|
|
16611
|
+
uuid: "^3.3.2"
|
|
16612
|
+
};
|
|
16613
|
+
var peerDependencies = {
|
|
16614
|
+
react: "^16.6.3 || ^17.0.0",
|
|
16615
|
+
"react-dom": "^16.8.4 || ^17.0.0"
|
|
16616
|
+
};
|
|
16617
|
+
var _resolved = "https://registry.npmjs.org/launchdarkly-react-client-sdk/-/launchdarkly-react-client-sdk-2.25.1.tgz";
|
|
16618
|
+
var _integrity = "sha512-OejNEZs8QvW1q/qn/ey1o6lfdLw3aW8tWfLucUmRTeazp0MtBXARnEZoqHWGmgRkRlxkTul3HqecksnoXC/wBg==";
|
|
16619
|
+
var _from = "launchdarkly-react-client-sdk@2.25.1";
|
|
16620
|
+
var _package = {
|
|
16621
|
+
name: name,
|
|
16622
|
+
version: version,
|
|
16623
|
+
description: description,
|
|
16624
|
+
author: author,
|
|
16625
|
+
license: license,
|
|
16626
|
+
keywords: keywords,
|
|
16627
|
+
main: main,
|
|
16628
|
+
types: types,
|
|
16629
|
+
files: files,
|
|
16630
|
+
scripts: scripts,
|
|
16631
|
+
repository: repository,
|
|
16632
|
+
homepage: homepage,
|
|
16633
|
+
devDependencies: devDependencies,
|
|
16634
|
+
dependencies: dependencies,
|
|
16635
|
+
peerDependencies: peerDependencies,
|
|
16636
|
+
_resolved: _resolved,
|
|
16637
|
+
_integrity: _integrity,
|
|
16638
|
+
_from: _from
|
|
16639
|
+
};
|
|
16640
|
+
|
|
16641
|
+
var _package$1 = /*#__PURE__*/Object.freeze({
|
|
16642
|
+
__proto__: null,
|
|
16643
|
+
name: name,
|
|
16644
|
+
version: version,
|
|
16645
|
+
description: description,
|
|
16646
|
+
author: author,
|
|
16647
|
+
license: license,
|
|
16648
|
+
keywords: keywords,
|
|
16649
|
+
main: main,
|
|
16650
|
+
types: types,
|
|
16651
|
+
files: files,
|
|
16652
|
+
scripts: scripts,
|
|
16653
|
+
repository: repository,
|
|
16654
|
+
homepage: homepage,
|
|
16655
|
+
devDependencies: devDependencies,
|
|
16656
|
+
dependencies: dependencies,
|
|
16657
|
+
peerDependencies: peerDependencies,
|
|
16658
|
+
_resolved: _resolved,
|
|
16659
|
+
_integrity: _integrity,
|
|
16660
|
+
_from: _from,
|
|
16661
|
+
'default': _package
|
|
16662
|
+
});
|
|
16663
|
+
|
|
16664
|
+
var package_json_1 = getCjsExportFromNamespace(_package$1);
|
|
16665
|
+
|
|
16666
|
+
var initLDClient_1 = createCommonjsModule(function (module, exports) {
|
|
16667
|
+
var __assign = (commonjsGlobal && commonjsGlobal.__assign) || function () {
|
|
16668
|
+
__assign = Object.assign || function(t) {
|
|
16669
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
16670
|
+
s = arguments[i];
|
|
16671
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
16672
|
+
t[p] = s[p];
|
|
16673
|
+
}
|
|
16674
|
+
return t;
|
|
16675
|
+
};
|
|
16676
|
+
return __assign.apply(this, arguments);
|
|
16677
|
+
};
|
|
16678
|
+
var __awaiter = (commonjsGlobal && commonjsGlobal.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
16679
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16680
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16681
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
16682
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
16683
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
16684
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
16685
|
+
});
|
|
16686
|
+
};
|
|
16687
|
+
var __generator = (commonjsGlobal && commonjsGlobal.__generator) || function (thisArg, body) {
|
|
16688
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
16689
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
16690
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
16691
|
+
function step(op) {
|
|
16692
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
16693
|
+
while (_) try {
|
|
16694
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
16695
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
16696
|
+
switch (op[0]) {
|
|
16697
|
+
case 0: case 1: t = op; break;
|
|
16698
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
16699
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
16700
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
16701
|
+
default:
|
|
16702
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
16703
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
16704
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
16705
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
16706
|
+
if (t[2]) _.ops.pop();
|
|
16707
|
+
_.trys.pop(); continue;
|
|
16708
|
+
}
|
|
16709
|
+
op = body.call(thisArg, _);
|
|
16710
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
16711
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
16712
|
+
}
|
|
16713
|
+
};
|
|
16714
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16715
|
+
|
|
16716
|
+
|
|
16717
|
+
|
|
16718
|
+
|
|
16719
|
+
/**
|
|
16720
|
+
* Internal function to initialize the `LDClient`.
|
|
16721
|
+
*
|
|
16722
|
+
* @param clientSideID Your project and environment specific client side ID
|
|
16723
|
+
* @param user A LaunchDarkly user object
|
|
16724
|
+
* @param reactOptions Initialization options for the LaunchDarkly React SDK
|
|
16725
|
+
* @param options LaunchDarkly initialization options
|
|
16726
|
+
* @param targetFlags If specified, `launchdarkly-react-client-sdk` will only request and listen to these flags.
|
|
16727
|
+
*
|
|
16728
|
+
* @see `ProviderConfig` for more details about the parameters
|
|
16729
|
+
* @return An initialized client and flags
|
|
16730
|
+
*/
|
|
16731
|
+
var initLDClient = function (clientSideID, user, reactOptions, options, targetFlags) {
|
|
16732
|
+
if (user === void 0) { user = { anonymous: true }; }
|
|
16733
|
+
if (reactOptions === void 0) { reactOptions = types$1.defaultReactOptions; }
|
|
16734
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
16735
|
+
var allOptions, ldClient;
|
|
16736
|
+
return __generator(this, function (_a) {
|
|
16737
|
+
allOptions = __assign({ wrapperName: 'react-client-sdk', wrapperVersion: package_json_1.version }, options);
|
|
16738
|
+
ldClient = (0, Ye.initialize)(clientSideID, user, allOptions);
|
|
16739
|
+
return [2 /*return*/, new Promise(function (resolve) {
|
|
16740
|
+
ldClient.on('ready', function () {
|
|
16741
|
+
var flags = (0, utils.fetchFlags)(ldClient, reactOptions, targetFlags);
|
|
16742
|
+
resolve({ flags: flags, ldClient: ldClient });
|
|
16743
|
+
});
|
|
16744
|
+
})];
|
|
16745
|
+
});
|
|
16746
|
+
});
|
|
16747
|
+
};
|
|
16748
|
+
exports.default = initLDClient;
|
|
16749
|
+
|
|
16750
|
+
});
|
|
16751
|
+
|
|
16752
|
+
unwrapExports(initLDClient_1);
|
|
16753
|
+
|
|
16754
|
+
var provider = createCommonjsModule(function (module, exports) {
|
|
16755
|
+
var __extends = (commonjsGlobal && commonjsGlobal.__extends) || (function () {
|
|
16756
|
+
var extendStatics = function (d, b) {
|
|
16757
|
+
extendStatics = Object.setPrototypeOf ||
|
|
16758
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
16759
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
16760
|
+
return extendStatics(d, b);
|
|
16761
|
+
};
|
|
16762
|
+
return function (d, b) {
|
|
16763
|
+
if (typeof b !== "function" && b !== null)
|
|
16764
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
16765
|
+
extendStatics(d, b);
|
|
16766
|
+
function __() { this.constructor = d; }
|
|
16767
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
16768
|
+
};
|
|
16769
|
+
})();
|
|
16770
|
+
var __assign = (commonjsGlobal && commonjsGlobal.__assign) || function () {
|
|
16771
|
+
__assign = Object.assign || function(t) {
|
|
16772
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
16773
|
+
s = arguments[i];
|
|
16774
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
16775
|
+
t[p] = s[p];
|
|
16776
|
+
}
|
|
16777
|
+
return t;
|
|
16778
|
+
};
|
|
16779
|
+
return __assign.apply(this, arguments);
|
|
16780
|
+
};
|
|
16781
|
+
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
16782
|
+
if (k2 === undefined) k2 = k;
|
|
16783
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
16784
|
+
}) : (function(o, m, k, k2) {
|
|
16785
|
+
if (k2 === undefined) k2 = k;
|
|
16786
|
+
o[k2] = m[k];
|
|
16787
|
+
}));
|
|
16788
|
+
var __setModuleDefault = (commonjsGlobal && commonjsGlobal.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
16789
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16790
|
+
}) : function(o, v) {
|
|
16791
|
+
o["default"] = v;
|
|
16792
|
+
});
|
|
16793
|
+
var __importStar = (commonjsGlobal && commonjsGlobal.__importStar) || function (mod) {
|
|
16794
|
+
if (mod && mod.__esModule) return mod;
|
|
16795
|
+
var result = {};
|
|
16796
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
16797
|
+
__setModuleDefault(result, mod);
|
|
16798
|
+
return result;
|
|
16799
|
+
};
|
|
16800
|
+
var __awaiter = (commonjsGlobal && commonjsGlobal.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
16801
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16802
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16803
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
16804
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
16805
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
16806
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
16807
|
+
});
|
|
16808
|
+
};
|
|
16809
|
+
var __generator = (commonjsGlobal && commonjsGlobal.__generator) || function (thisArg, body) {
|
|
16810
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
16811
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
16812
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
16813
|
+
function step(op) {
|
|
16814
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
16815
|
+
while (_) try {
|
|
16816
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
16817
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
16818
|
+
switch (op[0]) {
|
|
16819
|
+
case 0: case 1: t = op; break;
|
|
16820
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
16821
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
16822
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
16823
|
+
default:
|
|
16824
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
16825
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
16826
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
16827
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
16828
|
+
if (t[2]) _.ops.pop();
|
|
16829
|
+
_.trys.pop(); continue;
|
|
16830
|
+
}
|
|
16831
|
+
op = body.call(thisArg, _);
|
|
16832
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
16833
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
16834
|
+
}
|
|
16835
|
+
};
|
|
16836
|
+
var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
|
|
16837
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
16838
|
+
};
|
|
16839
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16840
|
+
var React$1 = __importStar(React);
|
|
16841
|
+
|
|
16842
|
+
|
|
16843
|
+
var initLDClient_1$1 = __importDefault(initLDClient_1);
|
|
16844
|
+
|
|
16845
|
+
/**
|
|
16846
|
+
* The `LDProvider` is a component which accepts a config object which is used to
|
|
16847
|
+
* initialize `launchdarkly-js-client-sdk`.
|
|
16848
|
+
*
|
|
16849
|
+
* This Provider does three things:
|
|
16850
|
+
* - It initializes the ldClient instance by calling `launchdarkly-js-client-sdk` initialize on `componentDidMount`
|
|
16851
|
+
* - It saves all flags and the ldClient instance in the context API
|
|
16852
|
+
* - It subscribes to flag changes and propagate them through the context API
|
|
16853
|
+
*
|
|
16854
|
+
* Because the `launchdarkly-js-client-sdk` in only initialized on `componentDidMount`, your flags and the
|
|
16855
|
+
* ldClient are only available after your app has mounted. This can result in a flicker due to flag changes at
|
|
16856
|
+
* startup time.
|
|
16857
|
+
*
|
|
16858
|
+
* This component can be used as a standalone provider. However, be mindful to only include the component once
|
|
16859
|
+
* within your application. This provider is used inside the `withLDProviderHOC` and can be used instead to initialize
|
|
16860
|
+
* the `launchdarkly-js-client-sdk`. For async initialization, check out the `asyncWithLDProvider` function
|
|
16861
|
+
*/
|
|
16862
|
+
var LDProvider = /** @class */ (function (_super) {
|
|
16863
|
+
__extends(LDProvider, _super);
|
|
16864
|
+
function LDProvider(props) {
|
|
16865
|
+
var _this = _super.call(this, props) || this;
|
|
16866
|
+
_this.getReactOptions = function () { return (__assign(__assign({}, types$1.defaultReactOptions), _this.props.reactOptions)); };
|
|
16867
|
+
_this.subscribeToChanges = function (ldClient) {
|
|
16868
|
+
var targetFlags = _this.props.flags;
|
|
16869
|
+
ldClient.on('change', function (changes) {
|
|
16870
|
+
var flattened = (0, utils.getFlattenedFlagsFromChangeset)(changes, targetFlags, _this.getReactOptions());
|
|
16871
|
+
if (Object.keys(flattened).length > 0) {
|
|
16872
|
+
_this.setState(function (_a) {
|
|
16873
|
+
var flags = _a.flags;
|
|
16874
|
+
return ({ flags: __assign(__assign({}, flags), flattened) });
|
|
16875
|
+
});
|
|
16876
|
+
}
|
|
16877
|
+
});
|
|
16878
|
+
};
|
|
16879
|
+
_this.initLDClient = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
16880
|
+
var _a, clientSideID, flags, options, user, ldClient, reactOptions, fetchedFlags, initialisedOutput;
|
|
16881
|
+
return __generator(this, function (_b) {
|
|
16882
|
+
switch (_b.label) {
|
|
16883
|
+
case 0:
|
|
16884
|
+
_a = this.props, clientSideID = _a.clientSideID, flags = _a.flags, options = _a.options, user = _a.user;
|
|
16885
|
+
return [4 /*yield*/, this.props.ldClient];
|
|
16886
|
+
case 1:
|
|
16887
|
+
ldClient = _b.sent();
|
|
16888
|
+
reactOptions = this.getReactOptions();
|
|
16889
|
+
if (!ldClient) return [3 /*break*/, 2];
|
|
16890
|
+
fetchedFlags = (0, utils.fetchFlags)(ldClient, reactOptions, flags);
|
|
16891
|
+
return [3 /*break*/, 4];
|
|
16892
|
+
case 2: return [4 /*yield*/, (0, initLDClient_1$1.default)(clientSideID, user, reactOptions, options, flags)];
|
|
16893
|
+
case 3:
|
|
16894
|
+
initialisedOutput = _b.sent();
|
|
16895
|
+
fetchedFlags = initialisedOutput.flags;
|
|
16896
|
+
ldClient = initialisedOutput.ldClient;
|
|
16897
|
+
_b.label = 4;
|
|
16898
|
+
case 4:
|
|
16899
|
+
this.setState({ flags: fetchedFlags, ldClient: ldClient });
|
|
16900
|
+
this.subscribeToChanges(ldClient);
|
|
16901
|
+
return [2 /*return*/];
|
|
16902
|
+
}
|
|
16903
|
+
});
|
|
16904
|
+
}); };
|
|
16905
|
+
var options = props.options;
|
|
16906
|
+
_this.state = {
|
|
16907
|
+
flags: {},
|
|
16908
|
+
ldClient: undefined,
|
|
16909
|
+
};
|
|
16910
|
+
if (options) {
|
|
16911
|
+
var bootstrap = options.bootstrap;
|
|
16912
|
+
if (bootstrap && bootstrap !== 'localStorage') {
|
|
16913
|
+
var useCamelCaseFlagKeys = _this.getReactOptions().useCamelCaseFlagKeys;
|
|
16914
|
+
var flags = useCamelCaseFlagKeys ? (0, utils.camelCaseKeys)(bootstrap) : bootstrap;
|
|
16915
|
+
_this.state = {
|
|
16916
|
+
flags: flags,
|
|
16917
|
+
ldClient: undefined,
|
|
16918
|
+
};
|
|
16919
|
+
}
|
|
16920
|
+
}
|
|
16921
|
+
return _this;
|
|
16922
|
+
}
|
|
16923
|
+
LDProvider.prototype.componentDidMount = function () {
|
|
16924
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
16925
|
+
var _a, user, deferInitialization;
|
|
16926
|
+
return __generator(this, function (_b) {
|
|
16927
|
+
switch (_b.label) {
|
|
16928
|
+
case 0:
|
|
16929
|
+
_a = this.props, user = _a.user, deferInitialization = _a.deferInitialization;
|
|
16930
|
+
if (deferInitialization && !user) {
|
|
16931
|
+
return [2 /*return*/];
|
|
16932
|
+
}
|
|
16933
|
+
return [4 /*yield*/, this.initLDClient()];
|
|
16934
|
+
case 1:
|
|
16935
|
+
_b.sent();
|
|
16936
|
+
return [2 /*return*/];
|
|
16937
|
+
}
|
|
16938
|
+
});
|
|
16939
|
+
});
|
|
16940
|
+
};
|
|
16941
|
+
LDProvider.prototype.componentDidUpdate = function (prevProps) {
|
|
16942
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
16943
|
+
var _a, user, deferInitialization, userJustLoaded;
|
|
16944
|
+
return __generator(this, function (_b) {
|
|
16945
|
+
switch (_b.label) {
|
|
16946
|
+
case 0:
|
|
16947
|
+
_a = this.props, user = _a.user, deferInitialization = _a.deferInitialization;
|
|
16948
|
+
userJustLoaded = !prevProps.user && user;
|
|
16949
|
+
if (!(deferInitialization && userJustLoaded)) return [3 /*break*/, 2];
|
|
16950
|
+
return [4 /*yield*/, this.initLDClient()];
|
|
16951
|
+
case 1:
|
|
16952
|
+
_b.sent();
|
|
16953
|
+
_b.label = 2;
|
|
16954
|
+
case 2: return [2 /*return*/];
|
|
16955
|
+
}
|
|
16956
|
+
});
|
|
16957
|
+
});
|
|
16958
|
+
};
|
|
16959
|
+
LDProvider.prototype.render = function () {
|
|
16960
|
+
return React$1.createElement(context_1.Provider, { value: this.state }, this.props.children);
|
|
16961
|
+
};
|
|
16962
|
+
return LDProvider;
|
|
16963
|
+
}(React$1.Component));
|
|
16964
|
+
exports.default = LDProvider;
|
|
16965
|
+
|
|
16966
|
+
});
|
|
16967
|
+
|
|
16968
|
+
unwrapExports(provider);
|
|
16969
|
+
|
|
16970
|
+
var withLDProvider_1 = createCommonjsModule(function (module, exports) {
|
|
16971
|
+
var __extends = (commonjsGlobal && commonjsGlobal.__extends) || (function () {
|
|
16972
|
+
var extendStatics = function (d, b) {
|
|
16973
|
+
extendStatics = Object.setPrototypeOf ||
|
|
16974
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
16975
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
16976
|
+
return extendStatics(d, b);
|
|
16977
|
+
};
|
|
16978
|
+
return function (d, b) {
|
|
16979
|
+
if (typeof b !== "function" && b !== null)
|
|
16980
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
16981
|
+
extendStatics(d, b);
|
|
16982
|
+
function __() { this.constructor = d; }
|
|
16983
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
16984
|
+
};
|
|
16985
|
+
})();
|
|
16986
|
+
var __assign = (commonjsGlobal && commonjsGlobal.__assign) || function () {
|
|
16987
|
+
__assign = Object.assign || function(t) {
|
|
16988
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
16989
|
+
s = arguments[i];
|
|
16990
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
16991
|
+
t[p] = s[p];
|
|
16992
|
+
}
|
|
16993
|
+
return t;
|
|
16994
|
+
};
|
|
16995
|
+
return __assign.apply(this, arguments);
|
|
16996
|
+
};
|
|
16997
|
+
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
16998
|
+
if (k2 === undefined) k2 = k;
|
|
16999
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
17000
|
+
}) : (function(o, m, k, k2) {
|
|
17001
|
+
if (k2 === undefined) k2 = k;
|
|
17002
|
+
o[k2] = m[k];
|
|
17003
|
+
}));
|
|
17004
|
+
var __setModuleDefault = (commonjsGlobal && commonjsGlobal.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17005
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
17006
|
+
}) : function(o, v) {
|
|
17007
|
+
o["default"] = v;
|
|
17008
|
+
});
|
|
17009
|
+
var __importStar = (commonjsGlobal && commonjsGlobal.__importStar) || function (mod) {
|
|
17010
|
+
if (mod && mod.__esModule) return mod;
|
|
17011
|
+
var result = {};
|
|
17012
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
17013
|
+
__setModuleDefault(result, mod);
|
|
17014
|
+
return result;
|
|
17015
|
+
};
|
|
17016
|
+
var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
|
|
17017
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
17018
|
+
};
|
|
17019
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17020
|
+
exports.withLDProvider = void 0;
|
|
17021
|
+
var React$1 = __importStar(React);
|
|
17022
|
+
|
|
17023
|
+
var provider_1 = __importDefault(provider);
|
|
17024
|
+
var hoist_non_react_statics_1 = __importDefault(hoistNonReactStatics_cjs);
|
|
17025
|
+
/**
|
|
17026
|
+
* `withLDProvider` is a function which accepts a config object which is used to
|
|
17027
|
+
* initialize `launchdarkly-js-client-sdk`.
|
|
17028
|
+
*
|
|
17029
|
+
* This HOC handles passing configuration to the `LDProvider`, which does the following:
|
|
17030
|
+
* - It initializes the ldClient instance by calling `launchdarkly-js-client-sdk` initialize on `componentDidMount`
|
|
17031
|
+
* - It saves all flags and the ldClient instance in the context API
|
|
17032
|
+
* - It subscribes to flag changes and propagate them through the context API
|
|
17033
|
+
*
|
|
17034
|
+
* The difference between `withLDProvider` and `asyncWithLDProvider` is that `withLDProvider` initializes
|
|
17035
|
+
* `launchdarkly-js-client-sdk` at `componentDidMount`. This means your flags and the ldClient are only available after
|
|
17036
|
+
* your app has mounted. This can result in a flicker due to flag changes at startup time.
|
|
17037
|
+
*
|
|
17038
|
+
* `asyncWithLDProvider` initializes `launchdarkly-js-client-sdk` at the entry point of your app prior to render.
|
|
17039
|
+
* This means that your flags and the ldClient are ready at the beginning of your app. This ensures your app does not
|
|
17040
|
+
* flicker due to flag changes at startup time.
|
|
17041
|
+
*
|
|
17042
|
+
* @param config - The configuration used to initialize LaunchDarkly's JS SDK
|
|
17043
|
+
* @return A function which accepts your root React component and returns a HOC
|
|
17044
|
+
*/
|
|
17045
|
+
function withLDProvider(config) {
|
|
17046
|
+
return function withLDProviderHoc(WrappedComponent) {
|
|
17047
|
+
var userReactOptions = config.reactOptions;
|
|
17048
|
+
var reactOptions = __assign(__assign({}, types$1.defaultReactOptions), userReactOptions);
|
|
17049
|
+
var providerProps = __assign(__assign({}, config), { reactOptions: reactOptions });
|
|
17050
|
+
var HoistedComponent = /** @class */ (function (_super) {
|
|
17051
|
+
__extends(HoistedComponent, _super);
|
|
17052
|
+
function HoistedComponent() {
|
|
17053
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
17054
|
+
}
|
|
17055
|
+
HoistedComponent.prototype.render = function () {
|
|
17056
|
+
return (React$1.createElement(provider_1.default, __assign({}, providerProps),
|
|
17057
|
+
React$1.createElement(WrappedComponent, __assign({}, this.props))));
|
|
17058
|
+
};
|
|
17059
|
+
return HoistedComponent;
|
|
17060
|
+
}(React$1.Component));
|
|
17061
|
+
(0, hoist_non_react_statics_1.default)(HoistedComponent, WrappedComponent);
|
|
17062
|
+
return HoistedComponent;
|
|
17063
|
+
};
|
|
17064
|
+
}
|
|
17065
|
+
exports.withLDProvider = withLDProvider;
|
|
17066
|
+
exports.default = withLDProvider;
|
|
17067
|
+
|
|
17068
|
+
});
|
|
17069
|
+
|
|
17070
|
+
unwrapExports(withLDProvider_1);
|
|
17071
|
+
withLDProvider_1.withLDProvider;
|
|
17072
|
+
|
|
17073
|
+
var asyncWithLDProvider_1 = createCommonjsModule(function (module, exports) {
|
|
17074
|
+
var __assign = (commonjsGlobal && commonjsGlobal.__assign) || function () {
|
|
17075
|
+
__assign = Object.assign || function(t) {
|
|
17076
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
17077
|
+
s = arguments[i];
|
|
17078
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
17079
|
+
t[p] = s[p];
|
|
17080
|
+
}
|
|
17081
|
+
return t;
|
|
17082
|
+
};
|
|
17083
|
+
return __assign.apply(this, arguments);
|
|
17084
|
+
};
|
|
17085
|
+
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
17086
|
+
if (k2 === undefined) k2 = k;
|
|
17087
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
17088
|
+
}) : (function(o, m, k, k2) {
|
|
17089
|
+
if (k2 === undefined) k2 = k;
|
|
17090
|
+
o[k2] = m[k];
|
|
17091
|
+
}));
|
|
17092
|
+
var __setModuleDefault = (commonjsGlobal && commonjsGlobal.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17093
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
17094
|
+
}) : function(o, v) {
|
|
17095
|
+
o["default"] = v;
|
|
17096
|
+
});
|
|
17097
|
+
var __importStar = (commonjsGlobal && commonjsGlobal.__importStar) || function (mod) {
|
|
17098
|
+
if (mod && mod.__esModule) return mod;
|
|
17099
|
+
var result = {};
|
|
17100
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
17101
|
+
__setModuleDefault(result, mod);
|
|
17102
|
+
return result;
|
|
17103
|
+
};
|
|
17104
|
+
var __awaiter = (commonjsGlobal && commonjsGlobal.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
17105
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
17106
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17107
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
17108
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
17109
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
17110
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
17111
|
+
});
|
|
17112
|
+
};
|
|
17113
|
+
var __generator = (commonjsGlobal && commonjsGlobal.__generator) || function (thisArg, body) {
|
|
17114
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
17115
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
17116
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
17117
|
+
function step(op) {
|
|
17118
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17119
|
+
while (_) try {
|
|
17120
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
17121
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
17122
|
+
switch (op[0]) {
|
|
17123
|
+
case 0: case 1: t = op; break;
|
|
17124
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
17125
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
17126
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
17127
|
+
default:
|
|
17128
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
17129
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
17130
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
17131
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
17132
|
+
if (t[2]) _.ops.pop();
|
|
17133
|
+
_.trys.pop(); continue;
|
|
17134
|
+
}
|
|
17135
|
+
op = body.call(thisArg, _);
|
|
17136
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
17137
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
17138
|
+
}
|
|
17139
|
+
};
|
|
17140
|
+
var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
|
|
17141
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
17142
|
+
};
|
|
17143
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17144
|
+
var react_1 = __importStar(React);
|
|
17145
|
+
|
|
17146
|
+
|
|
17147
|
+
var initLDClient_1$1 = __importDefault(initLDClient_1);
|
|
17148
|
+
|
|
17149
|
+
/**
|
|
17150
|
+
* This is an async function which initializes LaunchDarkly's JS SDK (`launchdarkly-js-client-sdk`)
|
|
17151
|
+
* and awaits it so all flags and the ldClient are ready before the consumer app is rendered.
|
|
17152
|
+
*
|
|
17153
|
+
* The difference between `withLDProvider` and `asyncWithLDProvider` is that `withLDProvider` initializes
|
|
17154
|
+
* `launchdarkly-js-client-sdk` at componentDidMount. This means your flags and the ldClient are only available after
|
|
17155
|
+
* your app has mounted. This can result in a flicker due to flag changes at startup time.
|
|
17156
|
+
*
|
|
17157
|
+
* `asyncWithLDProvider` initializes `launchdarkly-js-client-sdk` at the entry point of your app prior to render.
|
|
17158
|
+
* This means that your flags and the ldClient are ready at the beginning of your app. This ensures your app does not
|
|
17159
|
+
* flicker due to flag changes at startup time.
|
|
17160
|
+
*
|
|
17161
|
+
* `asyncWithLDProvider` accepts a config object which is used to initialize `launchdarkly-js-client-sdk`.
|
|
17162
|
+
*
|
|
17163
|
+
* `asyncWithLDProvider` does not support the `deferInitialization` config option because `asyncWithLDProvider` needs
|
|
17164
|
+
* to be initialized at the entry point prior to render to ensure your flags and the ldClient are ready at the beginning
|
|
17165
|
+
* of your app.
|
|
17166
|
+
*
|
|
17167
|
+
* It returns a provider which is a React FunctionComponent which:
|
|
17168
|
+
* - saves all flags and the ldClient instance in the context API
|
|
17169
|
+
* - subscribes to flag changes and propagate them through the context API
|
|
17170
|
+
*
|
|
17171
|
+
* @param config - The configuration used to initialize LaunchDarkly's JS SDK
|
|
17172
|
+
*/
|
|
17173
|
+
function asyncWithLDProvider(config) {
|
|
17174
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
17175
|
+
var clientSideID, user, targetFlags, options, userReactOptions, reactOptions, ldClient, LDProvider;
|
|
17176
|
+
return __generator(this, function (_a) {
|
|
17177
|
+
switch (_a.label) {
|
|
17178
|
+
case 0:
|
|
17179
|
+
clientSideID = config.clientSideID, user = config.user, targetFlags = config.flags, options = config.options, userReactOptions = config.reactOptions;
|
|
17180
|
+
reactOptions = __assign(__assign({}, types$1.defaultReactOptions), userReactOptions);
|
|
17181
|
+
return [4 /*yield*/, (0, initLDClient_1$1.default)(clientSideID, user, reactOptions, options, targetFlags)];
|
|
17182
|
+
case 1:
|
|
17183
|
+
ldClient = (_a.sent()).ldClient;
|
|
17184
|
+
LDProvider = function (_a) {
|
|
17185
|
+
var children = _a.children;
|
|
17186
|
+
var _b = (0, react_1.useState)({
|
|
17187
|
+
flags: (0, utils.fetchFlags)(ldClient, reactOptions, targetFlags),
|
|
17188
|
+
ldClient: ldClient,
|
|
17189
|
+
}), ldData = _b[0], setLDData = _b[1];
|
|
17190
|
+
(0, react_1.useEffect)(function () {
|
|
17191
|
+
if (options) {
|
|
17192
|
+
var bootstrap = options.bootstrap;
|
|
17193
|
+
if (bootstrap && bootstrap !== 'localStorage') {
|
|
17194
|
+
var bootstrappedFlags_1 = reactOptions.useCamelCaseFlagKeys ? (0, utils.camelCaseKeys)(bootstrap) : bootstrap;
|
|
17195
|
+
setLDData(function (prev) { return (__assign(__assign({}, prev), { flags: bootstrappedFlags_1 })); });
|
|
17196
|
+
}
|
|
17197
|
+
}
|
|
17198
|
+
ldClient.on('change', function (changes) {
|
|
17199
|
+
var flattened = (0, utils.getFlattenedFlagsFromChangeset)(changes, targetFlags, reactOptions);
|
|
17200
|
+
if (Object.keys(flattened).length > 0) {
|
|
17201
|
+
setLDData(function (prev) { return (__assign(__assign({}, prev), { flags: __assign(__assign({}, prev.flags), flattened) })); });
|
|
17202
|
+
}
|
|
17203
|
+
});
|
|
17204
|
+
}, []);
|
|
17205
|
+
return react_1.default.createElement(context_1.Provider, { value: ldData }, children);
|
|
17206
|
+
};
|
|
17207
|
+
return [2 /*return*/, LDProvider];
|
|
17208
|
+
}
|
|
17209
|
+
});
|
|
17210
|
+
});
|
|
17211
|
+
}
|
|
17212
|
+
exports.default = asyncWithLDProvider;
|
|
17213
|
+
|
|
17214
|
+
});
|
|
17215
|
+
|
|
17216
|
+
unwrapExports(asyncWithLDProvider_1);
|
|
17217
|
+
|
|
17218
|
+
var withLDConsumer_1 = createCommonjsModule(function (module, exports) {
|
|
17219
|
+
var __assign = (commonjsGlobal && commonjsGlobal.__assign) || function () {
|
|
17220
|
+
__assign = Object.assign || function(t) {
|
|
17221
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
17222
|
+
s = arguments[i];
|
|
17223
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
17224
|
+
t[p] = s[p];
|
|
17225
|
+
}
|
|
17226
|
+
return t;
|
|
17227
|
+
};
|
|
17228
|
+
return __assign.apply(this, arguments);
|
|
17229
|
+
};
|
|
17230
|
+
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
17231
|
+
if (k2 === undefined) k2 = k;
|
|
17232
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
17233
|
+
}) : (function(o, m, k, k2) {
|
|
17234
|
+
if (k2 === undefined) k2 = k;
|
|
17235
|
+
o[k2] = m[k];
|
|
17236
|
+
}));
|
|
17237
|
+
var __setModuleDefault = (commonjsGlobal && commonjsGlobal.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17238
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
17239
|
+
}) : function(o, v) {
|
|
17240
|
+
o["default"] = v;
|
|
17241
|
+
});
|
|
17242
|
+
var __importStar = (commonjsGlobal && commonjsGlobal.__importStar) || function (mod) {
|
|
17243
|
+
if (mod && mod.__esModule) return mod;
|
|
17244
|
+
var result = {};
|
|
17245
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
17246
|
+
__setModuleDefault(result, mod);
|
|
17247
|
+
return result;
|
|
17248
|
+
};
|
|
17249
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17250
|
+
var React$1 = __importStar(React);
|
|
17251
|
+
|
|
17252
|
+
/**
|
|
17253
|
+
* withLDConsumer is a function which accepts an optional options object and returns a function
|
|
17254
|
+
* which accepts your React component. This function returns a HOC with flags
|
|
17255
|
+
* and the ldClient instance injected via props.
|
|
17256
|
+
*
|
|
17257
|
+
* @param options - If you need only the `ldClient` instance and not flags, then set `{ clientOnly: true }`
|
|
17258
|
+
* to only pass the ldClient prop to your component. Defaults to `{ clientOnly: false }`.
|
|
17259
|
+
* @return A HOC with flags and the `ldClient` instance injected via props
|
|
17260
|
+
*/
|
|
17261
|
+
function withLDConsumer(options) {
|
|
17262
|
+
if (options === void 0) { options = { clientOnly: false }; }
|
|
17263
|
+
return function withLDConsumerHoc(WrappedComponent) {
|
|
17264
|
+
return function (props) { return (React$1.createElement(context_1.Consumer, null, function (_a) {
|
|
17265
|
+
var flags = _a.flags, ldClient = _a.ldClient;
|
|
17266
|
+
if (options.clientOnly) {
|
|
17267
|
+
return React$1.createElement(WrappedComponent, __assign({ ldClient: ldClient }, props));
|
|
17268
|
+
}
|
|
17269
|
+
return React$1.createElement(WrappedComponent, __assign({ flags: flags, ldClient: ldClient }, props));
|
|
17270
|
+
})); };
|
|
17271
|
+
};
|
|
17272
|
+
}
|
|
17273
|
+
exports.default = withLDConsumer;
|
|
17274
|
+
|
|
17275
|
+
});
|
|
17276
|
+
|
|
17277
|
+
unwrapExports(withLDConsumer_1);
|
|
17278
|
+
|
|
17279
|
+
var useFlags_1 = createCommonjsModule(function (module, exports) {
|
|
17280
|
+
var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
|
|
17281
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
17282
|
+
};
|
|
17283
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17284
|
+
|
|
17285
|
+
var context_1$1 = __importDefault(context_1);
|
|
17286
|
+
/**
|
|
17287
|
+
* `useFlags` is a custom hook which returns all feature flags. It uses the `useContext` primitive
|
|
17288
|
+
* to access the LaunchDarkly context set up by `withLDProvider`. As such you will still need to
|
|
17289
|
+
* use the `withLDProvider` HOC at the root of your app to initialize the React SDK and populate the
|
|
17290
|
+
* context with `ldClient` and your flags.
|
|
17291
|
+
*
|
|
17292
|
+
* @return All the feature flags configured in your LaunchDarkly project
|
|
17293
|
+
*/
|
|
17294
|
+
var useFlags = function () {
|
|
17295
|
+
var flags = (0, React.useContext)(context_1$1.default).flags;
|
|
17296
|
+
return flags;
|
|
17297
|
+
};
|
|
17298
|
+
exports.default = useFlags;
|
|
17299
|
+
|
|
17300
|
+
});
|
|
17301
|
+
|
|
17302
|
+
unwrapExports(useFlags_1);
|
|
17303
|
+
|
|
17304
|
+
var useLDClient_1 = createCommonjsModule(function (module, exports) {
|
|
17305
|
+
var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
|
|
17306
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
17307
|
+
};
|
|
17308
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17309
|
+
|
|
17310
|
+
var context_1$1 = __importDefault(context_1);
|
|
17311
|
+
// tslint:disable:max-line-length
|
|
17312
|
+
/**
|
|
17313
|
+
* `useLDClient` is a custom hook which returns the underlying [LaunchDarkly JavaScript SDK client object](https://launchdarkly.github.io/js-client-sdk/interfaces/_launchdarkly_js_client_sdk_.ldclient.html).
|
|
17314
|
+
* Like the `useFlags` custom hook, `useLDClient` also uses the `useContext` primitive to access the LaunchDarkly
|
|
17315
|
+
* context set up by `withLDProvider`. You will still need to use the `withLDProvider` HOC
|
|
17316
|
+
* to initialise the react sdk to use this custom hook.
|
|
17317
|
+
*
|
|
17318
|
+
* @return The `launchdarkly-js-client-sdk` `LDClient` object
|
|
17319
|
+
*/
|
|
17320
|
+
// tslint:enable:max-line-length
|
|
17321
|
+
var useLDClient = function () {
|
|
17322
|
+
var ldClient = (0, React.useContext)(context_1$1.default).ldClient;
|
|
17323
|
+
return ldClient;
|
|
17324
|
+
};
|
|
17325
|
+
exports.default = useLDClient;
|
|
17326
|
+
|
|
17327
|
+
});
|
|
17328
|
+
|
|
17329
|
+
unwrapExports(useLDClient_1);
|
|
17330
|
+
|
|
17331
|
+
var lib$1 = createCommonjsModule(function (module, exports) {
|
|
17332
|
+
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
17333
|
+
if (k2 === undefined) k2 = k;
|
|
17334
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
17335
|
+
}) : (function(o, m, k, k2) {
|
|
17336
|
+
if (k2 === undefined) k2 = k;
|
|
17337
|
+
o[k2] = m[k];
|
|
17338
|
+
}));
|
|
17339
|
+
var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
|
|
17340
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
17341
|
+
};
|
|
17342
|
+
var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
|
|
17343
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
17344
|
+
};
|
|
17345
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17346
|
+
exports.withLDConsumer = exports.withLDProvider = exports.useLDClient = exports.useFlags = exports.camelCaseKeys = exports.asyncWithLDProvider = exports.LDProvider = void 0;
|
|
17347
|
+
var provider_1 = __importDefault(provider);
|
|
17348
|
+
exports.LDProvider = provider_1.default;
|
|
17349
|
+
var withLDProvider_1$1 = __importDefault(withLDProvider_1);
|
|
17350
|
+
exports.withLDProvider = withLDProvider_1$1.default;
|
|
17351
|
+
var asyncWithLDProvider_1$1 = __importDefault(asyncWithLDProvider_1);
|
|
17352
|
+
exports.asyncWithLDProvider = asyncWithLDProvider_1$1.default;
|
|
17353
|
+
var withLDConsumer_1$1 = __importDefault(withLDConsumer_1);
|
|
17354
|
+
exports.withLDConsumer = withLDConsumer_1$1.default;
|
|
17355
|
+
var useFlags_1$1 = __importDefault(useFlags_1);
|
|
17356
|
+
exports.useFlags = useFlags_1$1.default;
|
|
17357
|
+
var useLDClient_1$1 = __importDefault(useLDClient_1);
|
|
17358
|
+
exports.useLDClient = useLDClient_1$1.default;
|
|
17359
|
+
|
|
17360
|
+
Object.defineProperty(exports, "camelCaseKeys", { enumerable: true, get: function () { return utils.camelCaseKeys; } });
|
|
17361
|
+
__exportStar(types$1, exports);
|
|
17362
|
+
|
|
17363
|
+
});
|
|
17364
|
+
|
|
17365
|
+
unwrapExports(lib$1);
|
|
17366
|
+
lib$1.withLDConsumer;
|
|
17367
|
+
lib$1.withLDProvider;
|
|
17368
|
+
lib$1.useLDClient;
|
|
17369
|
+
lib$1.useFlags;
|
|
17370
|
+
lib$1.camelCaseKeys;
|
|
17371
|
+
lib$1.asyncWithLDProvider;
|
|
17372
|
+
var lib_7 = lib$1.LDProvider;
|
|
17373
|
+
|
|
15809
17374
|
/**
|
|
15810
17375
|
* Copyright 2015, Yahoo! Inc.
|
|
15811
17376
|
* Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
|
|
@@ -21160,7 +22725,7 @@ const NewVerificationInnerComponent = ({ locale, messages, programTheme, verific
|
|
|
21160
22725
|
return (
|
|
21161
22726
|
// Don't change locale, so we don't have to load pluralization data, which has complications. HD-560
|
|
21162
22727
|
React.createElement(IntlProvider, { locale: "en", key: locale, messages: messagesWithOptions, textComponent: CustomTextWrapper },
|
|
21163
|
-
React.createElement(CustomCssWrapperComponent, { styles: getCustomCss(programTheme) }, verificationService.isLoading ? (React.createElement(LoadingScreenComponent, { step: verificationService.loadingStep })) : (React.createElement("div", { className: rtlDetect_1.isRtlLang(modernizeLocale(locale)) ? "sid-rtl" : "sid-ltr" },
|
|
22728
|
+
React.createElement(CustomCssWrapperComponent, { styles: getCustomCss(programTheme) }, verificationService.isLoading ? (React.createElement(LoadingScreenComponent, { step: verificationService.loadingStep })) : (React.createElement("div", { className: `${rtlDetect_1.isRtlLang(modernizeLocale(locale)) ? "sid-rtl" : "sid-ltr"} sid-locale-${locale}` },
|
|
21164
22729
|
React.createElement(TestModeFlagComponent, { verificationService: verificationService }),
|
|
21165
22730
|
React.createElement(LoadStepComponent, { stepToLoad: verificationService.verificationResponse.currentStep, verificationService: verificationService }))))));
|
|
21166
22731
|
};
|
|
@@ -21216,7 +22781,7 @@ class NewVerification extends React.Component {
|
|
|
21216
22781
|
}
|
|
21217
22782
|
}
|
|
21218
22783
|
componentDidMount() {
|
|
21219
|
-
N(); // https://sheerid.atlassian.net/browse/UX-362
|
|
22784
|
+
N$1(); // https://sheerid.atlassian.net/browse/UX-362
|
|
21220
22785
|
maintainFocusInLightbox();
|
|
21221
22786
|
// Special-case, mocking the loading psuedo-step
|
|
21222
22787
|
if (isMockingLoading()) {
|
|
@@ -21287,8 +22852,9 @@ const VerificationForm = React.forwardRef(({ programId, trackingId = undefined }
|
|
|
21287
22852
|
};
|
|
21288
22853
|
}
|
|
21289
22854
|
return (React.createElement(Provider, { store: store },
|
|
21290
|
-
React.createElement(
|
|
21291
|
-
React.createElement(
|
|
22855
|
+
React.createElement(lib_7, { clientSideID: "6250a973e0272c14b3036d57" },
|
|
22856
|
+
React.createElement(FormWrapperComponent, null,
|
|
22857
|
+
React.createElement(NewVerificationComponent, { programId: programId, trackingId: trackingId })))));
|
|
21292
22858
|
});
|
|
21293
22859
|
|
|
21294
22860
|
const PrivacyPolicyLink = ({ verificationService, includeCompanyName, intl, }) => {
|