ouisys-engine 3.0.3 → 3.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (198) hide show
  1. package/.babelrc +4 -8
  2. package/.eslintrc.js +1 -1
  3. package/.nvmrc +1 -1
  4. package/.prettierignore +2 -1
  5. package/README.md +2 -4
  6. package/dist/api/index.d.ts +5 -5
  7. package/dist/api/index.js +76 -76
  8. package/dist/common-types/AppThunk.d.ts +11 -12
  9. package/dist/common-types/IOptInFlowName.d.ts +1 -1
  10. package/dist/common-types/ITracker.js +1 -2
  11. package/dist/common-types/RemoteDataState.d.ts +4 -4
  12. package/dist/common-types/RemoteDataState.js +17 -17
  13. package/dist/flows/click2smsFlow.d.ts +2 -2
  14. package/dist/flows/moFlow.d.ts +2 -2
  15. package/dist/flows/moRedirFlow.d.ts +2 -2
  16. package/dist/flows/oneClickFlow.d.ts +2 -2
  17. package/dist/flows/pinFlow.d.ts +2 -2
  18. package/dist/flows/pinFlow.js +2 -0
  19. package/dist/flows/strategy.d.ts +8 -8
  20. package/dist/flows/ussdFlow.d.ts +2 -2
  21. package/dist/ips/tryGetIPRangeName.d.ts +1 -1
  22. package/dist/ips/tryGetIPRangeName.js +7 -5
  23. package/dist/jest.config.js +1 -1
  24. package/dist/pacman/index.d.ts +2 -2
  25. package/dist/pacman/index.js +41 -41
  26. package/dist/pacman/queryString.js +11 -9
  27. package/dist/reducers/click2smsFlow/Click2smsTypes.d.ts +19 -19
  28. package/dist/reducers/click2smsFlow/IClick2smsConstants.d.ts +1 -1
  29. package/dist/reducers/click2smsFlow/index.d.ts +2 -2
  30. package/dist/reducers/click2smsFlow/index.js +24 -24
  31. package/dist/reducers/click2smsFlow/utils.d.ts +1 -1
  32. package/dist/reducers/click2smsFlow/utils.js +30 -30
  33. package/dist/reducers/moFlow/IMoConstants.d.ts +1 -1
  34. package/dist/reducers/moFlow/MoTypes.d.ts +13 -13
  35. package/dist/reducers/moFlow/index.d.ts +3 -3
  36. package/dist/reducers/moFlow/index.js +27 -27
  37. package/dist/reducers/moFlow/utils.d.ts +1 -2
  38. package/dist/reducers/moFlow/utils.js +28 -26
  39. package/dist/reducers/moRedirFlow/IMoRedirConstants.d.ts +1 -1
  40. package/dist/reducers/moRedirFlow/MoRedirTypes.d.ts +13 -13
  41. package/dist/reducers/moRedirFlow/index.d.ts +3 -3
  42. package/dist/reducers/moRedirFlow/index.js +27 -27
  43. package/dist/reducers/moRedirFlow/utils.d.ts +1 -1
  44. package/dist/reducers/moRedirFlow/utils.js +17 -17
  45. package/dist/reducers/oneClickFlow/IOneClickConstants.d.ts +1 -1
  46. package/dist/reducers/oneClickFlow/OneClickTypes.d.ts +10 -10
  47. package/dist/reducers/oneClickFlow/index.d.ts +3 -3
  48. package/dist/reducers/oneClickFlow/index.js +75 -68
  49. package/dist/reducers/oneClickFlow/utils.d.ts +2 -2
  50. package/dist/reducers/oneClickFlow/utils.js +38 -38
  51. package/dist/reducers/pinFlow/IPinConstants.d.ts +1 -1
  52. package/dist/reducers/pinFlow/PinTypes.d.ts +23 -23
  53. package/dist/reducers/pinFlow/index.d.ts +3 -3
  54. package/dist/reducers/pinFlow/index.js +76 -76
  55. package/dist/reducers/pinFlow/utils.d.ts +1 -1
  56. package/dist/reducers/pinFlow/utils.js +61 -65
  57. package/dist/reducers/strategy/IStategyActionContants.d.ts +1 -1
  58. package/dist/reducers/strategy/StrategyTypes.d.ts +56 -56
  59. package/dist/reducers/strategy/index.d.ts +2 -2
  60. package/dist/reducers/strategy/index.js +99 -99
  61. package/dist/reducers/strategy/strategies/ask_mobile_number.d.ts +2 -2
  62. package/dist/reducers/strategy/strategies/ask_mobile_number.js +78 -78
  63. package/dist/reducers/strategy/strategies/ask_operator.d.ts +2 -2
  64. package/dist/reducers/strategy/strategies/ask_operator.js +64 -68
  65. package/dist/reducers/strategy/strategies/detect_operator_by_ip.d.ts +2 -2
  66. package/dist/reducers/strategy/strategies/detect_operator_by_ip.js +97 -97
  67. package/dist/reducers/strategy/strategies/header_enrichment.d.ts +2 -2
  68. package/dist/reducers/strategy/strategies/header_enrichment.js +116 -120
  69. package/dist/reducers/strategy/utils.d.ts +3 -3
  70. package/dist/reducers/strategy/utils.js +115 -111
  71. package/dist/reducers/ussdFlow/IUssdConstants.d.ts +1 -1
  72. package/dist/reducers/ussdFlow/UssdTypes.d.ts +13 -13
  73. package/dist/reducers/ussdFlow/index.d.ts +3 -3
  74. package/dist/reducers/ussdFlow/index.js +27 -27
  75. package/dist/reducers/ussdFlow/utils.d.ts +1 -2
  76. package/dist/reducers/ussdFlow/utils.js +19 -17
  77. package/dist/store/index.d.ts +8 -8
  78. package/dist/store/index.js +87 -83
  79. package/dist/store/reducers.d.ts +7 -7
  80. package/dist/store/reducers.js +4 -4
  81. package/dist/utilities/handleSubmitNumber.d.ts +7 -3
  82. package/dist/utilities/handleSubmitNumber.js +15 -18
  83. package/dist/utilities/index.d.ts +1 -1
  84. package/dist/utilities/index.js +13 -11
  85. package/dist/utilities/loadScriptInnerHtml.js +0 -1
  86. package/index.html +21 -28
  87. package/package.json +23 -15
  88. package/setupJest.js +1 -1
  89. package/tsconfig.json +2 -2
  90. package/.idea/inspectionProfiles/Project_Default.xml +0 -6
  91. package/.idea/modules.xml +0 -8
  92. package/.idea/ouisys-engine.iml +0 -12
  93. package/.idea/vcs.xml +0 -6
  94. package/.vscode/settings.json +0 -6
  95. package/dist/api/click2sms.js +0 -357
  96. package/dist/api/mo.js +0 -274
  97. package/dist/api/moRedir.js +0 -186
  98. package/dist/api/oneClick.js +0 -366
  99. package/dist/api/pin.js +0 -493
  100. package/dist/api/strategies.js +0 -704
  101. package/dist/api/ussd.js +0 -1
  102. package/dist/app/store.js +0 -35
  103. package/dist/features/strategies/categories/askMobileNumber.js +0 -395
  104. package/dist/features/strategies/categories/askOperator.js +0 -311
  105. package/dist/features/strategies/categories/detectOperatorByIp.js +0 -606
  106. package/dist/features/strategies/categories/headerEnrichment.js +0 -670
  107. package/dist/features/strategies/categories/typings/click2smsSliceTypes.js +0 -12
  108. package/dist/features/strategies/categories/typings/identifySliceTypes.js +0 -22
  109. package/dist/features/strategies/categories/typings/moFlowSliceTypes.js +0 -22
  110. package/dist/features/strategies/categories/typings/moRedirFlowSliceTypes.js +0 -21
  111. package/dist/features/strategies/categories/typings/oneClickSliceTypes.js +0 -13
  112. package/dist/features/strategies/categories/typings/pinFlowSliceTypes.js +0 -13
  113. package/dist/features/strategies/click2smsFlowSlice.js +0 -172
  114. package/dist/features/strategies/identifySlice.js +0 -455
  115. package/dist/features/strategies/moFlowSlice.js +0 -196
  116. package/dist/features/strategies/moRedirFlowSlice.js +0 -190
  117. package/dist/features/strategies/oneClickFlowSlice.js +0 -277
  118. package/dist/features/strategies/pinFlowSlice.js +0 -313
  119. package/dist/features/strategies/ussdFlowSlice.js +0 -1
  120. package/dist/flows/tpayHeFlow.d.ts +0 -7
  121. package/dist/flows/tpayHeFlow.js +0 -23
  122. package/dist/mockServer/browser.js +0 -48
  123. package/dist/mockServer/handlers.js +0 -22
  124. package/dist/mockServer/server.js +0 -48
  125. package/dist/reducers/tpayHeFlow/ITpayHeConstants.d.ts +0 -2
  126. package/dist/reducers/tpayHeFlow/ITpayHeConstants.js +0 -1
  127. package/dist/reducers/tpayHeFlow/TpayHeTypes.d.ts +0 -114
  128. package/dist/reducers/tpayHeFlow/TpayHeTypes.js +0 -1
  129. package/dist/reducers/tpayHeFlow/index.d.ts +0 -7
  130. package/dist/reducers/tpayHeFlow/index.js +0 -331
  131. package/dist/reducers/tpayHeFlow/utils.d.ts +0 -20
  132. package/dist/reducers/tpayHeFlow/utils.js +0 -510
  133. package/dist/test/setup.js +0 -24
  134. package/dist/test/test-utils.js +0 -51
  135. package/mockData/config.json +0 -28
  136. package/prettier.config.js +0 -7
  137. package/src/@types/react-tracker.d.ts +0 -16
  138. package/src/@types/redux-cli-logger.d.ts +0 -1
  139. package/src/@types/tiny-async-pool.d.ts +0 -3
  140. package/src/@types/window.d.ts +0 -74
  141. package/src/api/index.ts +0 -225
  142. package/src/common-types/AppThunk.ts +0 -19
  143. package/src/common-types/Either.ts +0 -3
  144. package/src/common-types/IError.ts +0 -5
  145. package/src/common-types/IOptInFlowName.ts +0 -1
  146. package/src/common-types/ITracker.ts +0 -10
  147. package/src/common-types/IVisitor.ts +0 -16
  148. package/src/common-types/RemoteDataState.ts +0 -88
  149. package/src/flows/click2smsFlow.ts +0 -18
  150. package/src/flows/moFlow.ts +0 -20
  151. package/src/flows/moRedirFlow.ts +0 -20
  152. package/src/flows/oneClickFlow.ts +0 -20
  153. package/src/flows/pinFlow.ts +0 -25
  154. package/src/flows/strategy.ts +0 -51
  155. package/src/flows/ussdFlow.ts +0 -20
  156. package/src/index.ts +0 -3
  157. package/src/ips/tryGetIPRangeName.ts +0 -22
  158. package/src/jest.config.js +0 -194
  159. package/src/pacman/index.ts +0 -71
  160. package/src/pacman/queryString.ts +0 -24
  161. package/src/reducers/click2smsFlow/Click2smsTypes.ts +0 -93
  162. package/src/reducers/click2smsFlow/IClick2smsConstants.ts +0 -4
  163. package/src/reducers/click2smsFlow/index.ts +0 -105
  164. package/src/reducers/click2smsFlow/utils.ts +0 -126
  165. package/src/reducers/moFlow/IMoConstants.ts +0 -7
  166. package/src/reducers/moFlow/MoTypes.ts +0 -125
  167. package/src/reducers/moFlow/index.ts +0 -150
  168. package/src/reducers/moFlow/utils.ts +0 -135
  169. package/src/reducers/moRedirFlow/IMoRedirConstants.ts +0 -7
  170. package/src/reducers/moRedirFlow/MoRedirTypes.ts +0 -99
  171. package/src/reducers/moRedirFlow/index.ts +0 -137
  172. package/src/reducers/moRedirFlow/utils.ts +0 -78
  173. package/src/reducers/oneClickFlow/IOneClickConstants.ts +0 -3
  174. package/src/reducers/oneClickFlow/OneClickTypes.ts +0 -108
  175. package/src/reducers/oneClickFlow/index.ts +0 -268
  176. package/src/reducers/oneClickFlow/utils.ts +0 -219
  177. package/src/reducers/pinFlow/IPinConstants.ts +0 -9
  178. package/src/reducers/pinFlow/PinTypes.ts +0 -190
  179. package/src/reducers/pinFlow/index.ts +0 -331
  180. package/src/reducers/pinFlow/utils.ts +0 -232
  181. package/src/reducers/strategy/IStategyActionContants.ts +0 -17
  182. package/src/reducers/strategy/StrategyTypes.ts +0 -376
  183. package/src/reducers/strategy/index.ts +0 -322
  184. package/src/reducers/strategy/strategies/ask_mobile_number.ts +0 -366
  185. package/src/reducers/strategy/strategies/ask_operator.ts +0 -195
  186. package/src/reducers/strategy/strategies/detect_operator_by_ip.ts +0 -414
  187. package/src/reducers/strategy/strategies/header_enrichment.ts +0 -489
  188. package/src/reducers/strategy/utils.ts +0 -357
  189. package/src/reducers/ussdFlow/IUssdConstants.ts +0 -7
  190. package/src/reducers/ussdFlow/UssdTypes.ts +0 -112
  191. package/src/reducers/ussdFlow/index.ts +0 -146
  192. package/src/reducers/ussdFlow/utils.ts +0 -88
  193. package/src/store/index.ts +0 -150
  194. package/src/store/reducers.ts +0 -37
  195. package/src/utilities/handleSubmitNumber.ts +0 -65
  196. package/src/utilities/index.ts +0 -114
  197. package/src/utilities/loadScriptInnerHtml.ts +0 -14
  198. package/src/utilities/loadScriptSrc.ts +0 -26
