@aws-amplify/notifications
Advanced tools
Comparing version 0.2.5-in-app-messaging.7287 to 1.0.1-next.7206
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("aws_amplify_core"),require("@aws-sdk/client-pinpoint"),require("aws_amplify_cache")):"function"==typeof define&&define.amd?define("aws_amplify_notifications",["aws_amplify_core","@aws-sdk/client-pinpoint","aws_amplify_cache"],t):"object"==typeof exports?exports.aws_amplify_notifications=t(require("aws_amplify_core"),require("@aws-sdk/client-pinpoint"),require("aws_amplify_cache")):e.aws_amplify_notifications=t(e.aws_amplify_core,e["@aws-sdk/client-pinpoint"],e.aws_amplify_cache)}(this,(function(e,t,n){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=53)}([function(t,n){t.exports=e},function(e,t,n){var r=n(10),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();e.exports=o},function(e,n){e.exports=t},function(e,t,n){var r=n(38),i=n(41);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},function(e,t,n){var r=n(33),i=n(36),o=n(11),s=n(12),a=n(46),u=n(47),c=n(15),l=n(49),f=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(a(e)&&(s(e)||"string"==typeof e||"function"==typeof e.splice||u(e)||l(e)||o(e)))return!e.length;var t=i(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(c(e))return!r(e).length;for(var n in e)if(f.call(e,n))return!1;return!0}},function(e,t,n){var r=n(6),i=n(29),o=n(30),s=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?i(e):o(e)}},function(e,t,n){var r=n(1).Symbol;e.exports=r},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t){e.exports=n},function(e,t,n){var r=n(31),i=n(32),o=i;o.v1=r,o.v4=i,e.exports=o},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(this,n(27))},function(e,t,n){var r=n(28),i=n(7),o=Object.prototype,s=o.hasOwnProperty,a=o.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(e){return i(e)&&s.call(e,"callee")&&!a.call(e,"callee")};e.exports=u},function(e,t){var n=Array.isArray;e.exports=n},function(e,t){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 r=new Uint8Array(16);e.exports=function(){return n(r),r}}else{var i=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),i[t]=e>>>((3&t)<<3)&255;return i}}},function(e,t){for(var n=[],r=0;r<256;++r)n[r]=(r+256).toString(16).substr(1);e.exports=function(e,t){var r=t||0,i=n;return[i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]]].join("")}},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(5),i=n(17);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t){var n=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return n.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},function(e,t){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){var r=n(24);e.exports=function(e){return(null==e?0:e.length)?r(e,1):[]}},function(e,t){e.exports=function(){}},,function(e,t,n){var r=n(25),i=n(26);e.exports=function e(t,n,o,s,a){var u=-1,c=t.length;for(o||(o=i),a||(a=[]);++u<c;){var l=t[u];n>0&&o(l)?n>1?e(l,n-1,o,s,a):r(a,l):s||(a[a.length]=l)}return a}},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}},function(e,t,n){var r=n(6),i=n(11),o=n(12),s=r?r.isConcatSpreadable:void 0;e.exports=function(e){return o(e)||i(e)||!!(s&&e&&e[s])}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(5),i=n(7);e.exports=function(e){return i(e)&&"[object Arguments]"==r(e)}},function(e,t,n){var r=n(6),i=Object.prototype,o=i.hasOwnProperty,s=i.toString,a=r?r.toStringTag:void 0;e.exports=function(e){var t=o.call(e,a),n=e[a];try{e[a]=void 0;var r=!0}catch(e){}var i=s.call(e);return r&&(t?e[a]=n:delete e[a]),i}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r,i,o=n(13),s=n(14),a=0,u=0;e.exports=function(e,t,n){var c=t&&n||0,l=t||[],f=(e=e||{}).node||r,p=void 0!==e.clockseq?e.clockseq:i;if(null==f||null==p){var d=o();null==f&&(f=r=[1|d[0],d[1],d[2],d[3],d[4],d[5]]),null==p&&(p=i=16383&(d[6]<<8|d[7]))}var g=void 0!==e.msecs?e.msecs:(new Date).getTime(),v=void 0!==e.nsecs?e.nsecs:u+1,h=g-a+(v-u)/1e4;if(h<0&&void 0===e.clockseq&&(p=p+1&16383),(h<0||g>a)&&void 0===e.nsecs&&(v=0),v>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");a=g,u=v,i=p;var y=(1e4*(268435455&(g+=122192928e5))+v)%4294967296;l[c++]=y>>>24&255,l[c++]=y>>>16&255,l[c++]=y>>>8&255,l[c++]=255&y;var b=g/4294967296*1e4&268435455;l[c++]=b>>>8&255,l[c++]=255&b,l[c++]=b>>>24&15|16,l[c++]=b>>>16&255,l[c++]=p>>>8|128,l[c++]=255&p;for(var m=0;m<6;++m)l[c+m]=f[m];return t||s(l)}},function(e,t,n){var r=n(13),i=n(14);e.exports=function(e,t,n){var o=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var s=(e=e||{}).random||(e.rng||r)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t)for(var a=0;a<16;++a)t[o+a]=s[a];return t||i(s)}},function(e,t,n){var r=n(15),i=n(34),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=[];for(var n in Object(e))o.call(e,n)&&"constructor"!=n&&t.push(n);return t}},function(e,t,n){var r=n(35)(Object.keys,Object);e.exports=r},function(e,t){e.exports=function(e,t){return function(n){return e(t(n))}}},function(e,t,n){var r=n(37),i=n(42),o=n(43),s=n(44),a=n(45),u=n(5),c=n(18),l=c(r),f=c(i),p=c(o),d=c(s),g=c(a),v=u;(r&&"[object DataView]"!=v(new r(new ArrayBuffer(1)))||i&&"[object Map]"!=v(new i)||o&&"[object Promise]"!=v(o.resolve())||s&&"[object Set]"!=v(new s)||a&&"[object WeakMap]"!=v(new a))&&(v=function(e){var t=u(e),n="[object Object]"==t?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case l:return"[object DataView]";case f:return"[object Map]";case p:return"[object Promise]";case d:return"[object Set]";case g:return"[object WeakMap]"}return t}),e.exports=v},function(e,t,n){var r=n(3)(n(1),"DataView");e.exports=r},function(e,t,n){var r=n(16),i=n(39),o=n(17),s=n(18),a=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,l=u.toString,f=c.hasOwnProperty,p=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(r(e)?p:a).test(s(e))}},function(e,t,n){var r,i=n(40),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!o&&o in e}},function(e,t,n){var r=n(1)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(3)(n(1),"Map");e.exports=r},function(e,t,n){var r=n(3)(n(1),"Promise");e.exports=r},function(e,t,n){var r=n(3)(n(1),"Set");e.exports=r},function(e,t,n){var r=n(3)(n(1),"WeakMap");e.exports=r},function(e,t,n){var r=n(16),i=n(19);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},function(e,t,n){(function(e){var r=n(1),i=n(48),o=t&&!t.nodeType&&t,s=o&&"object"==typeof e&&e&&!e.nodeType&&e,a=s&&s.exports===o?r.Buffer:void 0,u=(a?a.isBuffer:void 0)||i;e.exports=u}).call(this,n(20)(e))},function(e,t){e.exports=function(){return!1}},function(e,t,n){var r=n(50),i=n(51),o=n(52),s=o&&o.isTypedArray,a=s?i(s):r;e.exports=a},function(e,t,n){var r=n(5),i=n(19),o=n(7),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&i(e.length)&&!!s[r(e)]}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){var r=n(10),i=t&&!t.nodeType&&t,o=i&&"object"==typeof e&&e&&!e.nodeType&&e,s=o&&o.exports===i&&r.process,a=function(){try{var e=o&&o.require&&o.require("util").types;return e||s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=a}).call(this,n(20)(e))},function(e,t,n){"use strict";n.r(t),n.d(t,"Notifications",(function(){return W})),n.d(t,"InAppMessageInteractionEvent",(function(){return r}));var r,i,o=n(0),s=n(21),a=n.n(s),u=n(8),c=n.n(u),l=n(2),f=n(9);!function(e){e.MESSAGE_RECEIVED="MESSAGE_RECEIVED_EVENT",e.MESSAGE_DISPLAYED="MESSAGE_DISPLAYED_EVENT",e.MESSAGE_DISMISSED="MESSAGE_DISMISSED_EVENT",e.MESSAGE_ACTION_TAKEN="MESSAGE_ACTION_TAKEN_EVENT"}(r||(r={}));var p,d,g=((i={})[r.MESSAGE_RECEIVED]=new Set,i[r.MESSAGE_DISPLAYED]=new Set,i[r.MESSAGE_DISMISSED]=new Set,i[r.MESSAGE_ACTION_TAKEN]=new Set,i),v=function(e,t){g[t].forEach((function(t){t.handleEvent(e)}))},h=function(e,t){var n={handleEvent:e,remove:function(){g[t].delete(n)}};return g[t].add(n),n},y=n(22),b=n.n(y),m=Object(o.browserOrNode)().isBrowser;m&&document&&(void 0!==document.hidden?(p="hidden",d="visibilitychange"):void 0!==document.msHidden?(p="msHidden",d="msvisibilitychange"):void 0!==document.webkitHidden&&(p="webkitHidden",d="webkitvisibilitychange"));var S,E=new o.ConsoleLogger("InAppMessagingSessionTracker"),A=function(e){var t=this;void 0===e&&(e=b.a),this.start=function(){return m&&(null===document||void 0===document||document.addEventListener(d,t.visibilityChangeHandler)),t.getSessionState()},this.end=function(){return m&&(null===document||void 0===document||document.removeEventListener(d,t.visibilityChangeHandler)),t.getSessionState()},this.getSessionState=function(){return m&&document&&!document[p]?"started":"ended"},this.visibilityChangeHandler=function(){m&&document&&(document[p]?(E.debug("App is now hidden"),t.sessionStateChangeHandler("ended")):(E.debug("App is now visible"),t.sessionStateChangeHandler("started")))},this.sessionStateChangeHandler=e};!function(e){e.MESSAGE_DISPLAYED="_inapp.message_displayed",e.MESSAGE_DISMISSED="_inapp.message_dismissed",e.MESSAGE_ACTION_TAKEN="_inapp.message_clicked"}(S||(S={}));var w=n(4),C=n.n(w),M=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s},I="undefined"!=typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default",_={},j={},O={},x=new o.ConsoleLogger("AWSPinpointProvider"),P=function(e,t,n){o.Hub.dispatch("inAppMessaging",{event:e,data:t,message:n},"InAppMessaging",I)},D=function(){var e=new Date;return e.setHours(0,0,0,0),e.toISOString()},T=function(e){switch(e){case"EQUAL":return function(e,t){return e===t};case"GREATER_THAN":return function(e,t){return e<t};case"GREATER_THAN_OR_EQUAL":return function(e,t){return e<=t};case"LESS_THAN":return function(e,t){return e>t};case"LESS_THAN_OR_EQUAL":return function(e,t){return e>=t};default:return null}},N=function(e){var t,n,r=e.InAppMessage;return null!==(n=null===(t=null==r?void 0:r.Content)||void 0===t?void 0:t.map((function(e){var t=e.BackgroundColor,n=e.BodyConfig,r=e.HeaderConfig,i=e.ImageUrl,o=e.PrimaryBtn,s=e.SecondaryBtn,a=null==o?void 0:o.DefaultConfig,u=null==s?void 0:s.DefaultConfig,c={};return t&&(c.container={style:{backgroundColor:t}}),r&&(c.header={content:r.Header,style:{color:r.TextColor,textAlign:r.Alignment.toLowerCase()}}),n&&(c.body={content:n.Body,style:{color:n.TextColor,textAlign:n.Alignment.toLowerCase()}}),i&&(c.image={src:i}),a&&(c.primaryButton={title:a.Text,action:a.ButtonAction,url:a.Link,style:{backgroundColor:a.BackgroundColor,borderRadius:a.BorderRadius,color:a.TextColor}}),u&&(c.secondaryButton={title:u.Text,action:u.ButtonAction,url:u.Link,style:{backgroundColor:u.BackgroundColor,borderRadius:u.BorderRadius,color:u.TextColor}}),c})))&&void 0!==n?n:[]},k=function(e){var t=e.InAppMessage,n=e.Priority,r=e.Schedule,i=e.TreatmentId;return{customData:null==t?void 0:t.CustomConfig,endDate:null==r?void 0:r.EndDate,priority:n,treatmentId:i}},G=function(){return(G=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},L=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},F=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},H=function(){function e(){var e,t=this;this.config={},this.configured=!1,this.endpointInitialized=!1,this.initialized=!1,this.configure=function(e){return void 0===e&&(e={}),t.config=G(G({},t.config),e),x.debug("configure AWSPinpointProvider",t.config),t.configured||(t.sessionTracker=new A(t.sessionStateChangeHandler),t.sessionTracker.start(),h((function(e){t.recordMessageEvent(e,S.MESSAGE_DISPLAYED)}),r.MESSAGE_DISPLAYED),h((function(e){t.recordMessageEvent(e,S.MESSAGE_DISMISSED)}),r.MESSAGE_DISMISSED),h((function(e){t.recordMessageEvent(e,S.MESSAGE_ACTION_TAKEN)}),r.MESSAGE_ACTION_TAKEN)),t.configured=!0,P("pinpointProvider_configured",null),t.config},this.getInAppMessages=function(){return L(t,void 0,void 0,(function(){var e,t,n,r,i,o,s,a,u;return F(this,(function(c){switch(c.label){case 0:return this.initialized?[3,2]:[4,this.init()];case 1:c.sent(),c.label=2;case 2:_={},j={},O={},c.label=3;case 3:return c.trys.push([3,6,,7]),[4,this.updateEndpoint()];case 4:return c.sent(),e=this.config,t=e.appId,n=e.endpointId,r=e.pinpointClient,i={ApplicationId:t,EndpointId:n},o=new l.GetInAppMessagesCommand(i),x.debug("getting in-app messages",i),[4,r.send(o)];case 5:return s=c.sent(),a=s.InAppMessagesResponse.InAppMessageCampaigns,P("getInAppMessages",a),[2,a];case 6:throw u=c.sent(),x.error("Error getting in-app messages",u),u;case 7:return[2]}}))}))},this.processInAppMessages=function(e,n){return L(t,void 0,void 0,(function(){var t,r=this;return F(this,(function(i){switch(i.label){case 0:return this.initialized?[3,2]:[4,this.init()];case 1:i.sent(),i.label=2;case 2:return[2,this.normalizeMessages(e.reduce((function(e,i){if(function(e,t){var n,r=e.CampaignId,i=e.Schedule,o=t.name,s=(null===(n=null==i?void 0:i.EventFilter)||void 0===n?void 0:n.Dimensions).EventType,a=r+":"+o;return _.hasOwnProperty(a)||(_[a]=!!(null==s?void 0:s.Values.includes(o))),_[a]}(i,n)&&function(e,t){var n,r=e.CampaignId,i=e.Schedule,o=t.attributes,s=(null===(n=null==i?void 0:i.EventFilter)||void 0===n?void 0:n.Dimensions).Attributes;if(C()(s))return!0;if(C()(o))return!1;var a=r+":"+JSON.stringify(o);return j.hasOwnProperty(a)||(j[a]=Object.entries(s).every((function(e){var t=M(e,2),n=t[0];return t[1].Values.includes(o[n])}))),j[a]}(i,n)&&function(e,t){var n,r=e.CampaignId,i=e.Schedule,o=t.metrics,s=(null===(n=null==i?void 0:i.EventFilter)||void 0===n?void 0:n.Dimensions).Metrics;if(C()(s))return!0;if(C()(o))return!1;var a=r+":"+JSON.stringify(o);return O.hasOwnProperty(a)||(O[a]=Object.entries(s).every((function(e){var t=M(e,2),n=t[0],r=t[1],i=r.ComparisonOperator,s=r.Value,a=T(i);return!!a&&a(s,o[n])}))),O[a]}(i,n)&&function(e){var t=e.Schedule;return!(null==t?void 0:t.EndDate)||new Date<new Date(t.EndDate)}(i)&&r.isBelowCap(i))if(t){if(i.Priority){if(i.Priority<t)return t=i.Priority,[i];i.Priority===t&&e.push(i)}}else{if(i.Priority)return t=i.Priority,[i];e.push(i)}return e}),[]))]}}))}))},this.identifyUser=function(e,n){return L(t,void 0,void 0,(function(){var t;return F(this,(function(r){switch(r.label){case 0:return this.initialized?[3,2]:[4,this.init()];case 1:r.sent(),r.label=2;case 2:return r.trys.push([2,4,,5]),[4,this.updateEndpoint(e,n)];case 3:return r.sent(),[3,5];case 4:throw t=r.sent(),x.error("Error identifying user",t),t;case 5:return[2]}}))}))},this.init=function(){return L(t,void 0,void 0,(function(){var e,t,n,r,i,o;return F(this,(function(s){switch(s.label){case 0:e=this.config,t=e.endpointId,n=e.storage,r=this.getProviderName(),s.label=1;case 1:return s.trys.push([1,6,,7]),"function"!=typeof n.sync?[3,3]:[4,n.sync()];case 2:s.sent(),s.label=3;case 3:return t?[3,5]:(i=this.config,[4,this.getEndpointId()]);case 4:i.endpointId=s.sent(),s.label=5;case 5:return this.initialized=!0,[3,7];case 6:return o=s.sent(),x.error("Failed to initialize "+r,o),[3,7];case 7:return[2]}}))}))},this.initPinpointClient=function(){return L(t,void 0,void 0,(function(){var e,t,n,r,i;return F(this,(function(s){if(e=this.config,t=e.appId,n=e.credentials,r=e.pinpointClient,i=e.region,!t||!n||!i)throw new Error("One or more of credentials, appId or region is not configured");return r&&r.destroy(),this.config.pinpointClient=new l.PinpointClient({region:i,credentials:n,customUserAgent:Object(o.getAmplifyUserAgent)()}),[2]}))}))},this.getEndpointId=function(){return L(t,void 0,void 0,(function(){var e,t,n,r,i;return F(this,(function(o){switch(o.label){case 0:return e=this.config.appId,t=this.getSubCategory()+":"+this.getProviderName()+":"+e,[4,c.a.getItem(t)];case 1:return(n=o.sent())?[2,n]:(r=Object(f.v4)(),31536e8,i=(new Date).getTime()+31536e8,c.a.setItem(t,r,{expires:i,priority:1}),[2,r])}}))}))},this.updateEndpoint=function(e,n){return void 0===e&&(e=null),void 0===n&&(n=null),L(t,void 0,void 0,(function(){var t,r,i,s,a,u,c,p,d,g,v,h,y,b,m,S,E,A,w,C,M,I,_,j,O;return F(this,(function(P){switch(P.label){case 0:return t=this.config,r=t.appId,i=t.credentials,s=t.endpointId,a=t.endpointInfo,u=void 0===a?{}:a,c=t.pinpointClient,[4,this.getCredentials()];case 1:if(p=P.sent(),d=!i||Object.keys(p).some((function(e){return p[e]!==i[e]})),this.endpointInitialized&&!d&&!e&&!n)return[2];this.config.credentials=p,P.label=2;case 2:return P.trys.push([2,6,,7]),c&&!d?[3,4]:[4,this.initPinpointClient()];case 3:P.sent(),P.label=4;case 4:return v=(g=null!=n?n:{}).address,h=g.attributes,y=g.demographic,b=g.location,m=g.metrics,S=g.optOut,E=this.clientInfo,A=E.appVersion,w=E.make,C=E.model,M=E.platform,I=E.version,_={ApplicationId:r,EndpointId:s,EndpointRequest:{RequestId:Object(f.v4)(),EffectiveDate:(new Date).toISOString(),ChannelType:l.ChannelType.IN_APP,Address:null!=v?v:u.address,Attributes:G(G({},u.attributes),h),Demographic:G({AppVersion:A,Make:w,Model:C,ModelVersion:I,Platform:M},Object(o.transferKeyToUpperCase)(G(G({},u.demographic),y))),Location:Object(o.transferKeyToUpperCase)(G(G({},u.location),b)),Metrics:G(G({},u.metrics),m),OptOut:null!=S?S:u.optOut,User:{UserId:null!==(O=null!=e?e:u.userId)&&void 0!==O?O:p.identityId,UserAttributes:null!=h?h:u.userAttributes}}},j=new l.UpdateEndpointCommand(_),x.debug("updating endpoint",_),[4,this.config.pinpointClient.send(j)];case 5:return P.sent(),this.endpointInitialized=!0,[3,7];case 6:throw P.sent();case 7:return[2]}}))}))},this.getCredentials=function(){return L(t,void 0,void 0,(function(){var e,t;return F(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,o.Credentials.get()];case 1:return(e=n.sent())?[2,o.Credentials.shear(e)]:(x.debug("no credentials found"),[2,null]);case 2:return t=n.sent(),x.error("Error getting credentials:",t),[2,null];case 3:return[2]}}))}))},this.sessionStateChangeHandler=function(e){"started"===e&&(t.sessionMessageCountMap={})},this.isBelowCap=function(e){var n=e.CampaignId,r=e.SessionCap,i=e.DailyCap,o=e.TotalCap,s=t.getMessageCounts(n),a=s.sessionCount,u=s.dailyCount,c=s.totalCount;return(!r||a<r)&&(!i||u<i)&&(!o||c<o)},this.getSessionCount=function(e){return t.sessionMessageCountMap[e]||0},this.getDailyCount=function(){var e=t.config.storage,n=D(),r=e.getItem("pinpointProvider_inAppMessages_dailyCount"),i=r?JSON.parse(r):{count:0,lastCountTimestamp:n};return i.lastCountTimestamp===n?i.count:0},this.getTotalCountMap=function(){var e=t.config.storage.getItem("pinpointProvider_inAppMessages_totalCount");return e?JSON.parse(e):{}},this.getTotalCount=function(e){return t.getTotalCountMap()[e]||0},this.getMessageCounts=function(e){try{return{sessionCount:t.getSessionCount(e),dailyCount:t.getDailyCount(),totalCount:t.getTotalCount(e)}}catch(e){x.error("Failed to get message counts from storage",e)}},this.setSessionCount=function(e,n){t.sessionMessageCountMap[e]=n},this.setDailyCount=function(e){var n=t.config.storage,r={count:e,lastCountTimestamp:D()};try{n.setItem("pinpointProvider_inAppMessages_dailyCount",JSON.stringify(r))}catch(e){x.error("Failed to save daily message count to storage",e)}},this.setTotalCountMap=function(e){var n=t.config.storage;try{n.setItem("pinpointProvider_inAppMessages_totalCount",JSON.stringify(e))}catch(e){x.error("Failed to save total count to storage",e)}},this.setTotalCount=function(e,n){var r,i=G(G({},t.getTotalCountMap()),((r={})[e]=n,r));t.setTotalCountMap(i)},this.incrementCounts=function(e){return L(t,void 0,void 0,(function(){var t,n,r,i;return F(this,(function(o){return t=this.getMessageCounts(e),n=t.sessionCount,r=t.dailyCount,i=t.totalCount,this.setSessionCount(e,n+1),this.setDailyCount(r+1),this.setTotalCount(e,i+1),[2]}))}))},this.normalizeMessages=function(e){return e.map((function(e){var t,n=e.CampaignId,r=e.InAppMessage;return{id:n,content:N(e),layout:(t=r.Layout,t===l.Layout.MOBILE_FEED?"MODAL":t===l.Layout.OVERLAYS?"FULL_SCREEN":t),metadata:k(e)}}))},this.recordMessageEvent=function(e,n){return L(t,void 0,void 0,(function(){return F(this,(function(t){switch(t.label){case 0:return this.initialized?[3,2]:[4,this.init()];case 1:t.sent(),t.label=2;case 2:return function(e,t){if(t)if(o.Amplify.Analytics&&"function"==typeof o.Amplify.Analytics.record){var n=t.id,r=t.metadata;o.Amplify.Analytics.record({name:e,attributes:{campaign_id:n,delivery_type:"IN_APP_MESSAGE",treatment_id:null==r?void 0:r.treatmentId}})}else x.debug("Analytics module is not registered into Amplify");else x.debug("Unable to record analytics event - no InAppMessage was received")}(n,e),n!==S.MESSAGE_DISPLAYED?[3,4]:[4,this.incrementCounts(e.id)];case 3:t.sent(),t.label=4;case 4:return[2]}}))}))},this.sessionMessageCountMap={},this.config={storage:(new o.StorageHelper).getStorage()},this.clientInfo=null!==(e=o.ClientDevice.clientInfo())&&void 0!==e?e:{}}return e.prototype.getCategory=function(){return e.category},e.prototype.getSubCategory=function(){return e.subCategory},e.prototype.getProviderName=function(){return e.providerName},e.category="Notifications",e.subCategory="InAppMessaging",e.providerName="AWSPinpoint",e}(),R=function(){return(R=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},V=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},U=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},B=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},q=new o.ConsoleLogger("Notifications.InAppMessaging"),z=function(){function e(){var e=this;this.config={},this.listeningForAnalyticEvents=!1,this.pluggables=[],this.storageSynced=!1,this.configure=function(t){void 0===t&&(t={});var n=t.listenForAnalyticsEvents,r=void 0===n||n,i=B(t,["listenForAnalyticsEvents"]);return e.config=R(R({},e.config),i),q.debug("configure InAppMessaging",e.config),e.pluggables.forEach((function(t){t.configure(e.config[t.getProviderName()])})),0===e.pluggables.length&&e.addPluggable(new H),r&&!e.listeningForAnalyticEvents&&(o.Hub.listen("analytics",e.analyticsListener),e.listeningForAnalyticEvents=!0),e.config},this.getPluggable=function(t){var n,r=null!==(n=e.pluggables.find((function(e){return e.getProviderName()===t})))&&void 0!==n?n:null;return r||q.debug("No plugin found with name "+t),r},this.addPluggable=function(t){if(t&&"Notifications"===t.getCategory()&&"InAppMessaging"===t.getSubCategory()){if(e.getPluggable(t.getProviderName()))throw new Error("Pluggable "+t.getProviderName()+" has already been added.");e.pluggables.push(t),t.configure(e.config[t.getProviderName()])}},this.removePluggable=function(t){var n=e.pluggables.findIndex((function(e){return e.getProviderName()===t}));-1===n?q.debug("No plugin found with name "+t):e.pluggables.splice(n,1)},this.syncMessages=function(){return Promise.all(e.pluggables.map((function(t){return V(e,void 0,void 0,(function(){var e,n,r;return U(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),[4,t.getInAppMessages()];case 1:return e=i.sent(),n=t.getProviderName()+"_inAppMessages",[4,this.setMessages(n,e)];case 2:return i.sent(),[3,4];case 3:throw r=i.sent(),q.error("Failed to sync messages",r),r;case 4:return[2]}}))}))})))},this.clearMessages=function(){return Promise.all(e.pluggables.map((function(t){return V(e,void 0,void 0,(function(){var e;return U(this,(function(n){switch(n.label){case 0:return e=t.getProviderName()+"_inAppMessages",[4,this.removeMessages(e)];case 1:return n.sent(),[2]}}))}))})))},this.dispatchEvent=function(t){return V(e,void 0,void 0,(function(){var e,n,i=this;return U(this,(function(o){switch(o.label){case 0:return[4,Promise.all(this.pluggables.map((function(e){return V(i,void 0,void 0,(function(){var n,r;return U(this,(function(i){switch(i.label){case 0:return n=e.getProviderName()+"_inAppMessages",[4,this.getMessages(n)];case 1:return r=i.sent(),[2,e.processInAppMessages(r,t)]}}))}))})))];case 1:return e=o.sent(),(n=a()(e)).length&&v(this.conflictHandler(n),r.MESSAGE_RECEIVED),[2]}}))}))},this.identifyUser=function(t,n){return Promise.all(e.pluggables.map((function(r){return V(e,void 0,void 0,(function(){var e;return U(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,r.identifyUser(t,n)];case 1:return i.sent(),[3,3];case 2:throw e=i.sent(),q.error("Failed to identify user",e),e;case 3:return[2]}}))}))})))},this.onMessageReceived=function(e){return h(e,r.MESSAGE_RECEIVED)},this.onMessageDisplayed=function(e){return h(e,r.MESSAGE_DISPLAYED)},this.onMessageDismissed=function(e){return h(e,r.MESSAGE_DISMISSED)},this.onMessageActionTaken=function(e){return h(e,r.MESSAGE_ACTION_TAKEN)},this.notifyMessageInteraction=function(e,t){v(e,t)},this.setConflictHandler=function(t){e.conflictHandler=t},this.analyticsListener=function(t){var n=t.payload,r=n.event,i=n.data;switch(r){case"record":e.dispatchEvent(i)}},this.syncStorage=function(){return V(e,void 0,void 0,(function(){var e,t;return U(this,(function(n){switch(n.label){case 0:e=this.config.storage,n.label=1;case 1:return n.trys.push([1,4,,5]),"function"!=typeof e.sync?[3,3]:[4,e.sync()];case 2:n.sent(),n.label=3;case 3:return this.storageSynced=!0,[3,5];case 4:return t=n.sent(),q.error("Failed to sync storage",t),[3,5];case 5:return[2]}}))}))},this.getMessages=function(t){return V(e,void 0,void 0,(function(){var e,n,r;return U(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),this.storageSynced?[3,2]:[4,this.syncStorage()];case 1:i.sent(),i.label=2;case 2:return e=this.config.storage,[2,(n=e.getItem(t))?JSON.parse(n):[]];case 3:return r=i.sent(),q.error("Failed to retrieve in-app messages from storage",r),[3,4];case 4:return[2]}}))}))},this.setMessages=function(t,n){return V(e,void 0,void 0,(function(){var e;return U(this,(function(r){switch(r.label){case 0:if(!n)return[2];r.label=1;case 1:return r.trys.push([1,4,,5]),this.storageSynced?[3,3]:[4,this.syncStorage()];case 2:r.sent(),r.label=3;case 3:return this.config.storage.setItem(t,JSON.stringify(n)),[3,5];case 4:return e=r.sent(),q.error("Failed to store in-app messages",e),[3,5];case 5:return[2]}}))}))},this.removeMessages=function(t){return V(e,void 0,void 0,(function(){var e;return U(this,(function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),this.storageSynced?[3,2]:[4,this.syncStorage()];case 1:n.sent(),n.label=2;case 2:return this.config.storage.removeItem(t),[3,4];case 3:return e=n.sent(),q.error("Failed to remove in-app messages from storage",e),[3,4];case 4:return[2]}}))}))},this.defaultConflictHandler=function(e){return e.sort((function(e,t){var n,r,i=null===(n=e.metadata)||void 0===n?void 0:n.endDate,o=null===(r=t.metadata)||void 0===r?void 0:r.endDate;return i===o?0:i&&!o?-1:!i&&o?1:new Date(i)<new Date(o)?-1:1}))[0]},this.config={storage:(new o.StorageHelper).getStorage()},this.setConflictHandler(this.defaultConflictHandler)}return e.prototype.getModuleName=function(){return"InAppMessaging"},e}(),K=function(){return(K=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},Y=new o.ConsoleLogger("Notifications"),J=new(function(){function e(){var e=this;this.config={},this.configure=function(t){var n=(void 0===t?{}:t).Notifications;return e.config=K(K({},e.config),n),Y.debug("configure Notifications",n),e.inAppMessaging.configure(e.config.InAppMessaging),e.config},this.inAppMessaging=new z}return e.prototype.getModuleName=function(){return"Notifications"},Object.defineProperty(e.prototype,"InAppMessaging",{get:function(){return this.inAppMessaging},enumerable:!0,configurable:!0}),e}()),W=J;o.Amplify.register(J)}])})); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("aws_amplify_core"),require("@aws-sdk/client-pinpoint"),require("aws_amplify_cache")):"function"==typeof define&&define.amd?define("aws_amplify_notifications",["aws_amplify_core","@aws-sdk/client-pinpoint","aws_amplify_cache"],t):"object"==typeof exports?exports.aws_amplify_notifications=t(require("aws_amplify_core"),require("@aws-sdk/client-pinpoint"),require("aws_amplify_cache")):e.aws_amplify_notifications=t(e.aws_amplify_core,e["@aws-sdk/client-pinpoint"],e.aws_amplify_cache)}(this,(function(e,t,n){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=53)}([function(t,n){t.exports=e},function(e,t,n){var r=n(10),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();e.exports=o},function(e,n){e.exports=t},function(e,t,n){var r=n(38),i=n(41);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},function(e,t,n){var r=n(33),i=n(36),o=n(11),s=n(12),a=n(46),u=n(47),c=n(15),l=n(49),f=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(a(e)&&(s(e)||"string"==typeof e||"function"==typeof e.splice||u(e)||l(e)||o(e)))return!e.length;var t=i(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(c(e))return!r(e).length;for(var n in e)if(f.call(e,n))return!1;return!0}},function(e,t,n){var r=n(6),i=n(29),o=n(30),s=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?i(e):o(e)}},function(e,t,n){var r=n(1).Symbol;e.exports=r},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t){e.exports=n},function(e,t,n){var r=n(31),i=n(32),o=i;o.v1=r,o.v4=i,e.exports=o},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(this,n(27))},function(e,t,n){var r=n(28),i=n(7),o=Object.prototype,s=o.hasOwnProperty,a=o.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(e){return i(e)&&s.call(e,"callee")&&!a.call(e,"callee")};e.exports=u},function(e,t){var n=Array.isArray;e.exports=n},function(e,t){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 r=new Uint8Array(16);e.exports=function(){return n(r),r}}else{var i=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),i[t]=e>>>((3&t)<<3)&255;return i}}},function(e,t){for(var n=[],r=0;r<256;++r)n[r]=(r+256).toString(16).substr(1);e.exports=function(e,t){var r=t||0,i=n;return[i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]]].join("")}},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(5),i=n(17);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t){var n=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return n.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},function(e,t){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){var r=n(24);e.exports=function(e){return(null==e?0:e.length)?r(e,1):[]}},function(e,t){e.exports=function(){}},,function(e,t,n){var r=n(25),i=n(26);e.exports=function e(t,n,o,s,a){var u=-1,c=t.length;for(o||(o=i),a||(a=[]);++u<c;){var l=t[u];n>0&&o(l)?n>1?e(l,n-1,o,s,a):r(a,l):s||(a[a.length]=l)}return a}},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}},function(e,t,n){var r=n(6),i=n(11),o=n(12),s=r?r.isConcatSpreadable:void 0;e.exports=function(e){return o(e)||i(e)||!!(s&&e&&e[s])}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(5),i=n(7);e.exports=function(e){return i(e)&&"[object Arguments]"==r(e)}},function(e,t,n){var r=n(6),i=Object.prototype,o=i.hasOwnProperty,s=i.toString,a=r?r.toStringTag:void 0;e.exports=function(e){var t=o.call(e,a),n=e[a];try{e[a]=void 0;var r=!0}catch(e){}var i=s.call(e);return r&&(t?e[a]=n:delete e[a]),i}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r,i,o=n(13),s=n(14),a=0,u=0;e.exports=function(e,t,n){var c=t&&n||0,l=t||[],f=(e=e||{}).node||r,p=void 0!==e.clockseq?e.clockseq:i;if(null==f||null==p){var d=o();null==f&&(f=r=[1|d[0],d[1],d[2],d[3],d[4],d[5]]),null==p&&(p=i=16383&(d[6]<<8|d[7]))}var g=void 0!==e.msecs?e.msecs:(new Date).getTime(),v=void 0!==e.nsecs?e.nsecs:u+1,h=g-a+(v-u)/1e4;if(h<0&&void 0===e.clockseq&&(p=p+1&16383),(h<0||g>a)&&void 0===e.nsecs&&(v=0),v>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");a=g,u=v,i=p;var y=(1e4*(268435455&(g+=122192928e5))+v)%4294967296;l[c++]=y>>>24&255,l[c++]=y>>>16&255,l[c++]=y>>>8&255,l[c++]=255&y;var b=g/4294967296*1e4&268435455;l[c++]=b>>>8&255,l[c++]=255&b,l[c++]=b>>>24&15|16,l[c++]=b>>>16&255,l[c++]=p>>>8|128,l[c++]=255&p;for(var m=0;m<6;++m)l[c+m]=f[m];return t||s(l)}},function(e,t,n){var r=n(13),i=n(14);e.exports=function(e,t,n){var o=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var s=(e=e||{}).random||(e.rng||r)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t)for(var a=0;a<16;++a)t[o+a]=s[a];return t||i(s)}},function(e,t,n){var r=n(15),i=n(34),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=[];for(var n in Object(e))o.call(e,n)&&"constructor"!=n&&t.push(n);return t}},function(e,t,n){var r=n(35)(Object.keys,Object);e.exports=r},function(e,t){e.exports=function(e,t){return function(n){return e(t(n))}}},function(e,t,n){var r=n(37),i=n(42),o=n(43),s=n(44),a=n(45),u=n(5),c=n(18),l=c(r),f=c(i),p=c(o),d=c(s),g=c(a),v=u;(r&&"[object DataView]"!=v(new r(new ArrayBuffer(1)))||i&&"[object Map]"!=v(new i)||o&&"[object Promise]"!=v(o.resolve())||s&&"[object Set]"!=v(new s)||a&&"[object WeakMap]"!=v(new a))&&(v=function(e){var t=u(e),n="[object Object]"==t?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case l:return"[object DataView]";case f:return"[object Map]";case p:return"[object Promise]";case d:return"[object Set]";case g:return"[object WeakMap]"}return t}),e.exports=v},function(e,t,n){var r=n(3)(n(1),"DataView");e.exports=r},function(e,t,n){var r=n(16),i=n(39),o=n(17),s=n(18),a=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,l=u.toString,f=c.hasOwnProperty,p=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(r(e)?p:a).test(s(e))}},function(e,t,n){var r,i=n(40),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!o&&o in e}},function(e,t,n){var r=n(1)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(3)(n(1),"Map");e.exports=r},function(e,t,n){var r=n(3)(n(1),"Promise");e.exports=r},function(e,t,n){var r=n(3)(n(1),"Set");e.exports=r},function(e,t,n){var r=n(3)(n(1),"WeakMap");e.exports=r},function(e,t,n){var r=n(16),i=n(19);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},function(e,t,n){(function(e){var r=n(1),i=n(48),o=t&&!t.nodeType&&t,s=o&&"object"==typeof e&&e&&!e.nodeType&&e,a=s&&s.exports===o?r.Buffer:void 0,u=(a?a.isBuffer:void 0)||i;e.exports=u}).call(this,n(20)(e))},function(e,t){e.exports=function(){return!1}},function(e,t,n){var r=n(50),i=n(51),o=n(52),s=o&&o.isTypedArray,a=s?i(s):r;e.exports=a},function(e,t,n){var r=n(5),i=n(19),o=n(7),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&i(e.length)&&!!s[r(e)]}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){var r=n(10),i=t&&!t.nodeType&&t,o=i&&"object"==typeof e&&e&&!e.nodeType&&e,s=o&&o.exports===i&&r.process,a=function(){try{var e=o&&o.require&&o.require("util").types;return e||s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=a}).call(this,n(20)(e))},function(e,t,n){"use strict";n.r(t),n.d(t,"Notifications",(function(){return q})),n.d(t,"InAppMessageInteractionEvent",(function(){return a}));var r=function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function i(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))}function o(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}Object.create;function s(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}Object.create;var a,u,c=n(0),l=n(21),f=n.n(l),p=n(8),d=n.n(p),g=n(2),v=n(9);!function(e){e.MESSAGE_RECEIVED="MESSAGE_RECEIVED_EVENT",e.MESSAGE_DISPLAYED="MESSAGE_DISPLAYED_EVENT",e.MESSAGE_DISMISSED="MESSAGE_DISMISSED_EVENT",e.MESSAGE_ACTION_TAKEN="MESSAGE_ACTION_TAKEN_EVENT"}(a||(a={}));var h,y,b=((u={})[a.MESSAGE_RECEIVED]=new Set,u[a.MESSAGE_DISPLAYED]=new Set,u[a.MESSAGE_DISMISSED]=new Set,u[a.MESSAGE_ACTION_TAKEN]=new Set,u),m=function(e,t){b[t].forEach((function(t){t.handleEvent(e)}))},S=function(e,t){var n={handleEvent:e,remove:function(){b[t].delete(n)}};return b[t].add(n),n},E=n(22),A=n.n(E),C=Object(c.browserOrNode)().isBrowser;C&&document&&(void 0!==document.hidden?(h="hidden",y="visibilitychange"):void 0!==document.msHidden?(h="msHidden",y="msvisibilitychange"):void 0!==document.webkitHidden&&(h="webkitHidden",y="webkitvisibilitychange"));var w,M=new c.ConsoleLogger("InAppMessagingSessionTracker"),I=function(e){var t=this;void 0===e&&(e=A.a),this.start=function(){return C&&(null===document||void 0===document||document.addEventListener(y,t.visibilityChangeHandler)),t.getSessionState()},this.end=function(){return C&&(null===document||void 0===document||document.removeEventListener(y,t.visibilityChangeHandler)),t.getSessionState()},this.getSessionState=function(){return C&&document&&!document[h]?"started":"ended"},this.visibilityChangeHandler=function(){C&&document&&(document[h]?(M.debug("App is now hidden"),t.sessionStateChangeHandler("ended")):(M.debug("App is now visible"),t.sessionStateChangeHandler("started")))},this.sessionStateChangeHandler=e};!function(e){e.MESSAGE_DISPLAYED="_inapp.message_displayed",e.MESSAGE_DISMISSED="_inapp.message_dismissed",e.MESSAGE_ACTION_TAKEN="_inapp.message_clicked"}(w||(w={}));var _=n(4),j=n.n(_),O="undefined"!=typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default",x={},P={},D={},T=new c.ConsoleLogger("AWSPinpointProvider"),N=function(e,t,n){c.Hub.dispatch("inAppMessaging",{event:e,data:t,message:n},"InAppMessaging",O)},k=function(){var e=new Date;return e.setHours(0,0,0,0),e.toISOString()},L=function(e){switch(e){case"EQUAL":return function(e,t){return e===t};case"GREATER_THAN":return function(e,t){return e<t};case"GREATER_THAN_OR_EQUAL":return function(e,t){return e<=t};case"LESS_THAN":return function(e,t){return e>t};case"LESS_THAN_OR_EQUAL":return function(e,t){return e>=t};default:return null}},G=function(e){var t,n,r=e.InAppMessage;return null!==(n=null===(t=null==r?void 0:r.Content)||void 0===t?void 0:t.map((function(e){var t=e.BackgroundColor,n=e.BodyConfig,r=e.HeaderConfig,i=e.ImageUrl,o=e.PrimaryBtn,s=e.SecondaryBtn,a=null==o?void 0:o.DefaultConfig,u=null==s?void 0:s.DefaultConfig,c={};return t&&(c.container={style:{backgroundColor:t}}),r&&(c.header={content:r.Header,style:{color:r.TextColor,textAlign:r.Alignment.toLowerCase()}}),n&&(c.body={content:n.Body,style:{color:n.TextColor,textAlign:n.Alignment.toLowerCase()}}),i&&(c.image={src:i}),a&&(c.primaryButton={title:a.Text,action:a.ButtonAction,url:a.Link,style:{backgroundColor:a.BackgroundColor,borderRadius:a.BorderRadius,color:a.TextColor}}),u&&(c.secondaryButton={title:u.Text,action:u.ButtonAction,url:u.Link,style:{backgroundColor:u.BackgroundColor,borderRadius:u.BorderRadius,color:u.TextColor}}),c})))&&void 0!==n?n:[]},F=function(e){var t=e.InAppMessage,n=e.Priority,r=e.Schedule,i=e.TreatmentId;return{customData:null==t?void 0:t.CustomConfig,endDate:null==r?void 0:r.EndDate,priority:n,treatmentId:i}},H=function(){function e(){var e,t=this;this.config={},this.configured=!1,this.endpointInitialized=!1,this.initialized=!1,this.configure=function(e){return void 0===e&&(e={}),t.config=r(r({},t.config),e),T.debug("configure AWSPinpointProvider",t.config),t.configured||(t.sessionTracker=new I(t.sessionStateChangeHandler),t.sessionTracker.start(),S((function(e){t.recordMessageEvent(e,w.MESSAGE_DISPLAYED)}),a.MESSAGE_DISPLAYED),S((function(e){t.recordMessageEvent(e,w.MESSAGE_DISMISSED)}),a.MESSAGE_DISMISSED),S((function(e){t.recordMessageEvent(e,w.MESSAGE_ACTION_TAKEN)}),a.MESSAGE_ACTION_TAKEN)),t.configured=!0,N("pinpointProvider_configured",null),t.config},this.getInAppMessages=function(){return i(t,void 0,void 0,(function(){var e,t,n,r,i,s,a,u,c;return o(this,(function(o){switch(o.label){case 0:return this.initialized?[3,2]:[4,this.init()];case 1:o.sent(),o.label=2;case 2:x={},P={},D={},o.label=3;case 3:return o.trys.push([3,6,,7]),[4,this.updateEndpoint()];case 4:return o.sent(),e=this.config,t=e.appId,n=e.endpointId,r=e.pinpointClient,i={ApplicationId:t,EndpointId:n},s=new g.GetInAppMessagesCommand(i),T.debug("getting in-app messages",i),[4,r.send(s)];case 5:return a=o.sent(),u=a.InAppMessagesResponse.InAppMessageCampaigns,N("getInAppMessages",u),[2,u];case 6:throw c=o.sent(),T.error("Error getting in-app messages",c),c;case 7:return[2]}}))}))},this.processInAppMessages=function(e,n){return i(t,void 0,void 0,(function(){var t,r=this;return o(this,(function(i){switch(i.label){case 0:return this.initialized?[3,2]:[4,this.init()];case 1:i.sent(),i.label=2;case 2:return[2,this.normalizeMessages(e.reduce((function(e,i){if(function(e,t){var n,r=e.CampaignId,i=e.Schedule,o=t.name,s=(null===(n=null==i?void 0:i.EventFilter)||void 0===n?void 0:n.Dimensions).EventType,a=r+":"+o;return x.hasOwnProperty(a)||(x[a]=!!(null==s?void 0:s.Values.includes(o))),x[a]}(i,n)&&function(e,t){var n,r=e.CampaignId,i=e.Schedule,o=t.attributes,a=(null===(n=null==i?void 0:i.EventFilter)||void 0===n?void 0:n.Dimensions).Attributes;if(j()(a))return!0;if(j()(o))return!1;var u=r+":"+JSON.stringify(o);return P.hasOwnProperty(u)||(P[u]=Object.entries(a).every((function(e){var t=s(e,2),n=t[0];return t[1].Values.includes(o[n])}))),P[u]}(i,n)&&function(e,t){var n,r=e.CampaignId,i=e.Schedule,o=t.metrics,a=(null===(n=null==i?void 0:i.EventFilter)||void 0===n?void 0:n.Dimensions).Metrics;if(j()(a))return!0;if(j()(o))return!1;var u=r+":"+JSON.stringify(o);return D.hasOwnProperty(u)||(D[u]=Object.entries(a).every((function(e){var t=s(e,2),n=t[0],r=t[1],i=r.ComparisonOperator,a=r.Value,u=L(i);return!!u&&u(a,o[n])}))),D[u]}(i,n)&&function(e){var t=e.Schedule;return!(null==t?void 0:t.EndDate)||new Date<new Date(t.EndDate)}(i)&&r.isBelowCap(i))if(t){if(i.Priority){if(i.Priority<t)return t=i.Priority,[i];i.Priority===t&&e.push(i)}}else{if(i.Priority)return t=i.Priority,[i];e.push(i)}return e}),[]))]}}))}))},this.identifyUser=function(e,n){return i(t,void 0,void 0,(function(){var t;return o(this,(function(r){switch(r.label){case 0:return this.initialized?[3,2]:[4,this.init()];case 1:r.sent(),r.label=2;case 2:return r.trys.push([2,4,,5]),[4,this.updateEndpoint(e,n)];case 3:return r.sent(),[3,5];case 4:throw t=r.sent(),T.error("Error identifying user",t),t;case 5:return[2]}}))}))},this.init=function(){return i(t,void 0,void 0,(function(){var e,t,n,r,i,s;return o(this,(function(o){switch(o.label){case 0:e=this.config,t=e.endpointId,n=e.storage,r=this.getProviderName(),o.label=1;case 1:return o.trys.push([1,6,,7]),"function"!=typeof n.sync?[3,3]:[4,n.sync()];case 2:o.sent(),o.label=3;case 3:return t?[3,5]:(i=this.config,[4,this.getEndpointId()]);case 4:i.endpointId=o.sent(),o.label=5;case 5:return this.initialized=!0,[3,7];case 6:return s=o.sent(),T.error("Failed to initialize "+r,s),[3,7];case 7:return[2]}}))}))},this.initPinpointClient=function(){return i(t,void 0,void 0,(function(){var e,t,n,r,i;return o(this,(function(o){if(e=this.config,t=e.appId,n=e.credentials,r=e.pinpointClient,i=e.region,!t||!n||!i)throw new Error("One or more of credentials, appId or region is not configured");return r&&r.destroy(),this.config.pinpointClient=new g.PinpointClient({region:i,credentials:n,customUserAgent:Object(c.getAmplifyUserAgent)()}),[2]}))}))},this.getEndpointId=function(){return i(t,void 0,void 0,(function(){var e,t,n,r,i;return o(this,(function(o){switch(o.label){case 0:return e=this.config.appId,t=this.getSubCategory()+":"+this.getProviderName()+":"+e,[4,d.a.getItem(t)];case 1:return(n=o.sent())?[2,n]:(r=Object(v.v4)(),31536e8,i=(new Date).getTime()+31536e8,d.a.setItem(t,r,{expires:i,priority:1}),[2,r])}}))}))},this.updateEndpoint=function(e,n){return void 0===e&&(e=null),void 0===n&&(n=null),i(t,void 0,void 0,(function(){var t,i,s,a,u,l,f,p,d,h,y,b,m,S,E,A,C,w,M,I,_,j,O,x,P;return o(this,(function(o){switch(o.label){case 0:return t=this.config,i=t.appId,s=t.credentials,a=t.endpointId,u=t.endpointInfo,l=void 0===u?{}:u,f=t.pinpointClient,[4,this.getCredentials()];case 1:if(p=o.sent(),d=!s||Object.keys(p).some((function(e){return p[e]!==s[e]})),this.endpointInitialized&&!d&&!e&&!n)return[2];this.config.credentials=p,o.label=2;case 2:return o.trys.push([2,6,,7]),f&&!d?[3,4]:[4,this.initPinpointClient()];case 3:o.sent(),o.label=4;case 4:return y=(h=null!=n?n:{}).address,b=h.attributes,m=h.demographic,S=h.location,E=h.metrics,A=h.optOut,C=this.clientInfo,w=C.appVersion,M=C.make,I=C.model,_=C.platform,j=C.version,O={ApplicationId:i,EndpointId:a,EndpointRequest:{RequestId:Object(v.v4)(),EffectiveDate:(new Date).toISOString(),ChannelType:g.ChannelType.IN_APP,Address:null!=y?y:l.address,Attributes:r(r({},l.attributes),b),Demographic:r({AppVersion:w,Make:M,Model:I,ModelVersion:j,Platform:_},Object(c.transferKeyToUpperCase)(r(r({},l.demographic),m))),Location:Object(c.transferKeyToUpperCase)(r(r({},l.location),S)),Metrics:r(r({},l.metrics),E),OptOut:null!=A?A:l.optOut,User:{UserId:null!==(P=null!=e?e:l.userId)&&void 0!==P?P:p.identityId,UserAttributes:null!=b?b:l.userAttributes}}},x=new g.UpdateEndpointCommand(O),T.debug("updating endpoint",O),[4,this.config.pinpointClient.send(x)];case 5:return o.sent(),this.endpointInitialized=!0,[3,7];case 6:throw o.sent();case 7:return[2]}}))}))},this.getCredentials=function(){return i(t,void 0,void 0,(function(){var e,t;return o(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,c.Credentials.get()];case 1:return(e=n.sent())?[2,c.Credentials.shear(e)]:(T.debug("no credentials found"),[2,null]);case 2:return t=n.sent(),T.error("Error getting credentials:",t),[2,null];case 3:return[2]}}))}))},this.sessionStateChangeHandler=function(e){"started"===e&&(t.sessionMessageCountMap={})},this.isBelowCap=function(e){var n=e.CampaignId,r=e.SessionCap,i=e.DailyCap,o=e.TotalCap,s=t.getMessageCounts(n),a=s.sessionCount,u=s.dailyCount,c=s.totalCount;return(!r||a<r)&&(!i||u<i)&&(!o||c<o)},this.getSessionCount=function(e){return t.sessionMessageCountMap[e]||0},this.getDailyCount=function(){var e=t.config.storage,n=k(),r=e.getItem("pinpointProvider_inAppMessages_dailyCount"),i=r?JSON.parse(r):{count:0,lastCountTimestamp:n};return i.lastCountTimestamp===n?i.count:0},this.getTotalCountMap=function(){var e=t.config.storage.getItem("pinpointProvider_inAppMessages_totalCount");return e?JSON.parse(e):{}},this.getTotalCount=function(e){return t.getTotalCountMap()[e]||0},this.getMessageCounts=function(e){try{return{sessionCount:t.getSessionCount(e),dailyCount:t.getDailyCount(),totalCount:t.getTotalCount(e)}}catch(e){T.error("Failed to get message counts from storage",e)}},this.setSessionCount=function(e,n){t.sessionMessageCountMap[e]=n},this.setDailyCount=function(e){var n=t.config.storage,r={count:e,lastCountTimestamp:k()};try{n.setItem("pinpointProvider_inAppMessages_dailyCount",JSON.stringify(r))}catch(e){T.error("Failed to save daily message count to storage",e)}},this.setTotalCountMap=function(e){var n=t.config.storage;try{n.setItem("pinpointProvider_inAppMessages_totalCount",JSON.stringify(e))}catch(e){T.error("Failed to save total count to storage",e)}},this.setTotalCount=function(e,n){var i,o=r(r({},t.getTotalCountMap()),((i={})[e]=n,i));t.setTotalCountMap(o)},this.incrementCounts=function(e){return i(t,void 0,void 0,(function(){var t,n,r,i;return o(this,(function(o){return t=this.getMessageCounts(e),n=t.sessionCount,r=t.dailyCount,i=t.totalCount,this.setSessionCount(e,n+1),this.setDailyCount(r+1),this.setTotalCount(e,i+1),[2]}))}))},this.normalizeMessages=function(e){return e.map((function(e){var t,n=e.CampaignId,r=e.InAppMessage;return{id:n,content:G(e),layout:(t=r.Layout,t===g.Layout.MOBILE_FEED?"MODAL":t===g.Layout.OVERLAYS?"FULL_SCREEN":t),metadata:F(e)}}))},this.recordMessageEvent=function(e,n){return i(t,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return this.initialized?[3,2]:[4,this.init()];case 1:t.sent(),t.label=2;case 2:return function(e,t){if(t)if(c.Amplify.Analytics&&"function"==typeof c.Amplify.Analytics.record){var n=t.id,r=t.metadata;c.Amplify.Analytics.record({name:e,attributes:{campaign_id:n,delivery_type:"IN_APP_MESSAGE",treatment_id:null==r?void 0:r.treatmentId}})}else T.debug("Analytics module is not registered into Amplify");else T.debug("Unable to record analytics event - no InAppMessage was received")}(n,e),n!==w.MESSAGE_DISPLAYED?[3,4]:[4,this.incrementCounts(e.id)];case 3:t.sent(),t.label=4;case 4:return[2]}}))}))},this.sessionMessageCountMap={},this.config={storage:(new c.StorageHelper).getStorage()},this.clientInfo=null!==(e=c.ClientDevice.clientInfo())&&void 0!==e?e:{}}return e.prototype.getCategory=function(){return e.category},e.prototype.getSubCategory=function(){return e.subCategory},e.prototype.getProviderName=function(){return e.providerName},e.category="Notifications",e.subCategory="InAppMessaging",e.providerName="AWSPinpoint",e}(),R=new c.ConsoleLogger("Notifications.InAppMessaging"),V=function(){function e(){var e=this;this.config={},this.listeningForAnalyticEvents=!1,this.pluggables=[],this.storageSynced=!1,this.configure=function(t){void 0===t&&(t={});var n=t.listenForAnalyticsEvents,i=void 0===n||n,o=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(t,["listenForAnalyticsEvents"]);return e.config=r(r({},e.config),o),R.debug("configure InAppMessaging",e.config),e.pluggables.forEach((function(t){t.configure(e.config[t.getProviderName()])})),0===e.pluggables.length&&e.addPluggable(new H),i&&!e.listeningForAnalyticEvents&&(c.Hub.listen("analytics",e.analyticsListener),e.listeningForAnalyticEvents=!0),e.config},this.getPluggable=function(t){var n,r=null!==(n=e.pluggables.find((function(e){return e.getProviderName()===t})))&&void 0!==n?n:null;return r||R.debug("No plugin found with name "+t),r},this.addPluggable=function(t){if(t&&"Notifications"===t.getCategory()&&"InAppMessaging"===t.getSubCategory()){if(e.getPluggable(t.getProviderName()))throw new Error("Pluggable "+t.getProviderName()+" has already been added.");e.pluggables.push(t),t.configure(e.config[t.getProviderName()])}},this.removePluggable=function(t){var n=e.pluggables.findIndex((function(e){return e.getProviderName()===t}));-1===n?R.debug("No plugin found with name "+t):e.pluggables.splice(n,1)},this.syncMessages=function(){return Promise.all(e.pluggables.map((function(t){return i(e,void 0,void 0,(function(){var e,n,r;return o(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),[4,t.getInAppMessages()];case 1:return e=i.sent(),n=t.getProviderName()+"_inAppMessages",[4,this.setMessages(n,e)];case 2:return i.sent(),[3,4];case 3:throw r=i.sent(),R.error("Failed to sync messages",r),r;case 4:return[2]}}))}))})))},this.clearMessages=function(){return Promise.all(e.pluggables.map((function(t){return i(e,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return e=t.getProviderName()+"_inAppMessages",[4,this.removeMessages(e)];case 1:return n.sent(),[2]}}))}))})))},this.dispatchEvent=function(t){return i(e,void 0,void 0,(function(){var e,n,r=this;return o(this,(function(s){switch(s.label){case 0:return[4,Promise.all(this.pluggables.map((function(e){return i(r,void 0,void 0,(function(){var n,r;return o(this,(function(i){switch(i.label){case 0:return n=e.getProviderName()+"_inAppMessages",[4,this.getMessages(n)];case 1:return r=i.sent(),[2,e.processInAppMessages(r,t)]}}))}))})))];case 1:return e=s.sent(),(n=f()(e)).length&&m(this.conflictHandler(n),a.MESSAGE_RECEIVED),[2]}}))}))},this.identifyUser=function(t,n){return Promise.all(e.pluggables.map((function(r){return i(e,void 0,void 0,(function(){var e;return o(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,r.identifyUser(t,n)];case 1:return i.sent(),[3,3];case 2:throw e=i.sent(),R.error("Failed to identify user",e),e;case 3:return[2]}}))}))})))},this.onMessageReceived=function(e){return S(e,a.MESSAGE_RECEIVED)},this.onMessageDisplayed=function(e){return S(e,a.MESSAGE_DISPLAYED)},this.onMessageDismissed=function(e){return S(e,a.MESSAGE_DISMISSED)},this.onMessageActionTaken=function(e){return S(e,a.MESSAGE_ACTION_TAKEN)},this.notifyMessageInteraction=function(e,t){m(e,t)},this.setConflictHandler=function(t){e.conflictHandler=t},this.analyticsListener=function(t){var n=t.payload,r=n.event,i=n.data;switch(r){case"record":e.dispatchEvent(i)}},this.syncStorage=function(){return i(e,void 0,void 0,(function(){var e,t;return o(this,(function(n){switch(n.label){case 0:e=this.config.storage,n.label=1;case 1:return n.trys.push([1,4,,5]),"function"!=typeof e.sync?[3,3]:[4,e.sync()];case 2:n.sent(),n.label=3;case 3:return this.storageSynced=!0,[3,5];case 4:return t=n.sent(),R.error("Failed to sync storage",t),[3,5];case 5:return[2]}}))}))},this.getMessages=function(t){return i(e,void 0,void 0,(function(){var e,n,r;return o(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),this.storageSynced?[3,2]:[4,this.syncStorage()];case 1:i.sent(),i.label=2;case 2:return e=this.config.storage,[2,(n=e.getItem(t))?JSON.parse(n):[]];case 3:return r=i.sent(),R.error("Failed to retrieve in-app messages from storage",r),[3,4];case 4:return[2]}}))}))},this.setMessages=function(t,n){return i(e,void 0,void 0,(function(){var e;return o(this,(function(r){switch(r.label){case 0:if(!n)return[2];r.label=1;case 1:return r.trys.push([1,4,,5]),this.storageSynced?[3,3]:[4,this.syncStorage()];case 2:r.sent(),r.label=3;case 3:return this.config.storage.setItem(t,JSON.stringify(n)),[3,5];case 4:return e=r.sent(),R.error("Failed to store in-app messages",e),[3,5];case 5:return[2]}}))}))},this.removeMessages=function(t){return i(e,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),this.storageSynced?[3,2]:[4,this.syncStorage()];case 1:n.sent(),n.label=2;case 2:return this.config.storage.removeItem(t),[3,4];case 3:return e=n.sent(),R.error("Failed to remove in-app messages from storage",e),[3,4];case 4:return[2]}}))}))},this.defaultConflictHandler=function(e){return e.sort((function(e,t){var n,r,i=null===(n=e.metadata)||void 0===n?void 0:n.endDate,o=null===(r=t.metadata)||void 0===r?void 0:r.endDate;return i===o?0:i&&!o?-1:!i&&o?1:new Date(i)<new Date(o)?-1:1}))[0]},this.config={storage:(new c.StorageHelper).getStorage()},this.setConflictHandler(this.defaultConflictHandler)}return e.prototype.getModuleName=function(){return"InAppMessaging"},e}(),U=new c.ConsoleLogger("Notifications"),B=new(function(){function e(){var e=this;this.config={},this.configure=function(t){var n=(void 0===t?{}:t).Notifications;return e.config=r(r({},e.config),n),U.debug("configure Notifications",n),e.inAppMessaging.configure(e.config.InAppMessaging),e.config},this.inAppMessaging=new V}return e.prototype.getModuleName=function(){return"Notifications"},Object.defineProperty(e.prototype,"InAppMessaging",{get:function(){return this.inAppMessaging},enumerable:!0,configurable:!0}),e}()),q=B;c.Amplify.register(B)}])})); | ||
//# sourceMappingURL=aws-amplify-notifications.min.js.map |
@@ -13,60 +13,3 @@ /* | ||
*/ | ||
var __assign = (this && this.__assign) || function () { | ||
__assign = Object.assign || function(t) { | ||
for (var s, i = 1, n = arguments.length; i < n; i++) { | ||
s = arguments[i]; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) | ||
t[p] = s[p]; | ||
} | ||
return t; | ||
}; | ||
return __assign.apply(this, arguments); | ||
}; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | ||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | ||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||
step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
}); | ||
}; | ||
var __generator = (this && this.__generator) || function (thisArg, body) { | ||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; | ||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; | ||
function verb(n) { return function (v) { return step([n, v]); }; } | ||
function step(op) { | ||
if (f) throw new TypeError("Generator is already executing."); | ||
while (_) try { | ||
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; | ||
if (y = 0, t) op = [op[0] & 2, t.value]; | ||
switch (op[0]) { | ||
case 0: case 1: t = op; break; | ||
case 4: _.label++; return { value: op[1], done: false }; | ||
case 5: _.label++; y = op[1]; op = [0]; continue; | ||
case 7: op = _.ops.pop(); _.trys.pop(); continue; | ||
default: | ||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } | ||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } | ||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } | ||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } | ||
if (t[2]) _.ops.pop(); | ||
_.trys.pop(); continue; | ||
} | ||
op = body.call(thisArg, _); | ||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } | ||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; | ||
} | ||
}; | ||
var __rest = (this && this.__rest) || function (s, e) { | ||
var t = {}; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) | ||
t[p] = s[p]; | ||
if (s != null && typeof Object.getOwnPropertySymbols === "function") | ||
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { | ||
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) | ||
t[p[i]] = s[p[i]]; | ||
} | ||
return t; | ||
}; | ||
import { __assign, __awaiter, __generator, __rest } from "tslib"; | ||
import { ConsoleLogger as Logger, Hub, StorageHelper, } from '@aws-amplify/core'; | ||
@@ -73,0 +16,0 @@ import flatten from 'lodash/flatten'; |
@@ -13,49 +13,3 @@ /* | ||
*/ | ||
var __assign = (this && this.__assign) || function () { | ||
__assign = Object.assign || function(t) { | ||
for (var s, i = 1, n = arguments.length; i < n; i++) { | ||
s = arguments[i]; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) | ||
t[p] = s[p]; | ||
} | ||
return t; | ||
}; | ||
return __assign.apply(this, arguments); | ||
}; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | ||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | ||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||
step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
}); | ||
}; | ||
var __generator = (this && this.__generator) || function (thisArg, body) { | ||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; | ||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; | ||
function verb(n) { return function (v) { return step([n, v]); }; } | ||
function step(op) { | ||
if (f) throw new TypeError("Generator is already executing."); | ||
while (_) try { | ||
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; | ||
if (y = 0, t) op = [op[0] & 2, t.value]; | ||
switch (op[0]) { | ||
case 0: case 1: t = op; break; | ||
case 4: _.label++; return { value: op[1], done: false }; | ||
case 5: _.label++; y = op[1]; op = [0]; continue; | ||
case 7: op = _.ops.pop(); _.trys.pop(); continue; | ||
default: | ||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } | ||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } | ||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } | ||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } | ||
if (t[2]) _.ops.pop(); | ||
_.trys.pop(); continue; | ||
} | ||
op = body.call(thisArg, _); | ||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } | ||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; | ||
} | ||
}; | ||
import { __assign, __awaiter, __generator } from "tslib"; | ||
import { ClientDevice, Credentials, getAmplifyUserAgent, StorageHelper, transferKeyToUpperCase, } from '@aws-amplify/core'; | ||
@@ -62,0 +16,0 @@ import Cache from '@aws-amplify/cache'; |
@@ -13,18 +13,3 @@ /* | ||
*/ | ||
var __read = (this && this.__read) || function (o, n) { | ||
var m = typeof Symbol === "function" && o[Symbol.iterator]; | ||
if (!m) return o; | ||
var i = m.call(o), r, ar = [], e; | ||
try { | ||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); | ||
} | ||
catch (error) { e = { error: error }; } | ||
finally { | ||
try { | ||
if (r && !r.done && (m = i["return"])) m.call(i); | ||
} | ||
finally { if (e) throw e.error; } | ||
} | ||
return ar; | ||
}; | ||
import { __read } from "tslib"; | ||
import { Amplify, ConsoleLogger, Hub } from '@aws-amplify/core'; | ||
@@ -31,0 +16,0 @@ import { Layout as PinpointInAppMessageLayout, } from '@aws-sdk/client-pinpoint'; |
@@ -13,13 +13,3 @@ /* | ||
*/ | ||
var __assign = (this && this.__assign) || function () { | ||
__assign = Object.assign || function(t) { | ||
for (var s, i = 1, n = arguments.length; i < n; i++) { | ||
s = arguments[i]; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) | ||
t[p] = s[p]; | ||
} | ||
return t; | ||
}; | ||
return __assign.apply(this, arguments); | ||
}; | ||
import { __assign } from "tslib"; | ||
import { Amplify, ConsoleLogger as Logger } from '@aws-amplify/core'; | ||
@@ -26,0 +16,0 @@ import InAppMessaging from './InAppMessaging'; |
@@ -14,66 +14,6 @@ "use strict"; | ||
*/ | ||
var __assign = (this && this.__assign) || function () { | ||
__assign = Object.assign || function(t) { | ||
for (var s, i = 1, n = arguments.length; i < n; i++) { | ||
s = arguments[i]; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) | ||
t[p] = s[p]; | ||
} | ||
return t; | ||
}; | ||
return __assign.apply(this, arguments); | ||
}; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | ||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | ||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||
step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
}); | ||
}; | ||
var __generator = (this && this.__generator) || function (thisArg, body) { | ||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; | ||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; | ||
function verb(n) { return function (v) { return step([n, v]); }; } | ||
function step(op) { | ||
if (f) throw new TypeError("Generator is already executing."); | ||
while (_) try { | ||
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; | ||
if (y = 0, t) op = [op[0] & 2, t.value]; | ||
switch (op[0]) { | ||
case 0: case 1: t = op; break; | ||
case 4: _.label++; return { value: op[1], done: false }; | ||
case 5: _.label++; y = op[1]; op = [0]; continue; | ||
case 7: op = _.ops.pop(); _.trys.pop(); continue; | ||
default: | ||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } | ||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } | ||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } | ||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } | ||
if (t[2]) _.ops.pop(); | ||
_.trys.pop(); continue; | ||
} | ||
op = body.call(thisArg, _); | ||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } | ||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; | ||
} | ||
}; | ||
var __rest = (this && this.__rest) || function (s, e) { | ||
var t = {}; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) | ||
t[p] = s[p]; | ||
if (s != null && typeof Object.getOwnPropertySymbols === "function") | ||
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { | ||
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) | ||
t[p[i]] = s[p[i]]; | ||
} | ||
return t; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
var core_1 = require("@aws-amplify/core"); | ||
var flatten_1 = __importDefault(require("lodash/flatten")); | ||
var flatten_1 = tslib_1.__importDefault(require("lodash/flatten")); | ||
var Providers_1 = require("./Providers"); | ||
@@ -97,4 +37,4 @@ var eventListeners_1 = require("./eventListeners"); | ||
if (_a === void 0) { _a = {}; } | ||
var _b = _a.listenForAnalyticsEvents, listenForAnalyticsEvents = _b === void 0 ? true : _b, config = __rest(_a, ["listenForAnalyticsEvents"]); | ||
_this.config = __assign(__assign({}, _this.config), config); | ||
var _b = _a.listenForAnalyticsEvents, listenForAnalyticsEvents = _b === void 0 ? true : _b, config = tslib_1.__rest(_a, ["listenForAnalyticsEvents"]); | ||
_this.config = tslib_1.__assign(tslib_1.__assign({}, _this.config), config); | ||
logger.debug('configure InAppMessaging', _this.config); | ||
@@ -159,5 +99,5 @@ _this.pluggables.forEach(function (pluggable) { | ||
this.syncMessages = function () { | ||
return Promise.all(_this.pluggables.map(function (pluggable) { return __awaiter(_this, void 0, void 0, function () { | ||
return Promise.all(_this.pluggables.map(function (pluggable) { return tslib_1.__awaiter(_this, void 0, void 0, function () { | ||
var messages, key, err_1; | ||
return __generator(this, function (_a) { | ||
return tslib_1.__generator(this, function (_a) { | ||
switch (_a.label) { | ||
@@ -184,5 +124,5 @@ case 0: | ||
this.clearMessages = function () { | ||
return Promise.all(_this.pluggables.map(function (pluggable) { return __awaiter(_this, void 0, void 0, function () { | ||
return Promise.all(_this.pluggables.map(function (pluggable) { return tslib_1.__awaiter(_this, void 0, void 0, function () { | ||
var key; | ||
return __generator(this, function (_a) { | ||
return tslib_1.__generator(this, function (_a) { | ||
switch (_a.label) { | ||
@@ -199,10 +139,10 @@ case 0: | ||
}; | ||
this.dispatchEvent = function (event) { return __awaiter(_this, void 0, void 0, function () { | ||
this.dispatchEvent = function (event) { return tslib_1.__awaiter(_this, void 0, void 0, function () { | ||
var messages, flattenedMessages; | ||
var _this = this; | ||
return __generator(this, function (_a) { | ||
return tslib_1.__generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: return [4 /*yield*/, Promise.all(this.pluggables.map(function (pluggable) { return __awaiter(_this, void 0, void 0, function () { | ||
case 0: return [4 /*yield*/, Promise.all(this.pluggables.map(function (pluggable) { return tslib_1.__awaiter(_this, void 0, void 0, function () { | ||
var key, messages; | ||
return __generator(this, function (_a) { | ||
return tslib_1.__generator(this, function (_a) { | ||
switch (_a.label) { | ||
@@ -229,5 +169,5 @@ case 0: | ||
this.identifyUser = function (userId, userInfo) { | ||
return Promise.all(_this.pluggables.map(function (pluggable) { return __awaiter(_this, void 0, void 0, function () { | ||
return Promise.all(_this.pluggables.map(function (pluggable) { return tslib_1.__awaiter(_this, void 0, void 0, function () { | ||
var err_2; | ||
return __generator(this, function (_a) { | ||
return tslib_1.__generator(this, function (_a) { | ||
switch (_a.label) { | ||
@@ -279,5 +219,5 @@ case 0: | ||
}; | ||
this.syncStorage = function () { return __awaiter(_this, void 0, void 0, function () { | ||
this.syncStorage = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () { | ||
var storage, err_3; | ||
return __generator(this, function (_a) { | ||
return tslib_1.__generator(this, function (_a) { | ||
switch (_a.label) { | ||
@@ -305,5 +245,5 @@ case 0: | ||
}); }; | ||
this.getMessages = function (key) { return __awaiter(_this, void 0, void 0, function () { | ||
this.getMessages = function (key) { return tslib_1.__awaiter(_this, void 0, void 0, function () { | ||
var storage, storedMessages, err_4; | ||
return __generator(this, function (_a) { | ||
return tslib_1.__generator(this, function (_a) { | ||
switch (_a.label) { | ||
@@ -329,5 +269,5 @@ case 0: | ||
}); }; | ||
this.setMessages = function (key, messages) { return __awaiter(_this, void 0, void 0, function () { | ||
this.setMessages = function (key, messages) { return tslib_1.__awaiter(_this, void 0, void 0, function () { | ||
var storage, err_5; | ||
return __generator(this, function (_a) { | ||
return tslib_1.__generator(this, function (_a) { | ||
switch (_a.label) { | ||
@@ -358,5 +298,5 @@ case 0: | ||
}); }; | ||
this.removeMessages = function (key) { return __awaiter(_this, void 0, void 0, function () { | ||
this.removeMessages = function (key) { return tslib_1.__awaiter(_this, void 0, void 0, function () { | ||
var storage, err_6; | ||
return __generator(this, function (_a) { | ||
return tslib_1.__generator(this, function (_a) { | ||
switch (_a.label) { | ||
@@ -363,0 +303,0 @@ case 0: |
@@ -14,59 +14,10 @@ "use strict"; | ||
*/ | ||
var __assign = (this && this.__assign) || function () { | ||
__assign = Object.assign || function(t) { | ||
for (var s, i = 1, n = arguments.length; i < n; i++) { | ||
s = arguments[i]; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) | ||
t[p] = s[p]; | ||
} | ||
return t; | ||
}; | ||
return __assign.apply(this, arguments); | ||
}; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | ||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | ||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||
step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
}); | ||
}; | ||
var __generator = (this && this.__generator) || function (thisArg, body) { | ||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; | ||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; | ||
function verb(n) { return function (v) { return step([n, v]); }; } | ||
function step(op) { | ||
if (f) throw new TypeError("Generator is already executing."); | ||
while (_) try { | ||
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; | ||
if (y = 0, t) op = [op[0] & 2, t.value]; | ||
switch (op[0]) { | ||
case 0: case 1: t = op; break; | ||
case 4: _.label++; return { value: op[1], done: false }; | ||
case 5: _.label++; y = op[1]; op = [0]; continue; | ||
case 7: op = _.ops.pop(); _.trys.pop(); continue; | ||
default: | ||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } | ||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } | ||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } | ||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } | ||
if (t[2]) _.ops.pop(); | ||
_.trys.pop(); continue; | ||
} | ||
op = body.call(thisArg, _); | ||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } | ||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; | ||
} | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
var core_1 = require("@aws-amplify/core"); | ||
var cache_1 = __importDefault(require("@aws-amplify/cache")); | ||
var cache_1 = tslib_1.__importDefault(require("@aws-amplify/cache")); | ||
var client_pinpoint_1 = require("@aws-sdk/client-pinpoint"); | ||
var uuid_1 = require("uuid"); | ||
var eventListeners_1 = require("../../eventListeners"); | ||
var SessionTracker_1 = __importDefault(require("../../SessionTracker")); | ||
var SessionTracker_1 = tslib_1.__importDefault(require("../../SessionTracker")); | ||
var types_1 = require("../../types"); | ||
@@ -87,3 +38,3 @@ var types_2 = require("./types"); | ||
if (config === void 0) { config = {}; } | ||
_this.config = __assign(__assign({}, _this.config), config); | ||
_this.config = tslib_1.__assign(tslib_1.__assign({}, _this.config), config); | ||
utils_1.logger.debug('configure AWSPinpointProvider', _this.config); | ||
@@ -109,5 +60,5 @@ // some configuration steps should not be re-run even if provider is re-configured for some reason | ||
}; | ||
this.getInAppMessages = function () { return __awaiter(_this, void 0, void 0, function () { | ||
this.getInAppMessages = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () { | ||
var _a, appId, endpointId, pinpointClient, input, command, response, messages, err_1; | ||
return __generator(this, function (_b) { | ||
return tslib_1.__generator(this, function (_b) { | ||
switch (_b.label) { | ||
@@ -152,6 +103,6 @@ case 0: | ||
}); }; | ||
this.processInAppMessages = function (messages, event) { return __awaiter(_this, void 0, void 0, function () { | ||
this.processInAppMessages = function (messages, event) { return tslib_1.__awaiter(_this, void 0, void 0, function () { | ||
var highestPrioritySeen; | ||
var _this = this; | ||
return __generator(this, function (_a) { | ||
return tslib_1.__generator(this, function (_a) { | ||
switch (_a.label) { | ||
@@ -202,5 +153,5 @@ case 0: | ||
}); }; | ||
this.identifyUser = function (userId, userInfo) { return __awaiter(_this, void 0, void 0, function () { | ||
this.identifyUser = function (userId, userInfo) { return tslib_1.__awaiter(_this, void 0, void 0, function () { | ||
var err_2; | ||
return __generator(this, function (_a) { | ||
return tslib_1.__generator(this, function (_a) { | ||
switch (_a.label) { | ||
@@ -227,5 +178,5 @@ case 0: | ||
}); }; | ||
this.init = function () { return __awaiter(_this, void 0, void 0, function () { | ||
this.init = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () { | ||
var _a, endpointId, storage, providerName, _b, err_3; | ||
return __generator(this, function (_c) { | ||
return tslib_1.__generator(this, function (_c) { | ||
switch (_c.label) { | ||
@@ -261,5 +212,5 @@ case 0: | ||
}); }; | ||
this.initPinpointClient = function () { return __awaiter(_this, void 0, void 0, function () { | ||
this.initPinpointClient = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () { | ||
var _a, appId, credentials, pinpointClient, region; | ||
return __generator(this, function (_b) { | ||
return tslib_1.__generator(this, function (_b) { | ||
_a = this.config, appId = _a.appId, credentials = _a.credentials, pinpointClient = _a.pinpointClient, region = _a.region; | ||
@@ -280,5 +231,5 @@ if (!appId || !credentials || !region) { | ||
}); }; | ||
this.getEndpointId = function () { return __awaiter(_this, void 0, void 0, function () { | ||
this.getEndpointId = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () { | ||
var appId, cacheKey, cachedEndpointId, endpointId, ttl, expiration; | ||
return __generator(this, function (_a) { | ||
return tslib_1.__generator(this, function (_a) { | ||
switch (_a.label) { | ||
@@ -309,6 +260,6 @@ case 0: | ||
if (userInfo === void 0) { userInfo = null; } | ||
return __awaiter(_this, void 0, void 0, function () { | ||
return tslib_1.__awaiter(_this, void 0, void 0, function () { | ||
var _a, appId, credentials, endpointId, _b, endpointInfo, pinpointClient, currentCredentials, credentialsUpdated, _c, address, attributes, demographic, location_1, metrics, optOut, _d, appVersion, make, model, platform, version, input, command, err_4; | ||
var _e; | ||
return __generator(this, function (_f) { | ||
return tslib_1.__generator(this, function (_f) { | ||
switch (_f.label) { | ||
@@ -350,6 +301,6 @@ case 0: | ||
Address: address !== null && address !== void 0 ? address : endpointInfo.address, | ||
Attributes: __assign(__assign({}, endpointInfo.attributes), attributes), | ||
Demographic: __assign({ AppVersion: appVersion, Make: make, Model: model, ModelVersion: version, Platform: platform }, core_1.transferKeyToUpperCase(__assign(__assign({}, endpointInfo.demographic), demographic))), | ||
Location: core_1.transferKeyToUpperCase(__assign(__assign({}, endpointInfo.location), location_1)), | ||
Metrics: __assign(__assign({}, endpointInfo.metrics), metrics), | ||
Attributes: tslib_1.__assign(tslib_1.__assign({}, endpointInfo.attributes), attributes), | ||
Demographic: tslib_1.__assign({ AppVersion: appVersion, Make: make, Model: model, ModelVersion: version, Platform: platform }, core_1.transferKeyToUpperCase(tslib_1.__assign(tslib_1.__assign({}, endpointInfo.demographic), demographic))), | ||
Location: core_1.transferKeyToUpperCase(tslib_1.__assign(tslib_1.__assign({}, endpointInfo.location), location_1)), | ||
Metrics: tslib_1.__assign(tslib_1.__assign({}, endpointInfo.metrics), metrics), | ||
OptOut: optOut !== null && optOut !== void 0 ? optOut : endpointInfo.optOut, | ||
@@ -377,5 +328,5 @@ User: { | ||
}; | ||
this.getCredentials = function () { return __awaiter(_this, void 0, void 0, function () { | ||
this.getCredentials = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () { | ||
var credentials, err_5; | ||
return __generator(this, function (_a) { | ||
return tslib_1.__generator(this, function (_a) { | ||
switch (_a.label) { | ||
@@ -478,8 +429,8 @@ case 0: | ||
var _a; | ||
var updatedMap = __assign(__assign({}, _this.getTotalCountMap()), (_a = {}, _a[messageId] = count, _a)); | ||
var updatedMap = tslib_1.__assign(tslib_1.__assign({}, _this.getTotalCountMap()), (_a = {}, _a[messageId] = count, _a)); | ||
_this.setTotalCountMap(updatedMap); | ||
}; | ||
this.incrementCounts = function (messageId) { return __awaiter(_this, void 0, void 0, function () { | ||
this.incrementCounts = function (messageId) { return tslib_1.__awaiter(_this, void 0, void 0, function () { | ||
var _a, sessionCount, dailyCount, totalCount; | ||
return __generator(this, function (_b) { | ||
return tslib_1.__generator(this, function (_b) { | ||
_a = this.getMessageCounts(messageId), sessionCount = _a.sessionCount, dailyCount = _a.dailyCount, totalCount = _a.totalCount; | ||
@@ -503,4 +454,4 @@ this.setSessionCount(messageId, sessionCount + 1); | ||
}; | ||
this.recordMessageEvent = function (message, event) { return __awaiter(_this, void 0, void 0, function () { | ||
return __generator(this, function (_a) { | ||
this.recordMessageEvent = function (message, event) { return tslib_1.__awaiter(_this, void 0, void 0, function () { | ||
return tslib_1.__generator(this, function (_a) { | ||
switch (_a.label) { | ||
@@ -507,0 +458,0 @@ case 0: |
@@ -14,25 +14,7 @@ "use strict"; | ||
*/ | ||
var __read = (this && this.__read) || function (o, n) { | ||
var m = typeof Symbol === "function" && o[Symbol.iterator]; | ||
if (!m) return o; | ||
var i = m.call(o), r, ar = [], e; | ||
try { | ||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); | ||
} | ||
catch (error) { e = { error: error }; } | ||
finally { | ||
try { | ||
if (r && !r.done && (m = i["return"])) m.call(i); | ||
} | ||
finally { if (e) throw e.error; } | ||
} | ||
return ar; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
var core_1 = require("@aws-amplify/core"); | ||
var client_pinpoint_1 = require("@aws-sdk/client-pinpoint"); | ||
var isEmpty_1 = __importDefault(require("lodash/isEmpty")); | ||
var isEmpty_1 = tslib_1.__importDefault(require("lodash/isEmpty")); | ||
var AMPLIFY_SYMBOL = (typeof Symbol !== 'undefined' && typeof Symbol.for === 'function' | ||
@@ -101,3 +83,3 @@ ? Symbol.for('amplify_default') | ||
eventAttributesMemo[memoKey] = Object.entries(Attributes).every(function (_a) { | ||
var _b = __read(_a, 2), key = _b[0], Values = _b[1].Values; | ||
var _b = tslib_1.__read(_a, 2), key = _b[0], Values = _b[1].Values; | ||
return Values.includes(attributes[key]); | ||
@@ -124,3 +106,3 @@ }); | ||
eventMetricsMemo[memoKey] = Object.entries(Metrics).every(function (_a) { | ||
var _b = __read(_a, 2), key = _b[0], _c = _b[1], ComparisonOperator = _c.ComparisonOperator, Value = _c.Value; | ||
var _b = tslib_1.__read(_a, 2), key = _b[0], _c = _b[1], ComparisonOperator = _c.ComparisonOperator, Value = _c.Value; | ||
var compare = exports.getComparator(ComparisonOperator); | ||
@@ -173,4 +155,4 @@ // if there is some unknown comparison operator, treat as a comparison failure | ||
var end = new Date(now); | ||
var _b = __read(Start.split(':'), 2), startHours = _b[0], startMinutes = _b[1]; | ||
var _c = __read(End.split(':'), 2), endHours = _c[0], endMinutes = _c[1]; | ||
var _b = tslib_1.__read(Start.split(':'), 2), startHours = _b[0], startMinutes = _b[1]; | ||
var _c = tslib_1.__read(End.split(':'), 2), endHours = _c[0], endMinutes = _c[1]; | ||
start.setHours(Number.parseInt(startHours, 10), Number.parseInt(startMinutes, 10), 0, 0); | ||
@@ -177,0 +159,0 @@ end.setHours(Number.parseInt(endHours, 10), Number.parseInt(endMinutes, 10), 0, 0); |
@@ -14,8 +14,6 @@ "use strict"; | ||
*/ | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var SessionTracker_1 = __importDefault(require("./SessionTracker")); | ||
var tslib_1 = require("tslib"); | ||
var SessionTracker_1 = tslib_1.__importDefault(require("./SessionTracker")); | ||
exports.default = SessionTracker_1.default; | ||
//# sourceMappingURL=index.js.map |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
/* | ||
@@ -19,3 +17,3 @@ * Copyright 2017-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
var core_1 = require("@aws-amplify/core"); | ||
var noop_1 = __importDefault(require("lodash/noop")); | ||
var noop_1 = tslib_1.__importDefault(require("lodash/noop")); | ||
// Per https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API | ||
@@ -22,0 +20,0 @@ var hidden; |
@@ -14,9 +14,7 @@ "use strict"; | ||
*/ | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
var core_1 = require("@aws-amplify/core"); | ||
var react_native_1 = require("react-native"); | ||
var noop_1 = __importDefault(require("lodash/noop")); | ||
var noop_1 = tslib_1.__importDefault(require("lodash/noop")); | ||
var isActive = function (appState) { return appState === 'active'; }; | ||
@@ -23,0 +21,0 @@ var isInactive = function (appState) { |
@@ -14,19 +14,6 @@ "use strict"; | ||
*/ | ||
var __assign = (this && this.__assign) || function () { | ||
__assign = Object.assign || function(t) { | ||
for (var s, i = 1, n = arguments.length; i < n; i++) { | ||
s = arguments[i]; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) | ||
t[p] = s[p]; | ||
} | ||
return t; | ||
}; | ||
return __assign.apply(this, arguments); | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
var core_1 = require("@aws-amplify/core"); | ||
var InAppMessaging_1 = __importDefault(require("./InAppMessaging")); | ||
var InAppMessaging_1 = tslib_1.__importDefault(require("./InAppMessaging")); | ||
var logger = new core_1.ConsoleLogger('Notifications'); | ||
@@ -43,3 +30,3 @@ var NotificationsClass = /** @class */ (function () { | ||
var config = (_a === void 0 ? {} : _a).Notifications; | ||
_this.config = __assign(__assign({}, _this.config), config); | ||
_this.config = tslib_1.__assign(tslib_1.__assign({}, _this.config), config); | ||
logger.debug('configure Notifications', config); | ||
@@ -46,0 +33,0 @@ // Configure sub-categories |
{ | ||
"name": "@aws-amplify/notifications", | ||
"version": "0.2.5-in-app-messaging.7287+fc590d1c3", | ||
"version": "1.0.1-next.7206+072846a9f", | ||
"description": "Notifications category of aws-amplify", | ||
@@ -45,5 +45,5 @@ "main": "./lib/index.js", | ||
"dependencies": { | ||
"@aws-amplify/cache": "4.0.23-in-app-messaging.70+fc590d1c3", | ||
"@aws-amplify/core": "4.3.3-in-app-messaging.70+fc590d1c3", | ||
"@aws-sdk/client-pinpoint": "^3.33.0", | ||
"@aws-amplify/cache": "4.0.51-next.20+072846a9f", | ||
"@aws-amplify/core": "4.6.2-next.20+072846a9f", | ||
"@aws-sdk/client-pinpoint": "3.171.0", | ||
"lodash": "^4.17.21", | ||
@@ -96,3 +96,3 @@ "uuid": "^3.2.1" | ||
}, | ||
"gitHead": "fc590d1c39ccf3209fb60c5facf57cba51b61861" | ||
"gitHead": "072846a9f0bd91f145e58aca2fca91a6478286b0" | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
684728
8798
+ Added@aws-crypto/ie11-detection@2.0.2(transitive)
+ Added@aws-crypto/sha256-browser@2.0.0(transitive)
+ Added@aws-crypto/sha256-js@2.0.0(transitive)
+ Added@aws-crypto/supports-web-crypto@2.0.2(transitive)
+ Added@aws-crypto/util@2.0.2(transitive)
+ Added@aws-sdk/abort-controller@3.171.0(transitive)
+ Added@aws-sdk/client-pinpoint@3.171.0(transitive)
+ Added@aws-sdk/client-sso@3.171.0(transitive)
+ Added@aws-sdk/client-sts@3.171.0(transitive)
+ Added@aws-sdk/config-resolver@3.171.0(transitive)
+ Added@aws-sdk/credential-provider-env@3.171.0(transitive)
+ Added@aws-sdk/credential-provider-imds@3.171.0(transitive)
+ Added@aws-sdk/credential-provider-ini@3.171.0(transitive)
+ Added@aws-sdk/credential-provider-node@3.171.0(transitive)
+ Added@aws-sdk/credential-provider-process@3.171.0(transitive)
+ Added@aws-sdk/credential-provider-sso@3.171.0(transitive)
+ Added@aws-sdk/credential-provider-web-identity@3.171.0(transitive)
+ Added@aws-sdk/fetch-http-handler@3.171.0(transitive)
+ Added@aws-sdk/hash-node@3.171.0(transitive)
+ Added@aws-sdk/invalid-dependency@3.171.0(transitive)
+ Added@aws-sdk/is-array-buffer@3.170.0(transitive)
+ Added@aws-sdk/middleware-content-length@3.171.0(transitive)
+ Added@aws-sdk/middleware-host-header@3.171.0(transitive)
+ Added@aws-sdk/middleware-logger@3.171.0(transitive)
+ Added@aws-sdk/middleware-recursion-detection@3.171.0(transitive)
+ Added@aws-sdk/middleware-retry@3.171.0(transitive)
+ Added@aws-sdk/middleware-sdk-sts@3.171.0(transitive)
+ Added@aws-sdk/middleware-serde@3.171.0(transitive)
+ Added@aws-sdk/middleware-signing@3.171.0(transitive)
+ Added@aws-sdk/middleware-stack@3.171.0(transitive)
+ Added@aws-sdk/middleware-user-agent@3.171.0(transitive)
+ Added@aws-sdk/node-config-provider@3.171.0(transitive)
+ Added@aws-sdk/node-http-handler@3.171.0(transitive)
+ Added@aws-sdk/property-provider@3.171.0(transitive)
+ Added@aws-sdk/protocol-http@3.171.0(transitive)
+ Added@aws-sdk/querystring-builder@3.171.0(transitive)
+ Added@aws-sdk/querystring-parser@3.171.0(transitive)
+ Added@aws-sdk/service-error-classification@3.171.0(transitive)
+ Added@aws-sdk/shared-ini-file-loader@3.171.0(transitive)
+ Added@aws-sdk/signature-v4@3.171.0(transitive)
+ Added@aws-sdk/smithy-client@3.171.0(transitive)
+ Added@aws-sdk/types@3.171.0(transitive)
+ Added@aws-sdk/url-parser@3.171.0(transitive)
+ Added@aws-sdk/util-base64-browser@3.170.0(transitive)
+ Added@aws-sdk/util-base64-node@3.170.0(transitive)
+ Added@aws-sdk/util-body-length-browser@3.170.0(transitive)
+ Added@aws-sdk/util-body-length-node@3.170.0(transitive)
+ Added@aws-sdk/util-buffer-from@3.170.0(transitive)
+ Added@aws-sdk/util-config-provider@3.170.0(transitive)
+ Added@aws-sdk/util-defaults-mode-browser@3.171.0(transitive)
+ Added@aws-sdk/util-defaults-mode-node@3.171.0(transitive)
+ Added@aws-sdk/util-hex-encoding@3.170.0(transitive)
+ Added@aws-sdk/util-middleware@3.171.0(transitive)
+ Added@aws-sdk/util-uri-escape@3.170.0(transitive)
+ Added@aws-sdk/util-user-agent-browser@3.171.0(transitive)
+ Added@aws-sdk/util-user-agent-node@3.171.0(transitive)
+ Added@aws-sdk/util-utf8-browser@3.170.0(transitive)
+ Added@aws-sdk/util-utf8-node@3.170.0(transitive)
+ Addedentities@2.2.0(transitive)
+ Addedfast-xml-parser@3.19.0(transitive)
+ Addedtslib@1.14.1(transitive)
+ Addeduuid@8.3.2(transitive)
- Removed@aws-crypto/sha256-browser@5.2.0(transitive)
- Removed@aws-crypto/sha256-js@5.2.0(transitive)
- Removed@aws-crypto/supports-web-crypto@5.2.0(transitive)
- Removed@aws-crypto/util@5.2.0(transitive)
- Removed@aws-sdk/client-pinpoint@3.734.0(transitive)
- Removed@aws-sdk/client-sso@3.734.0(transitive)
- Removed@aws-sdk/core@3.734.0(transitive)
- Removed@aws-sdk/credential-provider-env@3.734.0(transitive)
- Removed@aws-sdk/credential-provider-http@3.734.0(transitive)
- Removed@aws-sdk/credential-provider-ini@3.734.0(transitive)
- Removed@aws-sdk/credential-provider-node@3.734.0(transitive)
- Removed@aws-sdk/credential-provider-process@3.734.0(transitive)
- Removed@aws-sdk/credential-provider-sso@3.734.0(transitive)
- Removed@aws-sdk/credential-provider-web-identity@3.734.0(transitive)
- Removed@aws-sdk/middleware-host-header@3.734.0(transitive)
- Removed@aws-sdk/middleware-logger@3.734.0(transitive)
- Removed@aws-sdk/middleware-recursion-detection@3.734.0(transitive)
- Removed@aws-sdk/middleware-user-agent@3.734.0(transitive)
- Removed@aws-sdk/nested-clients@3.734.0(transitive)
- Removed@aws-sdk/region-config-resolver@3.734.0(transitive)
- Removed@aws-sdk/token-providers@3.734.0(transitive)
- Removed@aws-sdk/types@3.734.0(transitive)
- Removed@aws-sdk/util-endpoints@3.734.0(transitive)
- Removed@aws-sdk/util-user-agent-browser@3.734.0(transitive)
- Removed@aws-sdk/util-user-agent-node@3.734.0(transitive)
- Removed@smithy/abort-controller@4.0.1(transitive)
- Removed@smithy/config-resolver@4.0.1(transitive)
- Removed@smithy/core@3.1.1(transitive)
- Removed@smithy/credential-provider-imds@4.0.1(transitive)
- Removed@smithy/fetch-http-handler@5.0.1(transitive)
- Removed@smithy/hash-node@4.0.1(transitive)
- Removed@smithy/invalid-dependency@4.0.1(transitive)
- Removed@smithy/is-array-buffer@2.2.04.0.0(transitive)
- Removed@smithy/middleware-content-length@4.0.1(transitive)
- Removed@smithy/middleware-endpoint@4.0.2(transitive)
- Removed@smithy/middleware-retry@4.0.3(transitive)
- Removed@smithy/middleware-serde@4.0.1(transitive)
- Removed@smithy/middleware-stack@4.0.1(transitive)
- Removed@smithy/node-config-provider@4.0.1(transitive)
- Removed@smithy/node-http-handler@4.0.2(transitive)
- Removed@smithy/property-provider@4.0.1(transitive)
- Removed@smithy/protocol-http@5.0.1(transitive)
- Removed@smithy/querystring-builder@4.0.1(transitive)
- Removed@smithy/querystring-parser@4.0.1(transitive)
- Removed@smithy/service-error-classification@4.0.1(transitive)
- Removed@smithy/shared-ini-file-loader@4.0.1(transitive)
- Removed@smithy/signature-v4@5.0.1(transitive)
- Removed@smithy/smithy-client@4.1.2(transitive)
- Removed@smithy/types@4.1.0(transitive)
- Removed@smithy/url-parser@4.0.1(transitive)
- Removed@smithy/util-base64@4.0.0(transitive)
- Removed@smithy/util-body-length-browser@4.0.0(transitive)
- Removed@smithy/util-body-length-node@4.0.0(transitive)
- Removed@smithy/util-buffer-from@2.2.04.0.0(transitive)
- Removed@smithy/util-config-provider@4.0.0(transitive)
- Removed@smithy/util-defaults-mode-browser@4.0.3(transitive)
- Removed@smithy/util-defaults-mode-node@4.0.3(transitive)
- Removed@smithy/util-endpoints@3.0.1(transitive)
- Removed@smithy/util-hex-encoding@4.0.0(transitive)
- Removed@smithy/util-middleware@4.0.1(transitive)
- Removed@smithy/util-retry@4.0.1(transitive)
- Removed@smithy/util-stream@4.0.2(transitive)
- Removed@smithy/util-uri-escape@4.0.0(transitive)
- Removed@smithy/util-utf8@2.3.04.0.0(transitive)
- Removedfast-xml-parser@4.4.1(transitive)
- Removedstrnum@1.0.5(transitive)
- Removeduuid@9.0.1(transitive)