@customerio/cdp-analytics-browser 0.3.1 → 0.3.2
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/dist/cjs/generated/version.js +1 -1
- package/dist/cjs/plugins/routing-middleware/index.js +2 -1
- package/dist/cjs/plugins/routing-middleware/index.js.map +1 -1
- package/dist/cjs/vendor/tsub/tsub.js +645 -0
- package/dist/cjs/vendor/tsub/tsub.js.map +1 -0
- package/dist/cjs/vendor/tsub/types.js +3 -0
- package/dist/cjs/vendor/tsub/types.js.map +1 -0
- package/dist/pkg/generated/version.js +1 -1
- package/dist/pkg/plugins/routing-middleware/index.js +2 -1
- package/dist/pkg/plugins/routing-middleware/index.js.map +1 -1
- package/dist/pkg/vendor/tsub/tsub.js +645 -0
- package/dist/pkg/vendor/tsub/tsub.js.map +1 -0
- package/dist/pkg/vendor/tsub/types.js +2 -0
- package/dist/pkg/vendor/tsub/types.js.map +1 -0
- package/dist/types/core/buffer/index.d.ts +1 -1
- package/dist/types/generated/version.d.ts +1 -1
- package/dist/types/plugins/routing-middleware/index.d.ts +1 -1
- package/dist/types/plugins/routing-middleware/index.d.ts.map +1 -1
- package/dist/types/vendor/tsub/tsub.d.ts +1 -0
- package/dist/types/vendor/tsub/tsub.d.ts.map +1 -0
- package/dist/types/vendor/tsub/types.d.ts +20 -0
- package/dist/types/vendor/tsub/types.d.ts.map +1 -0
- package/dist/umd/index.js +1 -1
- package/dist/umd/index.js.gz +0 -0
- package/dist/umd/standalone.js +1 -1
- package/dist/umd/standalone.js.gz +0 -0
- package/dist/umd/tsub-middleware.js +1 -1
- package/dist/umd/tsub-middleware.js.gz +0 -0
- package/package.json +4 -3
- package/src/generated/version.ts +1 -1
- package/src/plugins/routing-middleware/index.ts +5 -4
- package/src/vendor/tsub/tsub.js.LICENSE.txt +53 -0
- package/src/vendor/tsub/tsub.ts +7 -0
- package/src/vendor/tsub/types.ts +19 -0
- package/dist/umd/870.js +0 -1
- package/dist/umd/870.js.gz +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_customerio_cdp_analytics_browser=self.webpackChunk_customerio_cdp_analytics_browser||[]).push([[604],{669:function(n,r,t){"use strict";t.r(r),t.d(r,{tsubMiddleware:function(){return o}});var e=t(2870),o=function(n){return function(r){var t=r.payload,o=r.integration,a=r.next;new e.Store(n).getRulesByDestinationName(o).forEach((function(n){for(var r=n.matchers,o=n.transformers,s=0;s<r.length;s++)if(e.matches(t.obj,r[s])&&(t.obj=e.transform(t.obj,o[s]),null===t.obj))return a(null)})),a(t)}}}}]);
|
|
1
|
+
(self.webpackChunk_customerio_cdp_analytics_browser=self.webpackChunk_customerio_cdp_analytics_browser||[]).push([[604],{669:function(t,r,n){"use strict";n.r(r),n.d(r,{tsubMiddleware:function(){return o}});var e=n(2248),o=function(t){return function(r){var n=r.payload,o=r.integration,i=r.next;new e.Store(t).getRulesByDestinationName(o).forEach((function(t){for(var r=t.matchers,o=t.transformers,u=0;u<r.length;u++)if(e.matches(n.obj,r[u])&&(n.obj=e.transform(n.obj,o[u]),null===n.obj))return i(null)})),i(n)}}},2248:function(t){"use strict";self,t.exports=function(){var t={2870:function(t,r,n){var e=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0}),r.Store=r.matches=r.transform=void 0;var o=n(4303);Object.defineProperty(r,"transform",{enumerable:!0,get:function(){return e(o).default}});var i=n(2370);Object.defineProperty(r,"matches",{enumerable:!0,get:function(){return e(i).default}});var u=n(1444);Object.defineProperty(r,"Store",{enumerable:!0,get:function(){return e(u).default}})},2370:function(t,r,n){var e=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var o=e(n(7843));function i(t,r){if(!Array.isArray(t))return!0===u(t,r);var n,e,o,s,p=t[0];switch(p){case"!":return!i(t[1],r);case"or":for(var l=1;l<t.length;l++)if(i(t[l],r))return!0;return!1;case"and":for(l=1;l<t.length;l++)if(!i(t[l],r))return!1;return!0;case"=":case"!=":return function(t,r,n,e){switch(a(t)&&(t=i(t,e)),a(r)&&(r=i(r,e)),"object"==typeof t&&"object"==typeof r&&(t=JSON.stringify(t),r=JSON.stringify(r)),n){case"=":return t===r;case"!=":return t!==r;default:throw new Error("Invalid operator in compareItems: ".concat(n))}}(u(t[1],r),u(t[2],r),p,r);case"<=":case"<":case">":case">=":return function(t,r,n,e){if(a(t)&&(t=i(t,e)),a(r)&&(r=i(r,e)),"number"!=typeof t||"number"!=typeof r)return!1;switch(n){case"<=":return t<=r;case">=":return t>=r;case"<":return t<r;case">":return t>r;default:throw new Error("Invalid operator in compareNumbers: ".concat(n))}}(u(t[1],r),u(t[2],r),p,r);case"in":return function(t,r,n){return void 0!==r.find((function(r){return u(r,n)===t}))}(u(t[1],r),u(t[2],r),r);case"contains":return o=u(t[1],r),s=u(t[2],r),"string"==typeof o&&"string"==typeof s&&-1!==o.indexOf(s);case"match":return n=u(t[1],r),e=u(t[2],r),"string"==typeof n&&"string"==typeof e&&function(t,r){var n,e;t:for(;t.length>0;){var o,i;if(o=(n=c(t)).star,i=n.chunk,t=n.pattern,o&&""===i)return!0;var u=f(i,r),a=u.t,s=u.ok,p=u.err;if(p)return!1;if(!s||!(0===a.length||t.length>0)){if(o)for(var l=0;l<r.length;l++){if(a=(e=f(i,r.slice(l+1))).t,s=e.ok,p=e.err,s){if(0===t.length&&a.length>0)continue;r=a;continue t}if(p)return!1}return!1}r=a}return 0===r.length}(e,n);case"lowercase":var v=u(t[1],r);return"string"!=typeof v?null:v.toLowerCase();case"typeof":return typeof u(t[1],r);case"length":return function(t){return null===t?0:Array.isArray(t)||"string"==typeof t?t.length:NaN}(u(t[1],r));default:throw new Error("FQL IR could not evaluate for token: ".concat(p))}}function u(t,r){return Array.isArray(t)?t:"object"==typeof t?t.value:(0,o.default)(r,t)}function a(t){return!!Array.isArray(t)&&(("lowercase"===t[0]||"length"===t[0]||"typeof"===t[0])&&2===t.length||("contains"===t[0]||"match"===t[0])&&3===t.length)}function c(t){for(var r={star:!1,chunk:"",pattern:""};t.length>0&&"*"===t[0];)t=t.slice(1),r.star=!0;var n,e=!1;t:for(n=0;n<t.length;n++)switch(t[n]){case"\\":n+1<t.length&&n++;break;case"[":e=!0;break;case"]":e=!1;break;case"*":if(!e)break t}return r.chunk=t.slice(0,n),r.pattern=t.slice(n),r}function f(t,r){for(var n,e,o={t:"",ok:!1,err:!1};t.length>0;){if(0===r.length)return o;switch(t[0]){case"[":var i=r[0];r=r.slice(1);var u=!0;(t=t.slice(1)).length>0&&"^"===t[0]&&(u=!1,t=t.slice(1));for(var a=!1,c=0;;){if(t.length>0&&"]"===t[0]&&c>0){t=t.slice(1);break}var f,p="";if(f=(n=s(t)).char,t=n.newChunk,n.err)return o;if(p=f,"-"===t[0]&&(p=(e=s(t.slice(1))).char,t=e.newChunk,e.err))return o;f<=i&&i<=p&&(a=!0),c++}if(a!==u)return o;break;case"?":r=r.slice(1),t=t.slice(1);break;case"\\":if(0===(t=t.slice(1)).length)return o.err=!0,o;default:if(t[0]!==r[0])return o;r=r.slice(1),t=t.slice(1)}}return o.t=r,o.ok=!0,o.err=!1,o}function s(t){var r={char:"",newChunk:"",err:!1};return 0===t.length||"-"===t[0]||"]"===t[0]||"\\"===t[0]&&0===(t=t.slice(1)).length?(r.err=!0,r):(r.char=t[0],r.newChunk=t.slice(1),0===r.newChunk.length&&(r.err=!0),r)}r.default=function(t,r){if(!r)throw new Error("No matcher supplied!");switch(r.type){case"all":return!0;case"fql":return function(t,r){if(!t)return!1;try{t=JSON.parse(t)}catch(r){throw new Error('Failed to JSON.parse FQL intermediate representation "'.concat(t,'": ').concat(r))}var n=i(t,r);return"boolean"==typeof n&&n}(r.ir,t);default:throw new Error("Matcher of type ".concat(r.type," unsupported."))}}},1444:function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=function(){function t(t){this.rules=[],this.rules=t||[]}return t.prototype.getRulesByDestinationName=function(t){for(var r=[],n=0,e=this.rules;n<e.length;n++){var o=e[n];o.destinationName!==t&&void 0!==o.destinationName||r.push(o)}return r},t}();r.default=n},4303:function(t,r,n){var e=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var o=e(n(2263)),i=e(n(7843)),u=e(n(5500)),a=n(2341),c=n(4966);function f(t,r){p(t,r.drop,(function(t,r){r.forEach((function(r){return delete t[r]}))}))}function s(t,r){p(t,r.allow,(function(t,r){Object.keys(t).forEach((function(n){r.includes(n)||delete t[n]}))}))}function p(t,r,n){Object.entries(r).forEach((function(r){var e=r[0],o=r[1],u=function(t){"object"==typeof t&&null!==t&&n(t,o)},a=""===e?t:(0,i.default)(t,e);Array.isArray(a)?a.forEach(u):u(a)}))}function l(t,r){var n=JSON.parse(JSON.stringify(t));for(var e in r.map)if(r.map.hasOwnProperty(e)){var o=r.map[e],u=e.split("."),f=void 0;if(u.length>1?(u.pop(),f=(0,i.default)(n,u.join("."))):f=t,"object"==typeof f){if(o.copy){var s=(0,i.default)(n,o.copy);void 0!==s&&(0,a.dset)(t,e,s)}else if(o.move){var p=(0,i.default)(n,o.move);void 0!==p&&(0,a.dset)(t,e,p),(0,c.unset)(t,o.move)}else o.hasOwnProperty("set")&&(0,a.dset)(t,e,o.set);if(o.to_string){var l=(0,i.default)(t,e);if("string"==typeof l||"object"==typeof l&&null!==l)continue;void 0!==l?(0,a.dset)(t,e,JSON.stringify(l)):(0,a.dset)(t,e,"undefined")}}}}function v(t,r){return!(r.sample.percent<=0)&&(r.sample.percent>=1||(r.sample.path?function(t,r){var n=(0,i.default)(t,r.sample.path),e=(0,o.default)(JSON.stringify(n)),a=-64,c=[];y(e.slice(0,8),c);for(var f=0,s=0;s<64&&1!==c[s];s++)f++;if(0!==f){var p=[];y(e.slice(9,16),p),a-=f,c.splice(0,f),p.splice(64-f),c=c.concat(p)}return c[63]=0===c[63]?1:0,(0,u.default)(parseInt(c.join(""),2),a)<r.sample.percent}(t,r):(n=r.sample.percent,Math.random()<=n)));var n}function y(t,r){for(var n=0;n<8;n++)for(var e=t[n],o=128;o>=1;o/=2)e-o>=0?(e-=o,r.push(1)):r.push(0)}r.default=function(t,r){for(var n=t,e=0,o=r;e<o.length;e++){var i=o[e];switch(i.type){case"drop":return null;case"drop_properties":f(n,i.config);break;case"allow_properties":s(n,i.config);break;case"sample_event":if(v(n,i.config))break;return null;case"map_properties":l(n,i.config);break;case"hash_properties":break;default:throw new Error('Transformer of type "'.concat(i.type,'" is unsupported.'))}}return n}},4966:function(t,r,n){var e=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0}),r.unset=void 0;var o=e(n(7843));r.unset=function(t,r){if((0,o.default)(t,r)){for(var n=r.split("."),e=n.pop();n.length&&"\\"===n[n.length-1].slice(-1);)e=n.pop().slice(0,-1)+"."+e;for(;n.length;)t=t[r=n.shift()];return delete t[e]}return!0}},3304:function(t){var r="function"==typeof Float64Array?Float64Array:void 0;t.exports=r},7382:function(t,r,n){var e,o=n(5569),i=n(3304),u=n(8482);e=o()?i:u,t.exports=e},8482:function(t){t.exports=function(){throw new Error("not implemented")}},6322:function(t,r,n){var e,o=n(2508),i=n(5679),u=n(882);e=o()?i:u,t.exports=e},882:function(t){t.exports=function(){throw new Error("not implemented")}},5679:function(t){var r="function"==typeof Uint16Array?Uint16Array:void 0;t.exports=r},4773:function(t,r,n){var e,o=n(9773),i=n(3004),u=n(3078);e=o()?i:u,t.exports=e},3078:function(t){t.exports=function(){throw new Error("not implemented")}},3004:function(t){var r="function"==typeof Uint32Array?Uint32Array:void 0;t.exports=r},7980:function(t,r,n){var e,o=n(8114),i=n(6737),u=n(3357);e=o()?i:u,t.exports=e},3357:function(t){t.exports=function(){throw new Error("not implemented")}},6737:function(t){var r="function"==typeof Uint8Array?Uint8Array:void 0;t.exports=r},2684:function(t){var r="function"==typeof Float64Array?Float64Array:null;t.exports=r},5569:function(t,r,n){var e=n(3876);t.exports=e},3876:function(t,r,n){var e=n(1448),o=n(2684);t.exports=function(){var t,r;if("function"!=typeof o)return!1;try{r=new o([1,3.14,-3.14,NaN]),t=e(r)&&1===r[0]&&3.14===r[1]&&-3.14===r[2]&&r[3]!=r[3]}catch(r){t=!1}return t}},9048:function(t,r,n){var e=n(3763);t.exports=e},3763:function(t){var r=Object.prototype.hasOwnProperty;t.exports=function(t,n){return null!=t&&r.call(t,n)}},7009:function(t,r,n){var e=n(6784);t.exports=e},6784:function(t){t.exports=function(){return"function"==typeof Symbol&&"symbol"==typeof Symbol("foo")}},3123:function(t,r,n){var e=n(8481);t.exports=e},8481:function(t,r,n){var e=n(7009)();t.exports=function(){return e&&"symbol"==typeof Symbol.toStringTag}},2508:function(t,r,n){var e=n(3403);t.exports=e},3403:function(t,r,n){var e=n(768),o=n(9668),i=n(187);t.exports=function(){var t,r;if("function"!=typeof i)return!1;try{r=new i(r=[1,3.14,-3.14,o+1,o+2]),t=e(r)&&1===r[0]&&3===r[1]&&r[2]===o-2&&0===r[3]&&1===r[4]}catch(r){t=!1}return t}},187:function(t){var r="function"==typeof Uint16Array?Uint16Array:null;t.exports=r},9773:function(t,r,n){var e=n(2822);t.exports=e},2822:function(t,r,n){var e=n(2744),o=n(3899),i=n(746);t.exports=function(){var t,r;if("function"!=typeof i)return!1;try{r=new i(r=[1,3.14,-3.14,o+1,o+2]),t=e(r)&&1===r[0]&&3===r[1]&&r[2]===o-2&&0===r[3]&&1===r[4]}catch(r){t=!1}return t}},746:function(t){var r="function"==typeof Uint32Array?Uint32Array:null;t.exports=r},8114:function(t,r,n){var e=n(8066);t.exports=e},8066:function(t,r,n){var e=n(8279),o=n(3443),i=n(2731);t.exports=function(){var t,r;if("function"!=typeof i)return!1;try{r=new i(r=[1,3.14,-3.14,o+1,o+2]),t=e(r)&&1===r[0]&&3===r[1]&&r[2]===o-2&&0===r[3]&&1===r[4]}catch(r){t=!1}return t}},2731:function(t){var r="function"==typeof Uint8Array?Uint8Array:null;t.exports=r},1448:function(t,r,n){var e=n(1453);t.exports=e},1453:function(t,r,n){var e=n(6208),o="function"==typeof Float64Array;t.exports=function(t){return o&&t instanceof Float64Array||"[object Float64Array]"===e(t)}},9331:function(t,r,n){var e=n(7980),o={uint16:n(6322),uint8:e};t.exports=o},5902:function(t,r,n){var e=n(4106);t.exports=e},4106:function(t,r,n){var e,o,i=n(9331);(o=new i.uint16(1))[0]=4660,e=52===new i.uint8(o.buffer)[0],t.exports=e},768:function(t,r,n){var e=n(3823);t.exports=e},3823:function(t,r,n){var e=n(6208),o="function"==typeof Uint16Array;t.exports=function(t){return o&&t instanceof Uint16Array||"[object Uint16Array]"===e(t)}},2744:function(t,r,n){var e=n(2326);t.exports=e},2326:function(t,r,n){var e=n(6208),o="function"==typeof Uint32Array;t.exports=function(t){return o&&t instanceof Uint32Array||"[object Uint32Array]"===e(t)}},8279:function(t,r,n){var e=n(208);t.exports=e},208:function(t,r,n){var e=n(6208),o="function"==typeof Uint8Array;t.exports=function(t){return o&&t instanceof Uint8Array||"[object Uint8Array]"===e(t)}},6315:function(t){t.exports=1023},1686:function(t){t.exports=2147483647},3105:function(t){t.exports=2146435072},3449:function(t){t.exports=2147483648},6988:function(t){t.exports=-1023},9777:function(t){t.exports=1023},3690:function(t){t.exports=-1074},2918:function(t,r,n){var e=n(4772).NEGATIVE_INFINITY;t.exports=e},4165:function(t){var r=Number.POSITIVE_INFINITY;t.exports=r},6488:function(t){t.exports=22250738585072014e-324},9668:function(t){t.exports=65535},3899:function(t){t.exports=4294967295},3443:function(t){t.exports=255},7011:function(t,r,n){var e=n(812);t.exports=e},812:function(t,r,n){var e=n(4165),o=n(2918);t.exports=function(t){return t===e||t===o}},1883:function(t,r,n){var e=n(1797);t.exports=e},1797:function(t){t.exports=function(t){return t!=t}},513:function(t,r,n){var e=n(5760);t.exports=e},5760:function(t){t.exports=function(t){return Math.abs(t)}},5848:function(t,r,n){var e=n(677);t.exports=e},677:function(t,r,n){var e=n(3449),o=n(1686),i=n(7838),u=n(1921),a=n(2490),c=[0,0];t.exports=function(t,r){var n,f;return i.assign(t,c,1,0),n=c[0],n&=o,f=u(r),a(n|=f&=e,c[1])}},5500:function(t,r,n){var e=n(8397);t.exports=e},8397:function(t,r,n){var e=n(4165),o=n(2918),i=n(6315),u=n(9777),a=n(6988),c=n(3690),f=n(1883),s=n(7011),p=n(5848),l=n(4948),v=n(8478),y=n(7838),d=n(2490),h=[0,0],x=[0,0];t.exports=function(t,r){var n,b;return 0===t||f(t)||s(t)?t:(l(h,t),r+=h[1],(r+=v(t=h[0]))<c?p(0,t):r>u?t<0?o:e:(r<=a?(r+=52,b=2220446049250313e-31):b=1,y(x,t),n=x[0],n&=2148532223,b*d(n|=r+i<<20,x[1])))}},4772:function(t,r,n){var e=n(7548);t.exports=e},7548:function(t){t.exports=Number},8478:function(t,r,n){var e=n(4500);t.exports=e},4500:function(t,r,n){var e=n(1921),o=n(3105),i=n(6315);t.exports=function(t){var r=e(t);return(r=(r&o)>>>20)-i|0}},2490:function(t,r,n){var e=n(9639);t.exports=e},4445:function(t,r,n){var e,o,i;!0===n(5902)?(o=1,i=0):(o=0,i=1),e={HIGH:o,LOW:i},t.exports=e},9639:function(t,r,n){var e=n(4773),o=n(7382),i=n(4445),u=new o(1),a=new e(u.buffer),c=i.HIGH,f=i.LOW;t.exports=function(t,r){return a[c]=t,a[f]=r,u[0]}},5646:function(t,r,n){var e;e=!0===n(5902)?1:0,t.exports=e},1921:function(t,r,n){var e=n(6285);t.exports=e},6285:function(t,r,n){var e=n(4773),o=n(7382),i=n(5646),u=new o(1),a=new e(u.buffer);t.exports=function(t){return u[0]=t,a[i]}},9024:function(t,r,n){var e=n(6488),o=n(7011),i=n(1883),u=n(513);t.exports=function(t,r,n,a){return i(t)||o(t)?(r[a]=t,r[a+n]=0,r):0!==t&&u(t)<e?(r[a]=4503599627370496*t,r[a+n]=-52,r):(r[a]=t,r[a+n]=0,r)}},4948:function(t,r,n){var e=n(7576),o=n(9422);e(o,"assign",n(9024)),t.exports=o},9422:function(t,r,n){var e=n(9024);t.exports=function(t){return e(t,[0,0],1,0)}},7838:function(t,r,n){var e=n(4010);t.exports=e},5782:function(t,r,n){var e,o,i;!0===n(5902)?(o=1,i=0):(o=0,i=1),e={HIGH:o,LOW:i},t.exports=e},4010:function(t,r,n){var e=n(4903);t.exports=function(t,r){return 1===arguments.length?e([0,0],t):e(t,r)}},4903:function(t,r,n){var e=n(4773),o=n(7382),i=n(5782),u=new o(1),a=new e(u.buffer),c=i.HIGH,f=i.LOW;t.exports=function(t,r){return u[0]=r,t[0]=a[c],t[1]=a[f],t}},7576:function(t,r,n){var e=n(7063);t.exports=e},7063:function(t,r,n){var e=n(6691);t.exports=function(t,r,n){e(t,r,{configurable:!1,enumerable:!1,writable:!1,value:n})}},2073:function(t){var r=Object.defineProperty;t.exports=r},1680:function(t){var r="function"==typeof Object.defineProperty?Object.defineProperty:null;t.exports=r},1471:function(t,r,n){var e=n(1680);t.exports=function(){try{return e({},"x",{}),!0}catch(t){return!1}}},6691:function(t,r,n){var e,o=n(1471),i=n(2073),u=n(1309);e=o()?i:u,t.exports=e},1309:function(t){var r=Object.prototype,n=r.toString,e=r.__defineGetter__,o=r.__defineSetter__,i=r.__lookupGetter__,u=r.__lookupSetter__;t.exports=function(t,a,c){var f,s,p,l;if("object"!=typeof t||null===t||"[object Array]"===n.call(t))throw new TypeError("invalid argument. First argument must be an object. Value: `"+t+"`.");if("object"!=typeof c||null===c||"[object Array]"===n.call(c))throw new TypeError("invalid argument. Property descriptor must be an object. Value: `"+c+"`.");if((s="value"in c)&&(i.call(t,a)||u.call(t,a)?(f=t.__proto__,t.__proto__=r,delete t[a],t[a]=c.value,t.__proto__=f):t[a]=c.value),p="get"in c,l="set"in c,s&&(p||l))throw new Error("invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.");return p&&e&&e.call(t,a,c.get),l&&o&&o.call(t,a,c.set),t}},6208:function(t,r,n){var e,o=n(3123),i=n(7407),u=n(4210);e=o()?u:i,t.exports=e},7407:function(t,r,n){var e=n(173);t.exports=function(t){return e.call(t)}},4210:function(t,r,n){var e=n(9048),o=n(1403),i=n(173);t.exports=function(t){var r,n,u;if(null==t)return i.call(t);n=t[o],r=e(t,o);try{t[o]=void 0}catch(r){return i.call(t)}return u=i.call(t),r?t[o]=n:delete t[o],u}},173:function(t){var r=Object.prototype.toString;t.exports=r},1403:function(t){var r="function"==typeof Symbol?Symbol.toStringTag:"";t.exports=r},7843:function(t){t.exports=function(t,r,n,e,o){for(r=r.split?r.split("."):r,e=0;e<r.length;e++)t=t?t[r[e]]:o;return t===o?n:t}},2341:function(t,r){r.dset=function(t,r,n){r.split&&(r=r.split("."));for(var e,o,i=0,u=r.length,a=t;i<u&&"__proto__"!==(o=r[i++])&&"constructor"!==o&&"prototype"!==o;)a=a[o]=i===u?n:typeof(e=a[o])==typeof r?e:0*r[i]!=0||~(""+r[i]).indexOf(".")?{}:[]}},2263:function(t,r,n){n.r(r),n.d(r,{default:function(){return i}});for(var e=[],o=0;o<64;)e[o]=0|4294967296*Math.sin(++o%Math.PI);function i(t){var r,n,i,u=[r=1732584193,n=4023233417,~r,~n],a=[],c=unescape(encodeURI(t))+"",f=c.length;for(t=--f/4+2|15,a[--t]=8*f;~f;)a[f>>2]|=c.charCodeAt(f)<<8*f--;for(o=c=0;o<t;o+=16){for(f=u;c<64;f=[i=f[3],r+((i=f[0]+[r&n|~r&i,i&r|~i&n,r^n^i,n^(r|~i)][f=c>>4]+e[c]+~~a[o|15&[c,5*c+1,3*c+5,7*c][f]])<<(f=[7,12,17,22,5,9,14,20,4,11,16,23,6,10,15,21][4*f+c++%4])|i>>>-f),r,n])r=0|f[1],n=f[2];for(c=4;c;)u[--c]+=f[c]}for(t="";c<32;)t+=(u[c>>3]>>4*(1^c++)&15).toString(16);return t}}},r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var i=r[e]={exports:{}};return t[e].call(i.exports,i,i.exports,n),i.exports}return n.d=function(t,r){for(var e in r)n.o(r,e)&&!n.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:r[e]})},n.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(2870)}()}}]);
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@customerio/cdp-analytics-browser",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/customerio/cdp-analytics-js",
|
|
@@ -38,7 +38,8 @@
|
|
|
38
38
|
"cjs": "yarn tsc -p tsconfig.build.json --outDir ./dist/cjs --module commonjs",
|
|
39
39
|
"clean": "rm -rf dist",
|
|
40
40
|
"lint": "yarn concurrently 'yarn:eslint .' 'yarn:tsc --noEmit'",
|
|
41
|
-
"test": "yarn jest"
|
|
41
|
+
"test": "yarn jest",
|
|
42
|
+
"vendor": "node scripts/vendor/run.js"
|
|
42
43
|
},
|
|
43
44
|
"size-limit": [
|
|
44
45
|
{
|
|
@@ -47,7 +48,7 @@
|
|
|
47
48
|
}
|
|
48
49
|
],
|
|
49
50
|
"dependencies": {
|
|
50
|
-
"@customerio/cdp-analytics-core": "0.3.
|
|
51
|
+
"@customerio/cdp-analytics-core": "0.3.2",
|
|
51
52
|
"@lukeed/uuid": "^2.0.0",
|
|
52
53
|
"@segment/analytics.js-video-plugins": "^0.2.1",
|
|
53
54
|
"@segment/facade": "^3.4.9",
|
package/src/generated/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// This file is generated.
|
|
2
|
-
export const version = '0.3.
|
|
2
|
+
export const version = '0.3.2'
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
1
|
+
// @ts-ignore
|
|
2
|
+
import * as tsub from '../../vendor/tsub/tsub'
|
|
3
|
+
import type { Matcher, Rule, Store } from '../../vendor/tsub/types'
|
|
3
4
|
import { DestinationMiddlewareFunction } from '../middleware'
|
|
4
5
|
|
|
5
6
|
// TODO: update tsub definition
|
|
@@ -16,10 +17,10 @@ export type RoutingRule = Rule & {
|
|
|
16
17
|
export const tsubMiddleware =
|
|
17
18
|
(rules: RoutingRule[]): DestinationMiddlewareFunction =>
|
|
18
19
|
({ payload, integration, next }): void => {
|
|
19
|
-
const store = new tsub.Store(rules)
|
|
20
|
+
const store = new tsub.Store(rules) as Store
|
|
20
21
|
const rulesToApply = store.getRulesByDestinationName(integration)
|
|
21
22
|
|
|
22
|
-
rulesToApply.forEach((rule) => {
|
|
23
|
+
rulesToApply.forEach((rule: Rule) => {
|
|
23
24
|
const { matchers, transformers } = rule
|
|
24
25
|
|
|
25
26
|
for (let i = 0; i < matchers.length; i++) {
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Apache-2.0
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2018 The Stdlib Authors.
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @license Apache-2.0
|
|
21
|
+
*
|
|
22
|
+
* Copyright (c) 2021 The Stdlib Authors.
|
|
23
|
+
*
|
|
24
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
25
|
+
* you may not use this file except in compliance with the License.
|
|
26
|
+
* You may obtain a copy of the License at
|
|
27
|
+
*
|
|
28
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
29
|
+
*
|
|
30
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
31
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
32
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
33
|
+
* See the License for the specific language governing permissions and
|
|
34
|
+
* limitations under the License.
|
|
35
|
+
*/
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* @license Apache-2.0
|
|
39
|
+
*
|
|
40
|
+
* Copyright (c) 2022 The Stdlib Authors.
|
|
41
|
+
*
|
|
42
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
43
|
+
* you may not use this file except in compliance with the License.
|
|
44
|
+
* You may obtain a copy of the License at
|
|
45
|
+
*
|
|
46
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
47
|
+
*
|
|
48
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
49
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
50
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
51
|
+
* See the License for the specific language governing permissions and
|
|
52
|
+
* limitations under the License.
|
|
53
|
+
*/
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
// prettier-ignore
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
// @segment/tsub 2.0.0 - GENERATED DO NOT MODIFY
|
|
5
|
+
|
|
6
|
+
/*! For license information please see tsub.js.LICENSE.txt */
|
|
7
|
+
!function(t,r){if("object"==typeof exports&&"object"==typeof module)module.exports=r();else if("function"==typeof define&&define.amd)define([],r);else{var e=r();for(var n in e)("object"==typeof exports?exports:t)[n]=e[n]}}(self,(function(){return(()=>{var t={2870:function(t,r,e){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0}),r.Store=r.matches=r.transform=void 0;var o=e(4303);Object.defineProperty(r,"transform",{enumerable:!0,get:function(){return n(o).default}});var s=e(2370);Object.defineProperty(r,"matches",{enumerable:!0,get:function(){return n(s).default}});var i=e(1444);Object.defineProperty(r,"Store",{enumerable:!0,get:function(){return n(i).default}})},2370:function(t,r,e){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var o=n(e(7843));function s(t,r){if(!Array.isArray(t))return!0===i(t,r);var e,n,o,f,p=t[0];switch(p){case"!":return!s(t[1],r);case"or":for(var l=1;l<t.length;l++)if(s(t[l],r))return!0;return!1;case"and":for(l=1;l<t.length;l++)if(!s(t[l],r))return!1;return!0;case"=":case"!=":return function(t,r,e,n){switch(u(t)&&(t=s(t,n)),u(r)&&(r=s(r,n)),"object"==typeof t&&"object"==typeof r&&(t=JSON.stringify(t),r=JSON.stringify(r)),e){case"=":return t===r;case"!=":return t!==r;default:throw new Error("Invalid operator in compareItems: ".concat(e))}}(i(t[1],r),i(t[2],r),p,r);case"<=":case"<":case">":case">=":return function(t,r,e,n){if(u(t)&&(t=s(t,n)),u(r)&&(r=s(r,n)),"number"!=typeof t||"number"!=typeof r)return!1;switch(e){case"<=":return t<=r;case">=":return t>=r;case"<":return t<r;case">":return t>r;default:throw new Error("Invalid operator in compareNumbers: ".concat(e))}}(i(t[1],r),i(t[2],r),p,r);case"in":return function(t,r,e){return void 0!==r.find((function(r){return i(r,e)===t}))}(i(t[1],r),i(t[2],r),r);case"contains":return o=i(t[1],r),f=i(t[2],r),"string"==typeof o&&"string"==typeof f&&-1!==o.indexOf(f);case"match":return e=i(t[1],r),n=i(t[2],r),"string"==typeof e&&"string"==typeof n&&function(t,r){var e,n;t:for(;t.length>0;){var o,s;if(o=(e=a(t)).star,s=e.chunk,t=e.pattern,o&&""===s)return!0;var i=c(s,r),u=i.t,f=i.ok,p=i.err;if(p)return!1;if(!f||!(0===u.length||t.length>0)){if(o)for(var l=0;l<r.length;l++){if(u=(n=c(s,r.slice(l+1))).t,f=n.ok,p=n.err,f){if(0===t.length&&u.length>0)continue;r=u;continue t}if(p)return!1}return!1}r=u}return 0===r.length}(n,e);case"lowercase":var v=i(t[1],r);return"string"!=typeof v?null:v.toLowerCase();case"typeof":return typeof i(t[1],r);case"length":return function(t){return null===t?0:Array.isArray(t)||"string"==typeof t?t.length:NaN}(i(t[1],r));default:throw new Error("FQL IR could not evaluate for token: ".concat(p))}}function i(t,r){return Array.isArray(t)?t:"object"==typeof t?t.value:(0,o.default)(r,t)}function u(t){return!!Array.isArray(t)&&(("lowercase"===t[0]||"length"===t[0]||"typeof"===t[0])&&2===t.length||("contains"===t[0]||"match"===t[0])&&3===t.length)}function a(t){for(var r={star:!1,chunk:"",pattern:""};t.length>0&&"*"===t[0];)t=t.slice(1),r.star=!0;var e,n=!1;t:for(e=0;e<t.length;e++)switch(t[e]){case"\\":e+1<t.length&&e++;break;case"[":n=!0;break;case"]":n=!1;break;case"*":if(!n)break t}return r.chunk=t.slice(0,e),r.pattern=t.slice(e),r}function c(t,r){for(var e,n,o={t:"",ok:!1,err:!1};t.length>0;){if(0===r.length)return o;switch(t[0]){case"[":var s=r[0];r=r.slice(1);var i=!0;(t=t.slice(1)).length>0&&"^"===t[0]&&(i=!1,t=t.slice(1));for(var u=!1,a=0;;){if(t.length>0&&"]"===t[0]&&a>0){t=t.slice(1);break}var c,p="";if(c=(e=f(t)).char,t=e.newChunk,e.err)return o;if(p=c,"-"===t[0]&&(p=(n=f(t.slice(1))).char,t=n.newChunk,n.err))return o;c<=s&&s<=p&&(u=!0),a++}if(u!==i)return o;break;case"?":r=r.slice(1),t=t.slice(1);break;case"\\":if(0===(t=t.slice(1)).length)return o.err=!0,o;default:if(t[0]!==r[0])return o;r=r.slice(1),t=t.slice(1)}}return o.t=r,o.ok=!0,o.err=!1,o}function f(t){var r={char:"",newChunk:"",err:!1};return 0===t.length||"-"===t[0]||"]"===t[0]||"\\"===t[0]&&0===(t=t.slice(1)).length?(r.err=!0,r):(r.char=t[0],r.newChunk=t.slice(1),0===r.newChunk.length&&(r.err=!0),r)}r.default=function(t,r){if(!r)throw new Error("No matcher supplied!");switch(r.type){case"all":return!0;case"fql":return function(t,r){if(!t)return!1;try{t=JSON.parse(t)}catch(r){throw new Error('Failed to JSON.parse FQL intermediate representation "'.concat(t,'": ').concat(r))}var e=s(t,r);return"boolean"==typeof e&&e}(r.ir,t);default:throw new Error("Matcher of type ".concat(r.type," unsupported."))}}},1444:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var e=function(){function t(t){this.rules=[],this.rules=t||[]}return t.prototype.getRulesByDestinationName=function(t){for(var r=[],e=0,n=this.rules;e<n.length;e++){var o=n[e];o.destinationName!==t&&void 0!==o.destinationName||r.push(o)}return r},t}();r.default=e},4303:function(t,r,e){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var o=n(e(2263)),s=n(e(7843)),i=n(e(5500)),u=e(2341),a=e(4966);function c(t,r){p(t,r.drop,(function(t,r){r.forEach((function(r){return delete t[r]}))}))}function f(t,r){p(t,r.allow,(function(t,r){Object.keys(t).forEach((function(e){r.includes(e)||delete t[e]}))}))}function p(t,r,e){Object.entries(r).forEach((function(r){var n=r[0],o=r[1],i=function(t){"object"==typeof t&&null!==t&&e(t,o)},u=""===n?t:(0,s.default)(t,n);Array.isArray(u)?u.forEach(i):i(u)}))}function l(t,r){var e=JSON.parse(JSON.stringify(t));for(var n in r.map)if(r.map.hasOwnProperty(n)){var o=r.map[n],i=n.split("."),c=void 0;if(i.length>1?(i.pop(),c=(0,s.default)(e,i.join("."))):c=t,"object"==typeof c){if(o.copy){var f=(0,s.default)(e,o.copy);void 0!==f&&(0,u.dset)(t,n,f)}else if(o.move){var p=(0,s.default)(e,o.move);void 0!==p&&(0,u.dset)(t,n,p),(0,a.unset)(t,o.move)}else o.hasOwnProperty("set")&&(0,u.dset)(t,n,o.set);if(o.to_string){var l=(0,s.default)(t,n);if("string"==typeof l||"object"==typeof l&&null!==l)continue;void 0!==l?(0,u.dset)(t,n,JSON.stringify(l)):(0,u.dset)(t,n,"undefined")}}}}function v(t,r){return!(r.sample.percent<=0)&&(r.sample.percent>=1||(r.sample.path?function(t,r){var e=(0,s.default)(t,r.sample.path),n=(0,o.default)(JSON.stringify(e)),u=-64,a=[];y(n.slice(0,8),a);for(var c=0,f=0;f<64&&1!==a[f];f++)c++;if(0!==c){var p=[];y(n.slice(9,16),p),u-=c,a.splice(0,c),p.splice(64-c),a=a.concat(p)}return a[63]=0===a[63]?1:0,(0,i.default)(parseInt(a.join(""),2),u)<r.sample.percent}(t,r):(e=r.sample.percent,Math.random()<=e)));var e}function y(t,r){for(var e=0;e<8;e++)for(var n=t[e],o=128;o>=1;o/=2)n-o>=0?(n-=o,r.push(1)):r.push(0)}r.default=function(t,r){for(var e=t,n=0,o=r;n<o.length;n++){var s=o[n];switch(s.type){case"drop":return null;case"drop_properties":c(e,s.config);break;case"allow_properties":f(e,s.config);break;case"sample_event":if(v(e,s.config))break;return null;case"map_properties":l(e,s.config);break;case"hash_properties":break;default:throw new Error('Transformer of type "'.concat(s.type,'" is unsupported.'))}}return e}},4966:function(t,r,e){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0}),r.unset=void 0;var o=n(e(7843));r.unset=function(t,r){if((0,o.default)(t,r)){for(var e=r.split("."),n=e.pop();e.length&&"\\"===e[e.length-1].slice(-1);)n=e.pop().slice(0,-1)+"."+n;for(;e.length;)t=t[r=e.shift()];return delete t[n]}return!0}},3304:t=>{"use strict";var r="function"==typeof Float64Array?Float64Array:void 0;t.exports=r},7382:(t,r,e)=>{"use strict";var n,o=e(5569),s=e(3304),i=e(8482);n=o()?s:i,t.exports=n},8482:t=>{"use strict";t.exports=function(){throw new Error("not implemented")}},6322:(t,r,e)=>{"use strict";var n,o=e(2508),s=e(5679),i=e(882);n=o()?s:i,t.exports=n},882:t=>{"use strict";t.exports=function(){throw new Error("not implemented")}},5679:t=>{"use strict";var r="function"==typeof Uint16Array?Uint16Array:void 0;t.exports=r},4773:(t,r,e)=>{"use strict";var n,o=e(9773),s=e(3004),i=e(3078);n=o()?s:i,t.exports=n},3078:t=>{"use strict";t.exports=function(){throw new Error("not implemented")}},3004:t=>{"use strict";var r="function"==typeof Uint32Array?Uint32Array:void 0;t.exports=r},7980:(t,r,e)=>{"use strict";var n,o=e(8114),s=e(6737),i=e(3357);n=o()?s:i,t.exports=n},3357:t=>{"use strict";t.exports=function(){throw new Error("not implemented")}},6737:t=>{"use strict";var r="function"==typeof Uint8Array?Uint8Array:void 0;t.exports=r},2684:t=>{"use strict";var r="function"==typeof Float64Array?Float64Array:null;t.exports=r},5569:(t,r,e)=>{"use strict";var n=e(3876);t.exports=n},3876:(t,r,e)=>{"use strict";var n=e(1448),o=e(2684);t.exports=function(){var t,r;if("function"!=typeof o)return!1;try{r=new o([1,3.14,-3.14,NaN]),t=n(r)&&1===r[0]&&3.14===r[1]&&-3.14===r[2]&&r[3]!=r[3]}catch(r){t=!1}return t}},9048:(t,r,e)=>{"use strict";var n=e(3763);t.exports=n},3763:t=>{"use strict";var r=Object.prototype.hasOwnProperty;t.exports=function(t,e){return null!=t&&r.call(t,e)}},7009:(t,r,e)=>{"use strict";var n=e(6784);t.exports=n},6784:t=>{"use strict";t.exports=function(){return"function"==typeof Symbol&&"symbol"==typeof Symbol("foo")}},3123:(t,r,e)=>{"use strict";var n=e(8481);t.exports=n},8481:(t,r,e)=>{"use strict";var n=e(7009)();t.exports=function(){return n&&"symbol"==typeof Symbol.toStringTag}},2508:(t,r,e)=>{"use strict";var n=e(3403);t.exports=n},3403:(t,r,e)=>{"use strict";var n=e(768),o=e(9668),s=e(187);t.exports=function(){var t,r;if("function"!=typeof s)return!1;try{r=new s(r=[1,3.14,-3.14,o+1,o+2]),t=n(r)&&1===r[0]&&3===r[1]&&r[2]===o-2&&0===r[3]&&1===r[4]}catch(r){t=!1}return t}},187:t=>{"use strict";var r="function"==typeof Uint16Array?Uint16Array:null;t.exports=r},9773:(t,r,e)=>{"use strict";var n=e(2822);t.exports=n},2822:(t,r,e)=>{"use strict";var n=e(2744),o=e(3899),s=e(746);t.exports=function(){var t,r;if("function"!=typeof s)return!1;try{r=new s(r=[1,3.14,-3.14,o+1,o+2]),t=n(r)&&1===r[0]&&3===r[1]&&r[2]===o-2&&0===r[3]&&1===r[4]}catch(r){t=!1}return t}},746:t=>{"use strict";var r="function"==typeof Uint32Array?Uint32Array:null;t.exports=r},8114:(t,r,e)=>{"use strict";var n=e(8066);t.exports=n},8066:(t,r,e)=>{"use strict";var n=e(8279),o=e(3443),s=e(2731);t.exports=function(){var t,r;if("function"!=typeof s)return!1;try{r=new s(r=[1,3.14,-3.14,o+1,o+2]),t=n(r)&&1===r[0]&&3===r[1]&&r[2]===o-2&&0===r[3]&&1===r[4]}catch(r){t=!1}return t}},2731:t=>{"use strict";var r="function"==typeof Uint8Array?Uint8Array:null;t.exports=r},1448:(t,r,e)=>{"use strict";var n=e(1453);t.exports=n},1453:(t,r,e)=>{"use strict";var n=e(6208),o="function"==typeof Float64Array;t.exports=function(t){return o&&t instanceof Float64Array||"[object Float64Array]"===n(t)}},9331:(t,r,e)=>{"use strict";var n=e(7980),o={uint16:e(6322),uint8:n};t.exports=o},5902:(t,r,e)=>{"use strict";var n=e(4106);t.exports=n},4106:(t,r,e)=>{"use strict";var n,o,s=e(9331);(o=new s.uint16(1))[0]=4660,n=52===new s.uint8(o.buffer)[0],t.exports=n},768:(t,r,e)=>{"use strict";var n=e(3823);t.exports=n},3823:(t,r,e)=>{"use strict";var n=e(6208),o="function"==typeof Uint16Array;t.exports=function(t){return o&&t instanceof Uint16Array||"[object Uint16Array]"===n(t)}},2744:(t,r,e)=>{"use strict";var n=e(2326);t.exports=n},2326:(t,r,e)=>{"use strict";var n=e(6208),o="function"==typeof Uint32Array;t.exports=function(t){return o&&t instanceof Uint32Array||"[object Uint32Array]"===n(t)}},8279:(t,r,e)=>{"use strict";var n=e(208);t.exports=n},208:(t,r,e)=>{"use strict";var n=e(6208),o="function"==typeof Uint8Array;t.exports=function(t){return o&&t instanceof Uint8Array||"[object Uint8Array]"===n(t)}},6315:t=>{"use strict";t.exports=1023},1686:t=>{"use strict";t.exports=2147483647},3105:t=>{"use strict";t.exports=2146435072},3449:t=>{"use strict";t.exports=2147483648},6988:t=>{"use strict";t.exports=-1023},9777:t=>{"use strict";t.exports=1023},3690:t=>{"use strict";t.exports=-1074},2918:(t,r,e)=>{"use strict";var n=e(4772).NEGATIVE_INFINITY;t.exports=n},4165:t=>{"use strict";var r=Number.POSITIVE_INFINITY;t.exports=r},6488:t=>{"use strict";t.exports=22250738585072014e-324},9668:t=>{"use strict";t.exports=65535},3899:t=>{"use strict";t.exports=4294967295},3443:t=>{"use strict";t.exports=255},7011:(t,r,e)=>{"use strict";var n=e(812);t.exports=n},812:(t,r,e)=>{"use strict";var n=e(4165),o=e(2918);t.exports=function(t){return t===n||t===o}},1883:(t,r,e)=>{"use strict";var n=e(1797);t.exports=n},1797:t=>{"use strict";t.exports=function(t){return t!=t}},513:(t,r,e)=>{"use strict";var n=e(5760);t.exports=n},5760:t=>{"use strict";t.exports=function(t){return Math.abs(t)}},5848:(t,r,e)=>{"use strict";var n=e(677);t.exports=n},677:(t,r,e)=>{"use strict";var n=e(3449),o=e(1686),s=e(7838),i=e(1921),u=e(2490),a=[0,0];t.exports=function(t,r){var e,c;return s.assign(t,a,1,0),e=a[0],e&=o,c=i(r),u(e|=c&=n,a[1])}},5500:(t,r,e)=>{"use strict";var n=e(8397);t.exports=n},8397:(t,r,e)=>{"use strict";var n=e(4165),o=e(2918),s=e(6315),i=e(9777),u=e(6988),a=e(3690),c=e(1883),f=e(7011),p=e(5848),l=e(4948),v=e(8478),y=e(7838),d=e(2490),h=[0,0],x=[0,0];t.exports=function(t,r){var e,b;return 0===t||c(t)||f(t)?t:(l(h,t),r+=h[1],(r+=v(t=h[0]))<a?p(0,t):r>i?t<0?o:n:(r<=u?(r+=52,b=2220446049250313e-31):b=1,y(x,t),e=x[0],e&=2148532223,b*d(e|=r+s<<20,x[1])))}},4772:(t,r,e)=>{"use strict";var n=e(7548);t.exports=n},7548:t=>{"use strict";t.exports=Number},8478:(t,r,e)=>{"use strict";var n=e(4500);t.exports=n},4500:(t,r,e)=>{"use strict";var n=e(1921),o=e(3105),s=e(6315);t.exports=function(t){var r=n(t);return(r=(r&o)>>>20)-s|0}},2490:(t,r,e)=>{"use strict";var n=e(9639);t.exports=n},4445:(t,r,e)=>{"use strict";var n,o,s;!0===e(5902)?(o=1,s=0):(o=0,s=1),n={HIGH:o,LOW:s},t.exports=n},9639:(t,r,e)=>{"use strict";var n=e(4773),o=e(7382),s=e(4445),i=new o(1),u=new n(i.buffer),a=s.HIGH,c=s.LOW;t.exports=function(t,r){return u[a]=t,u[c]=r,i[0]}},5646:(t,r,e)=>{"use strict";var n;n=!0===e(5902)?1:0,t.exports=n},1921:(t,r,e)=>{"use strict";var n=e(6285);t.exports=n},6285:(t,r,e)=>{"use strict";var n=e(4773),o=e(7382),s=e(5646),i=new o(1),u=new n(i.buffer);t.exports=function(t){return i[0]=t,u[s]}},9024:(t,r,e)=>{"use strict";var n=e(6488),o=e(7011),s=e(1883),i=e(513);t.exports=function(t,r,e,u){return s(t)||o(t)?(r[u]=t,r[u+e]=0,r):0!==t&&i(t)<n?(r[u]=4503599627370496*t,r[u+e]=-52,r):(r[u]=t,r[u+e]=0,r)}},4948:(t,r,e)=>{"use strict";var n=e(7576),o=e(9422);n(o,"assign",e(9024)),t.exports=o},9422:(t,r,e)=>{"use strict";var n=e(9024);t.exports=function(t){return n(t,[0,0],1,0)}},7838:(t,r,e)=>{"use strict";var n=e(4010);t.exports=n},5782:(t,r,e)=>{"use strict";var n,o,s;!0===e(5902)?(o=1,s=0):(o=0,s=1),n={HIGH:o,LOW:s},t.exports=n},4010:(t,r,e)=>{"use strict";var n=e(4903);t.exports=function(t,r){return 1===arguments.length?n([0,0],t):n(t,r)}},4903:(t,r,e)=>{"use strict";var n=e(4773),o=e(7382),s=e(5782),i=new o(1),u=new n(i.buffer),a=s.HIGH,c=s.LOW;t.exports=function(t,r){return i[0]=r,t[0]=u[a],t[1]=u[c],t}},7576:(t,r,e)=>{"use strict";var n=e(7063);t.exports=n},7063:(t,r,e)=>{"use strict";var n=e(6691);t.exports=function(t,r,e){n(t,r,{configurable:!1,enumerable:!1,writable:!1,value:e})}},2073:t=>{"use strict";var r=Object.defineProperty;t.exports=r},1680:t=>{"use strict";var r="function"==typeof Object.defineProperty?Object.defineProperty:null;t.exports=r},1471:(t,r,e)=>{"use strict";var n=e(1680);t.exports=function(){try{return n({},"x",{}),!0}catch(t){return!1}}},6691:(t,r,e)=>{"use strict";var n,o=e(1471),s=e(2073),i=e(1309);n=o()?s:i,t.exports=n},1309:t=>{"use strict";var r=Object.prototype,e=r.toString,n=r.__defineGetter__,o=r.__defineSetter__,s=r.__lookupGetter__,i=r.__lookupSetter__;t.exports=function(t,u,a){var c,f,p,l;if("object"!=typeof t||null===t||"[object Array]"===e.call(t))throw new TypeError("invalid argument. First argument must be an object. Value: `"+t+"`.");if("object"!=typeof a||null===a||"[object Array]"===e.call(a))throw new TypeError("invalid argument. Property descriptor must be an object. Value: `"+a+"`.");if((f="value"in a)&&(s.call(t,u)||i.call(t,u)?(c=t.__proto__,t.__proto__=r,delete t[u],t[u]=a.value,t.__proto__=c):t[u]=a.value),p="get"in a,l="set"in a,f&&(p||l))throw new Error("invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.");return p&&n&&n.call(t,u,a.get),l&&o&&o.call(t,u,a.set),t}},6208:(t,r,e)=>{"use strict";var n,o=e(3123),s=e(7407),i=e(4210);n=o()?i:s,t.exports=n},7407:(t,r,e)=>{"use strict";var n=e(173);t.exports=function(t){return n.call(t)}},4210:(t,r,e)=>{"use strict";var n=e(9048),o=e(1403),s=e(173);t.exports=function(t){var r,e,i;if(null==t)return s.call(t);e=t[o],r=n(t,o);try{t[o]=void 0}catch(r){return s.call(t)}return i=s.call(t),r?t[o]=e:delete t[o],i}},173:t=>{"use strict";var r=Object.prototype.toString;t.exports=r},1403:t=>{"use strict";var r="function"==typeof Symbol?Symbol.toStringTag:"";t.exports=r},7843:function(t){t.exports=function(t,r,e,n,o){for(r=r.split?r.split("."):r,n=0;n<r.length;n++)t=t?t[r[n]]:o;return t===o?e:t}},2341:(t,r)=>{r.dset=function(t,r,e){r.split&&(r=r.split("."));for(var n,o,s=0,i=r.length,u=t;s<i&&"__proto__"!==(o=r[s++])&&"constructor"!==o&&"prototype"!==o;)u=u[o]=s===i?e:typeof(n=u[o])==typeof r?n:0*r[s]!=0||~(""+r[s]).indexOf(".")?{}:[]}},2263:(t,r,e)=>{"use strict";e.r(r),e.d(r,{default:()=>s});for(var n=[],o=0;o<64;)n[o]=0|4294967296*Math.sin(++o%Math.PI);function s(t){var r,e,s,i=[r=1732584193,e=4023233417,~r,~e],u=[],a=unescape(encodeURI(t))+"",c=a.length;for(t=--c/4+2|15,u[--t]=8*c;~c;)u[c>>2]|=a.charCodeAt(c)<<8*c--;for(o=a=0;o<t;o+=16){for(c=i;a<64;c=[s=c[3],r+((s=c[0]+[r&e|~r&s,s&r|~s&e,r^e^s,e^(r|~s)][c=a>>4]+n[a]+~~u[o|15&[a,5*a+1,3*a+5,7*a][c]])<<(c=[7,12,17,22,5,9,14,20,4,11,16,23,6,10,15,21][4*c+a++%4])|s>>>-c),r,e])r=0|c[1],e=c[2];for(a=4;a;)i[--a]+=c[a]}for(t="";a<32;)t+=(i[a>>3]>>4*(1^a++)&15).toString(16);return t}}},r={};function e(n){var o=r[n];if(void 0!==o)return o.exports;var s=r[n]={exports:{}};return t[n].call(s.exports,s,s.exports,e),s.exports}return e.d=(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),e.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e(2870)})()}));
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface Rule {
|
|
2
|
+
scope: string
|
|
3
|
+
target_type: string
|
|
4
|
+
matchers: Matcher[]
|
|
5
|
+
transformers: Transformer[][]
|
|
6
|
+
destinationName?: string
|
|
7
|
+
}
|
|
8
|
+
export interface Matcher {
|
|
9
|
+
type: string
|
|
10
|
+
ir: string
|
|
11
|
+
}
|
|
12
|
+
export interface Transformer {
|
|
13
|
+
type: string
|
|
14
|
+
config?: any
|
|
15
|
+
}
|
|
16
|
+
export interface Store {
|
|
17
|
+
new (rules?: Rule[]): this
|
|
18
|
+
getRulesByDestinationName(destinationName: string): Rule[]
|
|
19
|
+
}
|
package/dist/umd/870.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_customerio_cdp_analytics_browser=self.webpackChunk_customerio_cdp_analytics_browser||[]).push([[870],{2870:function(t,r,e){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0}),r.Store=r.matches=r.transform=void 0;var o=e(4303);Object.defineProperty(r,"transform",{enumerable:!0,get:function(){return n(o).default}});var i=e(2370);Object.defineProperty(r,"matches",{enumerable:!0,get:function(){return n(i).default}});var u=e(1444);Object.defineProperty(r,"Store",{enumerable:!0,get:function(){return n(u).default}})},2370:function(t,r,e){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var o=n(e(7843));function i(t,r){if(!Array.isArray(t))return!0===u(t,r);var e=t[0];switch(e){case"!":return!i(t[1],r);case"or":for(var n=1;n<t.length;n++)if(i(t[n],r))return!0;return!1;case"and":for(n=1;n<t.length;n++)if(!i(t[n],r))return!1;return!0;case"=":case"!=":return function(t,r,e,n){s(t)&&(t=i(t,n));s(r)&&(r=i(r,n));"object"==typeof t&&"object"==typeof r&&(t=JSON.stringify(t),r=JSON.stringify(r));switch(e){case"=":return t===r;case"!=":return t!==r;default:throw new Error("Invalid operator in compareItems: ".concat(e))}}(u(t[1],r),u(t[2],r),e,r);case"<=":case"<":case">":case">=":return function(t,r,e,n){s(t)&&(t=i(t,n));s(r)&&(r=i(r,n));if("number"!=typeof t||"number"!=typeof r)return!1;switch(e){case"<=":return t<=r;case">=":return t>=r;case"<":return t<r;case">":return t>r;default:throw new Error("Invalid operator in compareNumbers: ".concat(e))}}(u(t[1],r),u(t[2],r),e,r);case"in":return function(t,r,e){return void 0!==r.find((function(r){return u(r,e)===t}))}(u(t[1],r),u(t[2],r),r);case"contains":return function(t,r){if("string"!=typeof t||"string"!=typeof r)return!1;return-1!==t.indexOf(r)}(u(t[1],r),u(t[2],r));case"match":return function(t,r){if("string"!=typeof t||"string"!=typeof r)return!1;return function(t,r){var e,n;t:for(;t.length>0;){var o=void 0,i=void 0;if(o=(e=c(t)).star,i=e.chunk,t=e.pattern,o&&""===i)return!0;var u=a(i,r),s=u.t,f=u.ok,p=u.err;if(p)return!1;if(!f||!(0===s.length||t.length>0)){if(o)for(var l=0;l<r.length;l++){if(s=(n=a(i,r.slice(l+1))).t,f=n.ok,p=n.err,f){if(0===t.length&&s.length>0)continue;r=s;continue t}if(p)return!1}return!1}r=s}return 0===r.length}(r,t)}(u(t[1],r),u(t[2],r));case"lowercase":var o=u(t[1],r);return"string"!=typeof o?null:o.toLowerCase();case"typeof":return typeof u(t[1],r);case"length":return function(t){if(null===t)return 0;if(!Array.isArray(t)&&"string"!=typeof t)return NaN;return t.length}(u(t[1],r));default:throw new Error("FQL IR could not evaluate for token: ".concat(e))}}function u(t,r){return Array.isArray(t)?t:"object"==typeof t?t.value:(0,o.default)(r,t)}function s(t){return!!Array.isArray(t)&&(("lowercase"===t[0]||"length"===t[0]||"typeof"===t[0])&&2===t.length||("contains"===t[0]||"match"===t[0])&&3===t.length)}function c(t){for(var r={star:!1,chunk:"",pattern:""};t.length>0&&"*"===t[0];)t=t.slice(1),r.star=!0;var e,n=!1;t:for(e=0;e<t.length;e++)switch(t[e]){case"\\":e+1<t.length&&e++;break;case"[":n=!0;break;case"]":n=!1;break;case"*":if(!n)break t}return r.chunk=t.slice(0,e),r.pattern=t.slice(e),r}function a(t,r){for(var e,n,o={t:"",ok:!1,err:!1};t.length>0;){if(0===r.length)return o;switch(t[0]){case"[":var i=r[0];r=r.slice(1);var u=!0;(t=t.slice(1)).length>0&&"^"===t[0]&&(u=!1,t=t.slice(1));for(var s=!1,c=0;;){if(t.length>0&&"]"===t[0]&&c>0){t=t.slice(1);break}var a,p="";if(a=(e=f(t)).char,t=e.newChunk,e.err)return o;if(p=a,"-"===t[0]&&(p=(n=f(t.slice(1))).char,t=n.newChunk,n.err))return o;a<=i&&i<=p&&(s=!0),c++}if(s!==u)return o;break;case"?":r=r.slice(1),t=t.slice(1);break;case"\\":if(0===(t=t.slice(1)).length)return o.err=!0,o;default:if(t[0]!==r[0])return o;r=r.slice(1),t=t.slice(1)}}return o.t=r,o.ok=!0,o.err=!1,o}function f(t){var r={char:"",newChunk:"",err:!1};return 0===t.length||"-"===t[0]||"]"===t[0]||"\\"===t[0]&&0===(t=t.slice(1)).length?(r.err=!0,r):(r.char=t[0],r.newChunk=t.slice(1),0===r.newChunk.length&&(r.err=!0),r)}r.default=function(t,r){if(!r)throw new Error("No matcher supplied!");switch(r.type){case"all":return!0;case"fql":return function(t,r){if(!t)return!1;try{t=JSON.parse(t)}catch(r){throw new Error('Failed to JSON.parse FQL intermediate representation "'.concat(t,'": ').concat(r))}var e=i(t,r);if("boolean"!=typeof e)return!1;return e}(r.ir,t);default:throw new Error("Matcher of type ".concat(r.type," unsupported."))}}},1444:function(t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var e=function(){function t(t){this.rules=[],this.rules=t||[]}return t.prototype.getRulesByDestinationName=function(t){for(var r=[],e=0,n=this.rules;e<n.length;e++){var o=n[e];o.destinationName!==t&&void 0!==o.destinationName||r.push(o)}return r},t}();r.default=e},4303:function(t,r,e){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var o=n(e(2263)),i=n(e(7843)),u=n(e(5500)),s=e(2341),c=e(4966);function a(t,r){p(t,r.drop,(function(t,r){r.forEach((function(r){return delete t[r]}))}))}function f(t,r){p(t,r.allow,(function(t,r){Object.keys(t).forEach((function(e){r.includes(e)||delete t[e]}))}))}function p(t,r,e){Object.entries(r).forEach((function(r){var n=r[0],o=r[1],u=function(t){"object"==typeof t&&null!==t&&e(t,o)},s=""===n?t:(0,i.default)(t,n);Array.isArray(s)?s.forEach(u):u(s)}))}function l(t,r){var e=JSON.parse(JSON.stringify(t));for(var n in r.map)if(r.map.hasOwnProperty(n)){var o=r.map[n],u=n.split("."),a=void 0;if(u.length>1?(u.pop(),a=(0,i.default)(e,u.join("."))):a=t,"object"==typeof a){if(o.copy){var f=(0,i.default)(e,o.copy);void 0!==f&&(0,s.dset)(t,n,f)}else if(o.move){var p=(0,i.default)(e,o.move);void 0!==p&&(0,s.dset)(t,n,p),(0,c.unset)(t,o.move)}else o.hasOwnProperty("set")&&(0,s.dset)(t,n,o.set);if(o.to_string){var l=(0,i.default)(t,n);if("string"==typeof l||"object"==typeof l&&null!==l)continue;void 0!==l?(0,s.dset)(t,n,JSON.stringify(l)):(0,s.dset)(t,n,"undefined")}}}}function v(t,r){return!(r.sample.percent<=0)&&(r.sample.percent>=1||(r.sample.path?function(t,r){var e=(0,i.default)(t,r.sample.path),n=(0,o.default)(JSON.stringify(e)),s=-64,c=[];y(n.slice(0,8),c);for(var a=0,f=0;f<64&&1!==c[f];f++)a++;if(0!==a){var p=[];y(n.slice(9,16),p),s-=a,c.splice(0,a),p.splice(64-a),c=c.concat(p)}return c[63]=0===c[63]?1:0,(0,u.default)(parseInt(c.join(""),2),s)<r.sample.percent}(t,r):(e=r.sample.percent,Math.random()<=e)));var e}function y(t,r){for(var e=0;e<8;e++)for(var n=t[e],o=128;o>=1;o/=2)n-o>=0?(n-=o,r.push(1)):r.push(0)}r.default=function(t,r){for(var e=t,n=0,o=r;n<o.length;n++){var i=o[n];switch(i.type){case"drop":return null;case"drop_properties":a(e,i.config);break;case"allow_properties":f(e,i.config);break;case"sample_event":if(v(e,i.config))break;return null;case"map_properties":l(e,i.config);break;case"hash_properties":break;default:throw new Error('Transformer of type "'.concat(i.type,'" is unsupported.'))}}return e}},4966:function(t,r,e){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0}),r.unset=void 0;var o=n(e(7843));r.unset=function(t,r){if((0,o.default)(t,r)){for(var e=r.split("."),n=e.pop();e.length&&"\\"===e[e.length-1].slice(-1);)n=e.pop().slice(0,-1)+"."+n;for(;e.length;)t=t[r=e.shift()];return delete t[n]}return!0}},3304:function(t){"use strict";var r="function"==typeof Float64Array?Float64Array:void 0;t.exports=r},7382:function(t,r,e){"use strict";var n,o=e(5569),i=e(3304),u=e(8482);n=o()?i:u,t.exports=n},8482:function(t){"use strict";t.exports=function(){throw new Error("not implemented")}},6322:function(t,r,e){"use strict";var n,o=e(2508),i=e(5679),u=e(882);n=o()?i:u,t.exports=n},882:function(t){"use strict";t.exports=function(){throw new Error("not implemented")}},5679:function(t){"use strict";var r="function"==typeof Uint16Array?Uint16Array:void 0;t.exports=r},4773:function(t,r,e){"use strict";var n,o=e(9773),i=e(3004),u=e(3078);n=o()?i:u,t.exports=n},3078:function(t){"use strict";t.exports=function(){throw new Error("not implemented")}},3004:function(t){"use strict";var r="function"==typeof Uint32Array?Uint32Array:void 0;t.exports=r},7980:function(t,r,e){"use strict";var n,o=e(8114),i=e(6737),u=e(3357);n=o()?i:u,t.exports=n},3357:function(t){"use strict";t.exports=function(){throw new Error("not implemented")}},6737:function(t){"use strict";var r="function"==typeof Uint8Array?Uint8Array:void 0;t.exports=r},2684:function(t){"use strict";var r="function"==typeof Float64Array?Float64Array:null;t.exports=r},5569:function(t,r,e){"use strict";var n=e(3876);t.exports=n},3876:function(t,r,e){"use strict";var n=e(1448),o=e(2684);t.exports=function(){var t,r;if("function"!=typeof o)return!1;try{r=new o([1,3.14,-3.14,NaN]),t=n(r)&&1===r[0]&&3.14===r[1]&&-3.14===r[2]&&r[3]!=r[3]}catch(r){t=!1}return t}},9048:function(t,r,e){"use strict";var n=e(3763);t.exports=n},3763:function(t){"use strict";var r=Object.prototype.hasOwnProperty;t.exports=function(t,e){return null!=t&&r.call(t,e)}},7009:function(t,r,e){"use strict";var n=e(6784);t.exports=n},6784:function(t){"use strict";t.exports=function(){return"function"==typeof Symbol&&"symbol"==typeof Symbol("foo")}},3123:function(t,r,e){"use strict";var n=e(8481);t.exports=n},8481:function(t,r,e){"use strict";var n=e(7009)();t.exports=function(){return n&&"symbol"==typeof Symbol.toStringTag}},2508:function(t,r,e){"use strict";var n=e(3403);t.exports=n},3403:function(t,r,e){"use strict";var n=e(768),o=e(9668),i=e(187);t.exports=function(){var t,r;if("function"!=typeof i)return!1;try{r=new i(r=[1,3.14,-3.14,o+1,o+2]),t=n(r)&&1===r[0]&&3===r[1]&&r[2]===o-2&&0===r[3]&&1===r[4]}catch(r){t=!1}return t}},187:function(t){"use strict";var r="function"==typeof Uint16Array?Uint16Array:null;t.exports=r},9773:function(t,r,e){"use strict";var n=e(2822);t.exports=n},2822:function(t,r,e){"use strict";var n=e(2744),o=e(3899),i=e(746);t.exports=function(){var t,r;if("function"!=typeof i)return!1;try{r=new i(r=[1,3.14,-3.14,o+1,o+2]),t=n(r)&&1===r[0]&&3===r[1]&&r[2]===o-2&&0===r[3]&&1===r[4]}catch(r){t=!1}return t}},746:function(t){"use strict";var r="function"==typeof Uint32Array?Uint32Array:null;t.exports=r},8114:function(t,r,e){"use strict";var n=e(8066);t.exports=n},8066:function(t,r,e){"use strict";var n=e(8279),o=e(3443),i=e(2731);t.exports=function(){var t,r;if("function"!=typeof i)return!1;try{r=new i(r=[1,3.14,-3.14,o+1,o+2]),t=n(r)&&1===r[0]&&3===r[1]&&r[2]===o-2&&0===r[3]&&1===r[4]}catch(r){t=!1}return t}},2731:function(t){"use strict";var r="function"==typeof Uint8Array?Uint8Array:null;t.exports=r},1448:function(t,r,e){"use strict";var n=e(1453);t.exports=n},1453:function(t,r,e){"use strict";var n=e(6208),o="function"==typeof Float64Array;t.exports=function(t){return o&&t instanceof Float64Array||"[object Float64Array]"===n(t)}},9331:function(t,r,e){"use strict";var n=e(7980),o={uint16:e(6322),uint8:n};t.exports=o},5902:function(t,r,e){"use strict";var n=e(4106);t.exports=n},4106:function(t,r,e){"use strict";var n,o,i=e(9331);(o=new i.uint16(1))[0]=4660,n=52===new i.uint8(o.buffer)[0],t.exports=n},768:function(t,r,e){"use strict";var n=e(3823);t.exports=n},3823:function(t,r,e){"use strict";var n=e(6208),o="function"==typeof Uint16Array;t.exports=function(t){return o&&t instanceof Uint16Array||"[object Uint16Array]"===n(t)}},2744:function(t,r,e){"use strict";var n=e(2326);t.exports=n},2326:function(t,r,e){"use strict";var n=e(6208),o="function"==typeof Uint32Array;t.exports=function(t){return o&&t instanceof Uint32Array||"[object Uint32Array]"===n(t)}},8279:function(t,r,e){"use strict";var n=e(208);t.exports=n},208:function(t,r,e){"use strict";var n=e(6208),o="function"==typeof Uint8Array;t.exports=function(t){return o&&t instanceof Uint8Array||"[object Uint8Array]"===n(t)}},6315:function(t){"use strict";t.exports=1023},1686:function(t){"use strict";t.exports=2147483647},3105:function(t){"use strict";t.exports=2146435072},3449:function(t){"use strict";t.exports=2147483648},6988:function(t){"use strict";t.exports=-1023},9777:function(t){"use strict";t.exports=1023},3690:function(t){"use strict";t.exports=-1074},2918:function(t,r,e){"use strict";var n=e(4772).NEGATIVE_INFINITY;t.exports=n},4165:function(t){"use strict";var r=Number.POSITIVE_INFINITY;t.exports=r},6488:function(t){"use strict";t.exports=22250738585072014e-324},9668:function(t){"use strict";t.exports=65535},3899:function(t){"use strict";t.exports=4294967295},3443:function(t){"use strict";t.exports=255},7011:function(t,r,e){"use strict";var n=e(812);t.exports=n},812:function(t,r,e){"use strict";var n=e(4165),o=e(2918);t.exports=function(t){return t===n||t===o}},1883:function(t,r,e){"use strict";var n=e(1797);t.exports=n},1797:function(t){"use strict";t.exports=function(t){return t!=t}},513:function(t,r,e){"use strict";var n=e(5760);t.exports=n},5760:function(t){"use strict";t.exports=function(t){return Math.abs(t)}},5848:function(t,r,e){"use strict";var n=e(677);t.exports=n},677:function(t,r,e){"use strict";var n=e(3449),o=e(1686),i=e(7838),u=e(1921),s=e(2490),c=[0,0];t.exports=function(t,r){var e,a;return i.assign(t,c,1,0),e=c[0],e&=o,a=u(r),s(e|=a&=n,c[1])}},5500:function(t,r,e){"use strict";var n=e(8397);t.exports=n},8397:function(t,r,e){"use strict";var n=e(4165),o=e(2918),i=e(6315),u=e(9777),s=e(6988),c=e(3690),a=e(1883),f=e(7011),p=e(5848),l=e(4948),v=e(8478),y=e(7838),h=e(2490),d=[0,0],x=[0,0];t.exports=function(t,r){var e,b;return 0===t||a(t)||f(t)?t:(l(d,t),r+=d[1],(r+=v(t=d[0]))<c?p(0,t):r>u?t<0?o:n:(r<=s?(r+=52,b=2220446049250313e-31):b=1,y(x,t),e=x[0],e&=2148532223,b*h(e|=r+i<<20,x[1])))}},4772:function(t,r,e){"use strict";var n=e(7548);t.exports=n},7548:function(t){"use strict";t.exports=Number},8478:function(t,r,e){"use strict";var n=e(4500);t.exports=n},4500:function(t,r,e){"use strict";var n=e(1921),o=e(3105),i=e(6315);t.exports=function(t){var r=n(t);return(r=(r&o)>>>20)-i|0}},2490:function(t,r,e){"use strict";var n=e(9639);t.exports=n},4445:function(t,r,e){"use strict";var n,o,i;!0===e(5902)?(o=1,i=0):(o=0,i=1),n={HIGH:o,LOW:i},t.exports=n},9639:function(t,r,e){"use strict";var n=e(4773),o=e(7382),i=e(4445),u=new o(1),s=new n(u.buffer),c=i.HIGH,a=i.LOW;t.exports=function(t,r){return s[c]=t,s[a]=r,u[0]}},5646:function(t,r,e){"use strict";var n;n=!0===e(5902)?1:0,t.exports=n},1921:function(t,r,e){"use strict";var n=e(6285);t.exports=n},6285:function(t,r,e){"use strict";var n=e(4773),o=e(7382),i=e(5646),u=new o(1),s=new n(u.buffer);t.exports=function(t){return u[0]=t,s[i]}},9024:function(t,r,e){"use strict";var n=e(6488),o=e(7011),i=e(1883),u=e(513);t.exports=function(t,r,e,s){return i(t)||o(t)?(r[s]=t,r[s+e]=0,r):0!==t&&u(t)<n?(r[s]=4503599627370496*t,r[s+e]=-52,r):(r[s]=t,r[s+e]=0,r)}},4948:function(t,r,e){"use strict";var n=e(7576),o=e(9422);n(o,"assign",e(9024)),t.exports=o},9422:function(t,r,e){"use strict";var n=e(9024);t.exports=function(t){return n(t,[0,0],1,0)}},7838:function(t,r,e){"use strict";var n=e(4010);t.exports=n},5782:function(t,r,e){"use strict";var n,o,i;!0===e(5902)?(o=1,i=0):(o=0,i=1),n={HIGH:o,LOW:i},t.exports=n},4010:function(t,r,e){"use strict";var n=e(4903);t.exports=function(t,r){return 1===arguments.length?n([0,0],t):n(t,r)}},4903:function(t,r,e){"use strict";var n=e(4773),o=e(7382),i=e(5782),u=new o(1),s=new n(u.buffer),c=i.HIGH,a=i.LOW;t.exports=function(t,r){return u[0]=r,t[0]=s[c],t[1]=s[a],t}},7576:function(t,r,e){"use strict";var n=e(7063);t.exports=n},7063:function(t,r,e){"use strict";var n=e(6691);t.exports=function(t,r,e){n(t,r,{configurable:!1,enumerable:!1,writable:!1,value:e})}},2073:function(t){"use strict";var r=Object.defineProperty;t.exports=r},1680:function(t){"use strict";var r="function"==typeof Object.defineProperty?Object.defineProperty:null;t.exports=r},1471:function(t,r,e){"use strict";var n=e(1680);t.exports=function(){try{return n({},"x",{}),!0}catch(t){return!1}}},6691:function(t,r,e){"use strict";var n,o=e(1471),i=e(2073),u=e(1309);n=o()?i:u,t.exports=n},1309:function(t){"use strict";var r=Object.prototype,e=r.toString,n=r.__defineGetter__,o=r.__defineSetter__,i=r.__lookupGetter__,u=r.__lookupSetter__;t.exports=function(t,s,c){var a,f,p,l;if("object"!=typeof t||null===t||"[object Array]"===e.call(t))throw new TypeError("invalid argument. First argument must be an object. Value: `"+t+"`.");if("object"!=typeof c||null===c||"[object Array]"===e.call(c))throw new TypeError("invalid argument. Property descriptor must be an object. Value: `"+c+"`.");if((f="value"in c)&&(i.call(t,s)||u.call(t,s)?(a=t.__proto__,t.__proto__=r,delete t[s],t[s]=c.value,t.__proto__=a):t[s]=c.value),p="get"in c,l="set"in c,f&&(p||l))throw new Error("invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.");return p&&n&&n.call(t,s,c.get),l&&o&&o.call(t,s,c.set),t}},6208:function(t,r,e){"use strict";var n,o=e(3123),i=e(7407),u=e(4210);n=o()?u:i,t.exports=n},7407:function(t,r,e){"use strict";var n=e(173);t.exports=function(t){return n.call(t)}},4210:function(t,r,e){"use strict";var n=e(9048),o=e(1403),i=e(173);t.exports=function(t){var r,e,u;if(null==t)return i.call(t);e=t[o],r=n(t,o);try{t[o]=void 0}catch(r){return i.call(t)}return u=i.call(t),r?t[o]=e:delete t[o],u}},173:function(t){"use strict";var r=Object.prototype.toString;t.exports=r},1403:function(t){"use strict";var r="function"==typeof Symbol?Symbol.toStringTag:"";t.exports=r},7843:function(t){t.exports=function(t,r,e,n,o){for(r=r.split?r.split("."):r,n=0;n<r.length;n++)t=t?t[r[n]]:o;return t===o?e:t}},2341:function(t,r){r.dset=function(t,r,e){r.split&&(r=r.split("."));for(var n,o,i=0,u=r.length,s=t;i<u&&"__proto__"!==(o=r[i++])&&"constructor"!==o&&"prototype"!==o;)s=s[o]=i===u?e:typeof(n=s[o])==typeof r?n:0*r[i]!=0||~(""+r[i]).indexOf(".")?{}:[]}},2263:function(t,r,e){"use strict";e.r(r),e.d(r,{default:function(){return i}});for(var n=[],o=0;o<64;)n[o]=0|4294967296*Math.sin(++o%Math.PI);function i(t){var r,e,i,u=[r=1732584193,e=4023233417,~r,~e],s=[],c=unescape(encodeURI(t))+"",a=c.length;for(t=--a/4+2|15,s[--t]=8*a;~a;)s[a>>2]|=c.charCodeAt(a)<<8*a--;for(o=c=0;o<t;o+=16){for(a=u;c<64;a=[i=a[3],r+((i=a[0]+[r&e|~r&i,i&r|~i&e,r^e^i,e^(r|~i)][a=c>>4]+n[c]+~~s[o|15&[c,5*c+1,3*c+5,7*c][a]])<<(a=[7,12,17,22,5,9,14,20,4,11,16,23,6,10,15,21][4*a+c++%4])|i>>>-a),r,e])r=0|a[1],e=a[2];for(c=4;c;)u[--c]+=a[c]}for(t="";c<32;)t+=(u[c>>3]>>4*(1^c++)&15).toString(16);return t}}}]);
|
package/dist/umd/870.js.gz
DELETED
|
Binary file
|