@@ -51,108 +51,108 @@ require("core-js/modules/es.object.to-string.js");
51
51
 
52
52
  require("core-js/modules/es.promise.js");
53
53
 
54
- var RDS = _interopRequireWildcard(require("../../common-types/RemoteDataState"));
55
-
56
- var _utils = require("./utils");
57
-
58
- var _ask_operator = _interopRequireWildcard(require("./strategies/ask_operator"));
59
-
60
- var _ask_mobile_number = _interopRequireWildcard(require("./strategies/ask_mobile_number"));
61
-
62
54
  var _immutabilityHelper = _interopRequireDefault(require("immutability-helper"));
63
55
 
64
- var _pacman = _interopRequireDefault(require("../../pacman"));
56
+ var RDS = _interopRequireWildcard(require("../../common-types/RemoteDataState"));
65
57
 
66
- var _detect_operator_by_ip = _interopRequireDefault(require("./strategies/detect_operator_by_ip"));
58
+ var _pacman = _interopRequireDefault(require("../../pacman"));
67
59
 
68
60
  var _click2smsFlow = require("../click2smsFlow");
69
61
 
70
- var _utils2 = require("../click2smsFlow/utils");
71
-
72
- var _header_enrichment = _interopRequireDefault(require("./strategies/header_enrichment"));
73
-
74
- var _pinFlow = require("../pinFlow");
62
+ var _utils = require("../click2smsFlow/utils");
75
63
 
76
64
  var _moFlow = require("../moFlow");
77
65
 
78
66
  var _moRedirFlow = require("../moRedirFlow");
79
67
 
68
+ var _oneClickFlow = require("../oneClickFlow");
69
+
70
+ var _pinFlow = require("../pinFlow");
71
+
80
72
  var _ussdFlow = require("../ussdFlow");
81
73
 
82
- var _oneClickFlow = require("../oneClickFlow");
74
+ var _ask_mobile_number = _interopRequireWildcard(require("./strategies/ask_mobile_number"));
83
75
 
84
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
76
+ var _ask_operator = _interopRequireWildcard(require("./strategies/ask_operator"));
77
+
78
+ var _detect_operator_by_ip = _interopRequireDefault(require("./strategies/detect_operator_by_ip"));
79
+
80
+ var _header_enrichment = _interopRequireDefault(require("./strategies/header_enrichment"));
81
+
82
+ var _utils2 = require("./utils");
85
83
 
86
84
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
87
85
 
88
86
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
89
87
 
88
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
89
+
90
90
  function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
91
91
 
92
92
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
93
93
 
94
94
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
95
95
 
96
- var tracker = (0, _pacman.default)(typeof window != "undefined" ? window : null);
96
+ var tracker = (0, _pacman.default)(typeof window !== 'undefined' ? window : null);
97
97
  exports.tracker = tracker;
98
98
 
99
99
  function mockStrategyStateByUrlParam() {
100
100
  return function (dispatch) {
101
- var search = (0, _utils.searchToObject)();
101
+ var search = (0, _utils2.searchToObject)();
102
102
 
103
- if (search["mock-flow"] !== undefined) {
104
- switch (search["mock-flow"]) {
105
- case "pin":
103
+ if (search['mock-flow'] !== undefined) {
104
+ switch (search['mock-flow']) {
105
+ case 'pin':
106
106
  dispatch({
107
- type: "MOCK_STRATEGY_STATE",
108
- payload: _utils.mockedPinFlow.currentState
107
+ type: 'MOCK_STRATEGY_STATE',
108
+ payload: _utils2.mockedPinFlow.currentState
109
109
  });
110
- dispatch((0, _pinFlow.mockPinFlow)(search["current-state"]));
110
+ dispatch((0, _pinFlow.mockPinFlow)(search['current-state']));
111
111
  break;
112
112
 
113
- case "mo":
113
+ case 'mo':
114
114
  dispatch({
115
- type: "MOCK_STRATEGY_STATE",
116
- payload: _utils.mockedMoFlow.currentState
115
+ type: 'MOCK_STRATEGY_STATE',
116
+ payload: _utils2.mockedMoFlow.currentState
117
117
  });
118
- dispatch((0, _moFlow.mockMoFlow)(search["current-state"]));
118
+ dispatch((0, _moFlow.mockMoFlow)(search['current-state']));
119
119
  break;
120
120
 
121
- case "moredir":
121
+ case 'moredir':
122
122
  dispatch({
123
- type: "MOCK_STRATEGY_STATE",
124
- payload: _utils.mockedMoRdirFlow.currentState
123
+ type: 'MOCK_STRATEGY_STATE',
124
+ payload: _utils2.mockedMoRdirFlow.currentState
125
125
  });
126
- dispatch((0, _moRedirFlow.mockMoRedirFlow)(search["current-state"]));
126
+ dispatch((0, _moRedirFlow.mockMoRedirFlow)(search['current-state']));
127
127
  break;
128
128
 
129
- case "oneclick":
129
+ case 'oneclick':
130
130
  dispatch({
131
- type: "MOCK_STRATEGY_STATE",
132
- payload: _utils.mockedOneClickFlow.currentState
131
+ type: 'MOCK_STRATEGY_STATE',
132
+ payload: _utils2.mockedOneClickFlow.currentState
133
133
  });
134
134
  setTimeout(function () {
135
- dispatch((0, _oneClickFlow.mockOneClickFlow)(search["current-state"]));
135
+ dispatch((0, _oneClickFlow.mockOneClickFlow)(search['current-state']));
136
136
  }, 2000);
137
137
  break;
138
138
 
139
- case "click2sms":
139
+ case 'click2sms':
140
140
  dispatch({
141
- type: "MOCK_STRATEGY_STATE",
142
- payload: _utils.mockedClick2smsFlow.currentState
141
+ type: 'MOCK_STRATEGY_STATE',
142
+ payload: _utils2.mockedClick2smsFlow.currentState
143
143
  });
144
144
  break;
145
145
 
146
- case "ussd":
146
+ case 'ussd':
147
147
  dispatch({
148
- type: "MOCK_STRATEGY_STATE",
149
- payload: _utils.mockedUssdFlow.currentState
148
+ type: 'MOCK_STRATEGY_STATE',
149
+ payload: _utils2.mockedUssdFlow.currentState
150
150
  });
151
- dispatch((0, _ussdFlow.mockUssdFlow)(search["current-state"]));
151
+ dispatch((0, _ussdFlow.mockUssdFlow)(search['current-state']));
152
152
  break;
153
153
 
154
154
  default:
155
- throw "Mock Flow not supported";
155
+ throw 'Mock Flow not supported';
156
156
  }
157
157
  }
158
158
  };
@@ -167,11 +167,11 @@ function identifyStrategy() {
167
167
  while (1) {
168
168
  switch (_context.prev = _context.next) {
169
169
  case 0:
170
- _getConfig = (0, _utils.getConfig)(), strategy = _getConfig.strategy, strategyConfigs = _getConfig.strategyConfigs;
170
+ _getConfig = (0, _utils2.getConfig)(), strategy = _getConfig.strategy, strategyConfigs = _getConfig.strategyConfigs;
171
171
  isUseMsisdnPrefix = strategyConfigs.isUseMsisdnPrefix;
172
- search = (0, _utils.searchToObject)();
172
+ search = (0, _utils2.searchToObject)();
173
173
 
174
- if (!(search["mock-flow"] !== undefined)) {
174
+ if (!(search['mock-flow'] !== undefined)) {
175
175
  _context.next = 7;
176
176
  break;
177
177
  }
@@ -182,7 +182,7 @@ function identifyStrategy() {
182
182
 
183
183
  case 7:
184
184
  _context.t0 = strategy;
185
- _context.next = _context.t0 === "pin-mo-ask-operator" ? 10 : _context.t0 === "pin-mo-redir-ask-mobile-number" ? 11 : _context.t0 === "pin-mo-ask-mobile-number" ? 11 : _context.t0 === "pin-combo-ask-mobile-number" ? 11 : _context.t0 === "pin-one-click-detect-operator-by-ip" ? 12 : _context.t0 === "one-click-mo-pin-detect-operator-by-ip-or-msisdn" ? 12 : _context.t0 === "mo-redir-one-click-detect-operator-by-ip" ? 12 : _context.t0 === "mo-one-click-detect-operator-by-ip" ? 12 : _context.t0 === "click2sms-one-click-detect-operator-by-ip" ? 12 : _context.t0 === "pin-mo-detect-operator-by-ip" ? 12 : _context.t0 === "pin-click2sms-ask-operator" ? 13 : _context.t0 === "he-pin-one-click-ask-operator" ? 13 : _context.t0 === "click2sms-one-click-ask-operator" ? 13 : _context.t0 === "pin-one-click-ask-operator" ? 13 : _context.t0 === "pin-header-enrichment" ? 14 : _context.t0 === "he-pin-mo-redir-header-enrichment" ? 14 : _context.t0 === "he-pin-one-click-header-enrichment" ? 14 : _context.t0 === "he-mo-redir-one-click-header-enrichment" ? 14 : _context.t0 === "pin" ? 15 : _context.t0 === "mo" ? 17 : _context.t0 === "mo-redir" ? 19 : _context.t0 === "one-click" ? 21 : _context.t0 === "tallyman-one-click" ? 23 : _context.t0 === "click2sms" ? 25 : _context.t0 === "ussd" ? 27 : _context.t0 === "tpay-he" ? 29 : 31;
185
+ _context.next = _context.t0 === 'pin-mo-ask-operator' ? 10 : _context.t0 === 'pin-mo-redir-ask-mobile-number' ? 11 : _context.t0 === 'pin-mo-ask-mobile-number' ? 11 : _context.t0 === 'pin-combo-ask-mobile-number' ? 11 : _context.t0 === 'pin-one-click-detect-operator-by-ip' ? 12 : _context.t0 === 'one-click-mo-pin-detect-operator-by-ip-or-msisdn' ? 12 : _context.t0 === 'mo-redir-one-click-detect-operator-by-ip' ? 12 : _context.t0 === 'mo-one-click-detect-operator-by-ip' ? 12 : _context.t0 === 'click2sms-one-click-detect-operator-by-ip' ? 12 : _context.t0 === 'pin-mo-detect-operator-by-ip' ? 12 : _context.t0 === 'pin-click2sms-ask-operator' ? 13 : _context.t0 === 'he-pin-one-click-ask-operator' ? 13 : _context.t0 === 'click2sms-one-click-ask-operator' ? 13 : _context.t0 === 'pin-one-click-ask-operator' ? 13 : _context.t0 === 'pin-header-enrichment' ? 14 : _context.t0 === 'he-pin-mo-redir-header-enrichment' ? 14 : _context.t0 === 'he-pin-one-click-header-enrichment' ? 14 : _context.t0 === 'he-mo-redir-one-click-header-enrichment' ? 14 : _context.t0 === 'pin' ? 15 : _context.t0 === 'mo' ? 17 : _context.t0 === 'mo-redir' ? 19 : _context.t0 === 'one-click' ? 21 : _context.t0 === 'tallyman-one-click' ? 23 : _context.t0 === 'click2sms' ? 25 : _context.t0 === 'ussd' ? 27 : _context.t0 === 'tpay-he' ? 29 : 31;
186
186
  break;
187
187
 
188
188
  case 10:
@@ -201,13 +201,13 @@ function identifyStrategy() {
201
201
  return _context.abrupt("return", dispatch((0, _header_enrichment.default)()));
202
202
 
203
203
  case 15:
204
- tracker.sendOptInFlowEvent("Pin");
204
+ tracker.sendOptInFlowEvent('Pin');
205
205
  return _context.abrupt("return", dispatch({
206
- type: "IDENTIFY_STRATEGY",
206
+ type: 'IDENTIFY_STRATEGY',
207
207
  payload: {
208
- type: "PIN",
208
+ type: 'PIN',
209
209
  result: {
210
- nextAction: "submitMSISDNAction",
210
+ nextAction: 'submitMSISDNAction',
211
211
  config: strategyConfigs.default.flowConfig,
212
212
  isUseMsisdnPrefix: isUseMsisdnPrefix
213
213
  }
@@ -215,98 +215,98 @@ function identifyStrategy() {
215
215
  }));
216
216
 
217
217
  case 17:
218
- tracker.sendOptInFlowEvent("Msisdn to sms");
218
+ tracker.sendOptInFlowEvent('Msisdn to sms');
219
219
  return _context.abrupt("return", dispatch({
220
- type: "IDENTIFY_STRATEGY",
220
+ type: 'IDENTIFY_STRATEGY',
221
221
  payload: {
222
- type: "MO",
222
+ type: 'MO',
223
223
  result: {
224
- nextAction: "submitMSISDNAction",
224
+ nextAction: 'submitMSISDNAction',
225
225
  config: strategyConfigs.default.flowConfig
226
226
  }
227
227
  }
228
228
  }));
229
229
 
230
230
  case 19:
231
- tracker.sendOptInFlowEvent("Redirect");
231
+ tracker.sendOptInFlowEvent('Redirect');
232
232
  return _context.abrupt("return", dispatch({
233
- type: "IDENTIFY_STRATEGY",
233
+ type: 'IDENTIFY_STRATEGY',
234
234
  payload: {
235
- type: "MO_REDIR",
235
+ type: 'MO_REDIR',
236
236
  result: {
237
- nextAction: "submitMSISDNAction",
237
+ nextAction: 'submitMSISDNAction',
238
238
  config: strategyConfigs.default.flowConfig
239
239
  }
240
240
  }
241
241
  }));
242
242
 
243
243
  case 21:
244
- tracker.sendOptInFlowEvent("3G click");
244
+ tracker.sendOptInFlowEvent('3G click');
245
245
  return _context.abrupt("return", dispatch({
246
- type: "IDENTIFY_STRATEGY",
246
+ type: 'IDENTIFY_STRATEGY',
247
247
  payload: {
248
- type: "ONE_CLICK",
248
+ type: 'ONE_CLICK',
249
249
  result: {
250
- nextAction: "getRedirectUrlAction",
250
+ nextAction: 'getRedirectUrlAction',
251
251
  config: strategyConfigs.default.flowConfig
252
252
  }
253
253
  }
254
254
  }));
255
255
 
256
256
  case 23:
257
- tracker.sendOptInFlowEvent("3G click");
257
+ tracker.sendOptInFlowEvent('3G click');
258
258
  return _context.abrupt("return", dispatch({
259
- type: "IDENTIFY_STRATEGY",
259
+ type: 'IDENTIFY_STRATEGY',
260
260
  payload: {
261
- type: "TALLYMAN_ONE_CLICK",
261
+ type: 'TALLYMAN_ONE_CLICK',
262
262
  result: {
263
- nextAction: "getRedirectUrlAction",
263
+ nextAction: 'getRedirectUrlAction',
264
264
  config: strategyConfigs.default.flowConfig
265
265
  }
266
266
  }
267
267
  }));
268
268
 
269
269
  case 25:
270
- tracker.sendOptInFlowEvent("Click to sms");
270
+ tracker.sendOptInFlowEvent('Click to sms');
271
271
  return _context.abrupt("return", dispatch({
272
- type: "IDENTIFY_STRATEGY",
272
+ type: 'IDENTIFY_STRATEGY',
273
273
  payload: {
274
- type: "CLICK2SMS",
274
+ type: 'CLICK2SMS',
275
275
  result: {
276
- nextAction: "loadOc2sms",
276
+ nextAction: 'loadOc2sms',
277
277
  config: strategyConfigs.default.flowConfig
278
278
  }
279
279
  }
280
280
  }));
281
281
 
282
282
  case 27:
283
- tracker.sendOptInFlowEvent("Msisdn to sms");
283
+ tracker.sendOptInFlowEvent('Msisdn to sms');
284
284
  return _context.abrupt("return", dispatch({
285
- type: "IDENTIFY_STRATEGY",
285
+ type: 'IDENTIFY_STRATEGY',
286
286
  payload: {
287
- type: "USSD",
287
+ type: 'USSD',
288
288
  result: {
289
- nextAction: "submitMSISDNAction",
289
+ nextAction: 'submitMSISDNAction',
290
290
  config: strategyConfigs.default.flowConfig
291
291
  }
292
292
  }
293
293
  }));
294
294
 
295
295
  case 29:
296
- tracker.sendOptInFlowEvent("Hybrid Pin");
296
+ tracker.sendOptInFlowEvent('Hybrid Pin');
297
297
  return _context.abrupt("return", dispatch({
298
- type: "IDENTIFY_STRATEGY",
298
+ type: 'IDENTIFY_STRATEGY',
299
299
  payload: {
300
- type: "TPAY_HE",
300
+ type: 'TPAY_HE',
301
301
  result: {
302
- nextAction: "loadTpayAction",
302
+ nextAction: 'loadTpayAction',
303
303
  config: strategyConfigs.default.flowConfig
304
304
  }
305
305
  }
306
306
  }));
307
307
 
308
308
  case 31:
309
- throw "Strategy not supported";
309
+ throw 'Strategy not supported';
310
310
 
311
311
  case 32:
312
312
  case "end":
@@ -330,15 +330,15 @@ function checkSubscriptionAction(trackingArgs) {
330
330
  while (1) {
331
331
  switch (_context2.prev = _context2.next) {
332
332
  case 0:
333
- currentState = store().strategy.currentState; //@ts-ignore
333
+ currentState = store().strategy.currentState; // @ts-ignore
334
334
 
335
335
  maybeConfig = currentState.result.config;
336
336
 
337
337
  try {
338
338
  dispatch({
339
- type: "CHECK_SUBSCRIPTION"
339
+ type: 'CHECK_SUBSCRIPTION'
340
340
  });
341
- (0, _utils2.checkSubscription)(window, maybeConfig).then(function (product_url) {
341
+ (0, _utils.checkSubscription)(window, maybeConfig).then(function (product_url) {
342
342
  tracker.advancedInFlow(trackingArgs.flow, trackingArgs.action, trackingArgs.args);
343
343
  setTimeout(function () {
344
344
  window.location.href = product_url;
@@ -364,7 +364,7 @@ function checkSubscriptionAction(trackingArgs) {
364
364
 
365
365
  function genericHandler(state, payload) {
366
366
  return (0, _immutabilityHelper.default)(state, {
367
- //@ts-ignore
367
+ // @ts-ignore
368
368
  currentState: {
369
369
  $set: payload
370
370
  }
@@ -373,7 +373,7 @@ function genericHandler(state, payload) {
373
373
 
374
374
  var initialState = {
375
375
  currentState: {
376
- type: "IDENTIFY_STRATEGY",
376
+ type: 'IDENTIFY_STRATEGY',
377
377
  result: RDS.NothingYet()
378
378
  }
379
379
  };
@@ -389,36 +389,36 @@ function StrategyReducer() {
389
389
  var action = arguments.length > 1 ? arguments[1] : undefined;
390
390
 
391
391
  switch (action.type) {
392
- case "IDENTIFY_STRATEGY":
392
+ case 'IDENTIFY_STRATEGY':
393
393
  return genericHandler(state, action.payload);
394
394
 
395
- case "IDENTIFY_FLOW_BY_OPERATOR_SELECT":
395
+ case 'IDENTIFY_FLOW_BY_OPERATOR_SELECT':
396
396
  return genericHandler(state, action.payload);
397
397
 
398
- case "OPERATOR_SELECT":
398
+ case 'OPERATOR_SELECT':
399
399
  return genericHandler(state, action.payload);
400
400
 
401
- case "IDENTIFY_FLOW_BY_MSISDN":
401
+ case 'IDENTIFY_FLOW_BY_MSISDN':
402
402
  return genericHandler(state, action.payload);
403
403
 
404
- case "IDENTIFY_FLOW_BY_MSISDN_SUBMIT":
404
+ case 'IDENTIFY_FLOW_BY_MSISDN_SUBMIT':
405
405
  return genericHandler(state, action.payload);
406
406
 
407
- case "IDENTIFY_FLOW_BY_IP":
407
+ case 'IDENTIFY_FLOW_BY_IP':
408
408
  return genericHandler(state, action.payload);
409
409
 
410
- case "IDENTIFY_FLOW_BY_IP_OPERATOR":
410
+ case 'IDENTIFY_FLOW_BY_IP_OPERATOR':
411
411
  return genericHandler(state, action.payload);
412
412
 
413
- case "IDENTIFY_FLOW_BY_HE":
413
+ case 'IDENTIFY_FLOW_BY_HE':
414
414
  return genericHandler(state, action.payload);
415
415
 
416
- case "HE_IDENTIFY":
417
- //@ts-ignore
416
+ case 'HE_IDENTIFY':
417
+ // @ts-ignore
418
418
  return genericHandler(state, action.payload);
419
419
 
420
- case "MOCK_STRATEGY_STATE":
421
- //@ts-ignore
420
+ case 'MOCK_STRATEGY_STATE':
421
+ // @ts-ignore
422
422
  return genericHandler(state, action.payload);
423
423
 
424
424
  default:
@@ -1,5 +1,5 @@
1
- import { AppThunk } from "../../../common-types/AppThunk";
2
- import { IFlow } from "../StrategyTypes";
1
+ import { AppThunk } from '../../../common-types/AppThunk';
2
+ import { IFlow } from '../StrategyTypes';
3
3
  export default function ask_mobile_number(): AppThunk;
4
4
  export declare function submitMSISDNAction(internationalMSISDN: string): AppThunk;
5
5
  export declare const pin_mo_ask_mobile_number: (flowObj: IFlow, msisdn: string) => AppThunk;