ouisys-engine 4.1.47-alpha.0 → 4.3.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/window.d.js +1 -1
- package/dist/api/index.js +728 -1
- package/dist/app/store.js +20 -0
- package/dist/common-types/AppThunk.js +1 -1
- package/dist/common-types/Either.js +1 -1
- package/dist/common-types/IError.js +1 -1
- package/dist/common-types/ITracker.js +3 -1
- package/dist/common-types/IVisitor.js +1 -1
- package/dist/common-types/RemoteDataState.js +135 -1
- package/dist/features/strategies/categories/askMobileNumber.js +388 -0
- package/dist/features/strategies/categories/askOperator.js +313 -0
- package/dist/features/strategies/categories/detectOperatorByIp.js +599 -0
- package/dist/features/strategies/categories/headerEnrichment.js +665 -0
- package/dist/features/strategies/categories/singleFlows/pin.js +1 -0
- package/dist/features/strategies/identifySlice.js +355 -0
- package/dist/features/strategies/pinFlowSlice.js +338 -0
- package/dist/flows/click2smsFlow.js +19 -1
- package/dist/flows/moFlow.js +19 -1
- package/dist/flows/moRedirFlow.js +19 -1
- package/dist/flows/oneClickFlow.js +23 -1
- package/dist/flows/pinFlow.js +23 -1
- package/dist/flows/strategy.js +53 -1
- package/dist/flows/tpayHeFlow.js +23 -0
- package/dist/flows/ussdFlow.js +19 -1
- package/dist/index.js +2 -0
- package/dist/ips/tryGetIPRangeName.js +74 -1
- package/dist/mockServer/browser.js +48 -0
- package/dist/mockServer/handlers.js +22 -0
- package/dist/mockServer/server.js +48 -0
- package/dist/pacman/index.js +108 -1
- package/dist/pacman/queryString.js +45 -1
- package/dist/reducers/click2smsFlow/Click2smsTypes.js +1 -1
- package/dist/reducers/click2smsFlow/IClick2smsConstants.js +1 -1
- package/dist/reducers/click2smsFlow/index.js +183 -1
- package/dist/reducers/click2smsFlow/utils.js +357 -1
- package/dist/reducers/moFlow/IMoConstants.js +1 -1
- package/dist/reducers/moFlow/MoTypes.js +1 -1
- package/dist/reducers/moFlow/index.js +251 -1
- package/dist/reducers/moFlow/utils.js +284 -1
- package/dist/reducers/moRedirFlow/IMoRedirConstants.js +1 -1
- package/dist/reducers/moRedirFlow/MoRedirTypes.js +1 -1
- package/dist/reducers/moRedirFlow/index.js +226 -1
- package/dist/reducers/moRedirFlow/utils.js +186 -1
- package/dist/reducers/oneClickFlow/IOneClickConstants.js +1 -1
- package/dist/reducers/oneClickFlow/OneClickTypes.js +1 -1
- package/dist/reducers/oneClickFlow/index.js +409 -1
- package/dist/reducers/oneClickFlow/utils.js +366 -1
- package/dist/reducers/pinFlow/IPinConstants.js +1 -1
- package/dist/reducers/pinFlow/PinTypes.js +1 -1
- package/dist/reducers/pinFlow/index.js +514 -1
- package/dist/reducers/pinFlow/utils.js +494 -1
- package/dist/reducers/strategy/IStategyActionContants.js +1 -1
- package/dist/reducers/strategy/StrategyTypes.js +1 -1
- package/dist/reducers/strategy/index.js +389 -1
- package/dist/reducers/strategy/strategies/ask_mobile_number.js +403 -1
- package/dist/reducers/strategy/strategies/ask_operator.js +305 -1
- package/dist/reducers/strategy/strategies/detect_operator_by_ip.js +459 -1
- package/dist/reducers/strategy/strategies/header_enrichment.js +783 -1
- package/dist/reducers/strategy/utils.js +702 -1
- package/dist/reducers/tpayHeFlow/ITpayHeConstants.js +1 -0
- package/dist/reducers/tpayHeFlow/TpayHeTypes.js +1 -0
- package/dist/reducers/tpayHeFlow/index.js +331 -0
- package/dist/reducers/tpayHeFlow/utils.js +510 -0
- package/dist/reducers/ussdFlow/IUssdConstants.js +1 -1
- package/dist/reducers/ussdFlow/UssdTypes.js +1 -1
- package/dist/reducers/ussdFlow/index.js +251 -1
- package/dist/reducers/ussdFlow/utils.js +225 -1
- package/dist/store/index.js +177 -1
- package/dist/store/reducers.js +41 -1
- package/dist/test/setup.js +24 -0
- package/dist/test/test-utils.js +51 -0
- package/dist/utilities/handleSubmitNumber.js +59 -1
- package/package.json +2 -2
- package/dist/api/index.d.ts +0 -43
- package/dist/common-types/AppThunk.d.ts +0 -13
- package/dist/common-types/Either.d.ts +0 -8
- package/dist/common-types/IError.d.ts +0 -3
- package/dist/common-types/IOptInFlowName.d.ts +0 -1
- package/dist/common-types/ITracker.d.ts +0 -9
- package/dist/common-types/IVisitor.d.ts +0 -14
- package/dist/common-types/RemoteDataState.d.ts +0 -38
- package/dist/custom-hooks/useOneClickRedirectUrl.d.ts +0 -3
- package/dist/custom-hooks/useOneClickRedirectUrl.js +0 -1
- package/dist/custom-hooks/usePinEntryState.d.ts +0 -8
- package/dist/custom-hooks/usePinEntryState.js +0 -1
- package/dist/custom-hooks/useStrategyConfig.d.ts +0 -4
- package/dist/custom-hooks/useStrategyConfig.js +0 -1
- package/dist/flows/click2smsFlow.d.ts +0 -6
- package/dist/flows/creditCardFlow.d.ts +0 -6
- package/dist/flows/creditCardFlow.js +0 -1
- package/dist/flows/moFlow.d.ts +0 -6
- package/dist/flows/moRedirFlow.d.ts +0 -6
- package/dist/flows/oneClickFlow.d.ts +0 -7
- package/dist/flows/pinFlow.d.ts +0 -7
- package/dist/flows/strategy.d.ts +0 -14
- package/dist/flows/ussdFlow.d.ts +0 -6
- package/dist/index.d.ts +0 -0
- package/dist/ips/tryGetIPRangeName.d.ts +0 -2
- package/dist/jest.config.js +0 -194
- package/dist/pacman/index.d.ts +0 -6
- package/dist/pacman/queryString.d.ts +0 -3
- package/dist/reducers/click2smsFlow/Click2smsTypes.d.ts +0 -76
- package/dist/reducers/click2smsFlow/IClick2smsConstants.d.ts +0 -2
- package/dist/reducers/click2smsFlow/index.d.ts +0 -5
- package/dist/reducers/click2smsFlow/utils.d.ts +0 -4
- package/dist/reducers/creditCardFlow/CreditCardTypes.d.ts +0 -79
- package/dist/reducers/creditCardFlow/CreditCardTypes.js +0 -1
- package/dist/reducers/creditCardFlow/ICreditCardConstants.d.ts +0 -2
- package/dist/reducers/creditCardFlow/ICreditCardConstants.js +0 -1
- package/dist/reducers/creditCardFlow/index.d.ts +0 -5
- package/dist/reducers/creditCardFlow/index.js +0 -1
- package/dist/reducers/creditCardFlow/utils.d.ts +0 -8
- package/dist/reducers/creditCardFlow/utils.js +0 -1
- package/dist/reducers/moFlow/IMoConstants.d.ts +0 -2
- package/dist/reducers/moFlow/MoTypes.d.ts +0 -88
- package/dist/reducers/moFlow/index.d.ts +0 -16
- package/dist/reducers/moFlow/utils.d.ts +0 -12
- package/dist/reducers/moRedirFlow/IMoRedirConstants.d.ts +0 -2
- package/dist/reducers/moRedirFlow/MoRedirTypes.d.ts +0 -64
- package/dist/reducers/moRedirFlow/index.d.ts +0 -14
- package/dist/reducers/moRedirFlow/utils.d.ts +0 -10
- package/dist/reducers/oneClickFlow/IOneClickConstants.d.ts +0 -2
- package/dist/reducers/oneClickFlow/OneClickTypes.d.ts +0 -85
- package/dist/reducers/oneClickFlow/index.d.ts +0 -13
- package/dist/reducers/oneClickFlow/utils.d.ts +0 -16
- package/dist/reducers/pinFlow/IPinConstants.d.ts +0 -2
- package/dist/reducers/pinFlow/PinTypes.d.ts +0 -156
- package/dist/reducers/pinFlow/index.d.ts +0 -19
- package/dist/reducers/pinFlow/utils.d.ts +0 -11
- package/dist/reducers/strategy/IStategyActionContants.d.ts +0 -2
- package/dist/reducers/strategy/StrategyTypes.d.ts +0 -248
- package/dist/reducers/strategy/index.d.ts +0 -13
- package/dist/reducers/strategy/strategies/ask_mobile_number.d.ts +0 -15
- package/dist/reducers/strategy/strategies/ask_operator.d.ts +0 -5
- package/dist/reducers/strategy/strategies/detect_operator_by_ip.d.ts +0 -10
- package/dist/reducers/strategy/strategies/header_enrichment.d.ts +0 -7
- package/dist/reducers/strategy/strategies/injectHeaderEnrichmentScript.d.ts +0 -7
- package/dist/reducers/strategy/strategies/injectHeaderEnrichmentScript.js +0 -1
- package/dist/reducers/strategy/utils.d.ts +0 -30
- package/dist/reducers/ussdFlow/IUssdConstants.d.ts +0 -2
- package/dist/reducers/ussdFlow/UssdTypes.d.ts +0 -77
- package/dist/reducers/ussdFlow/index.d.ts +0 -14
- package/dist/reducers/ussdFlow/utils.d.ts +0 -11
- package/dist/store/index.d.ts +0 -14
- package/dist/store/reducers.d.ts +0 -20
- package/dist/utilities/addEmpelloToken.d.ts +0 -4
- package/dist/utilities/addEmpelloToken.js +0 -1
- package/dist/utilities/handleSubmitNumber.d.ts +0 -21
- package/dist/utilities/index.d.ts +0 -14
- package/dist/utilities/index.js +0 -1
- package/dist/utilities/loadScriptInnerHtml.d.ts +0 -2
- package/dist/utilities/loadScriptInnerHtml.js +0 -1
- package/dist/utilities/loadScriptSrc.d.ts +0 -8
- package/dist/utilities/loadScriptSrc.js +0 -1
- package/dist/utilities/replaceUrlParam.d.ts +0 -1
- package/dist/utilities/replaceUrlParam.js +0 -1
- package/dist/utilities/storeMsisdn.d.ts +0 -3
- package/dist/utilities/storeMsisdn.js +0 -1
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { AppThunk } from '../../../common-types/AppThunk';
|
|
2
|
-
import { IFlow } from '../StrategyTypes';
|
|
3
|
-
export default function ask_mobile_number(payload?: {
|
|
4
|
-
msisdn: string;
|
|
5
|
-
operator: string;
|
|
6
|
-
isHeaderEnrichmentSuccess: boolean;
|
|
7
|
-
}): AppThunk;
|
|
8
|
-
export declare function submitMSISDNAction(internationalMSISDN: string, isHeSuccess?: boolean): AppThunk;
|
|
9
|
-
export declare const header_enrichment_script: (flowObj: IFlow, msisdn: string, isHeaderEnrichmentSuccess: boolean) => AppThunk;
|
|
10
|
-
export declare const pin_mo_ask_mobile_number: (flowObj: IFlow, msisdn: string) => AppThunk;
|
|
11
|
-
export declare const pin_combo_ask_mobile_number: (flowObj: IFlow, msisdn: string) => AppThunk;
|
|
12
|
-
export declare const pin_mo_redir_ask_mobile_number: (flowObj: IFlow, msisdn: string) => AppThunk;
|
|
13
|
-
export declare const pin_mo_mo_redir_ask_mobile_number: (flowObj: IFlow, msisdn: string) => AppThunk;
|
|
14
|
-
export declare const one_click_mo_pin_detect_operator_by_ip_or_msisdn: (flowObj: IFlow, msisdn: string) => AppThunk;
|
|
15
|
-
export declare const mo_redir_mo_click2sms_one_click_detect_operator_by_ip_or_msisdn: (flowObj: IFlow, msisdn: string) => AppThunk;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { AppThunk } from '../../../common-types/AppThunk';
|
|
2
|
-
import { IFlow } from '../StrategyTypes';
|
|
3
|
-
export default function ask_operator(): AppThunk;
|
|
4
|
-
export declare const he_pin_one_click_ask_operator: (flowObj: IFlow) => AppThunk;
|
|
5
|
-
export declare function selectOperator(operator: string): AppThunk;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { AppThunk } from '../../../common-types/AppThunk';
|
|
2
|
-
import { IFlow } from '../StrategyTypes';
|
|
3
|
-
export default function detect_operator_by_ip(): AppThunk;
|
|
4
|
-
export declare const pin_mo_detect_operator_by_ip: (defaultFlow: IFlow) => AppThunk;
|
|
5
|
-
export declare const mo_one_click_detect_operator_by_ip: (defaultFlow: IFlow) => AppThunk;
|
|
6
|
-
export declare const click2sms_one_click_detect_operator_by_ip: (defaultFlow: IFlow) => AppThunk;
|
|
7
|
-
export declare const pin_one_click_detect_operator_by_ip: (defaultFlow: IFlow) => AppThunk;
|
|
8
|
-
export declare const one_click_mo_pin_detect_operator_by_ip_or_msisdn: (_: IFlow) => AppThunk;
|
|
9
|
-
export declare const mo_redir_one_click_detect_operator_by_ip: (defaultFlow: IFlow) => AppThunk;
|
|
10
|
-
export declare const mo_redir_mo_click2sms_one_click_detect_operator_by_ip_or_msisdn: (_defaultFlow: IFlow) => AppThunk;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { AppThunk } from '../../../common-types/AppThunk';
|
|
2
|
-
import { IFlow } from '../StrategyTypes';
|
|
3
|
-
export default function identify_user(): AppThunk;
|
|
4
|
-
export declare const pin_header_enrichment: (defaultFlow: IFlow) => AppThunk;
|
|
5
|
-
export declare const he_pin_one_click_header_enrichment: (defaultFlow: IFlow) => AppThunk;
|
|
6
|
-
export declare const he_mo_redir_one_click_header_enrichment: (defaultFlow: IFlow) => AppThunk;
|
|
7
|
-
export declare const he_pin_mo_redir_header_enrichment: (defaultFlow: IFlow) => AppThunk;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { AppThunk } from '../../../common-types/AppThunk';
|
|
2
|
-
/**
|
|
3
|
-
* Injects the header enrichment script and performs various actions based on the script's result.
|
|
4
|
-
* If header enrichment is successful, its submits the msisdn to identify user and starts the flow.
|
|
5
|
-
* @return {AppThunk} An async function that dispatches actions based on the script's result.
|
|
6
|
-
*/
|
|
7
|
-
export default function injectHeaderEnrichmentScript(): AppThunk;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";function _typeof(obj){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}require("core-js/modules/es.symbol.js"),require("core-js/modules/es.symbol.description.js"),require("core-js/modules/es.symbol.iterator.js"),require("core-js/modules/es.array.iterator.js"),require("core-js/modules/es.string.iterator.js"),require("core-js/modules/web.dom-collections.iterator.js"),require("core-js/modules/es.symbol.async-iterator.js"),require("core-js/modules/es.symbol.to-string-tag.js"),require("core-js/modules/es.json.to-string-tag.js"),require("core-js/modules/es.math.to-string-tag.js"),require("core-js/modules/es.object.get-prototype-of.js"),require("core-js/modules/web.dom-collections.for-each.js"),require("core-js/modules/es.function.name.js"),require("core-js/modules/es.object.set-prototype-of.js"),require("core-js/modules/es.weak-map.js"),require("core-js/modules/es.object.get-own-property-descriptor.js"),Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=injectHeaderEnrichmentScript,require("core-js/modules/es.array.slice.js"),require("core-js/modules/es.array.includes.js"),require("core-js/modules/es.array.concat.js"),require("core-js/modules/es.string.includes.js"),require("core-js/modules/es.object.to-string.js"),require("core-js/modules/es.promise.js");var _awesomePhonenumber=_interopRequireDefault(require("awesome-phonenumber")),_=require(".."),_loadScriptSrc=_interopRequireDefault(require("../../../utilities/loadScriptSrc")),_ask_mobile_number=_interopRequireWildcard(require("./ask_mobile_number"));function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!=key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}return newObj.default=obj,cache&&cache.set(obj,newObj),newObj}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _regeneratorRuntime(){"use strict";function define(obj,key,value){return Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}),obj[key]}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}}}function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}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(void 0===method){if(context.delegate=null,"throw"===context.method){if(delegate.iterator.return&&(context.method="return",context.arg=void 0,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=void 0),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=void 0,next.done=!0,next};return next.next=next}}return{next:doneResult}}function doneResult(){return{value:void 0,done:!0}}_regeneratorRuntime=function(){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";try{define({},"")}catch(err){define=function(obj,key,value){return obj[key]=value}}exports.wrap=wrap;var ContinueSentinel={},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);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=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!skipTempReset)for(var name in this)"t"===name.charAt(0)&&hasOwn.call(this,name)&&!isNaN(+name.slice(1))&&(this[name]=void 0)},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){function handle(loc,caught){return record.type="throw",record.arg=exception,context.next=loc,caught&&(context.method="next",context.arg=void 0),!!caught}if(this.done)throw exception;for(var context=this,i=this.tryEntries.length-1;0<=i;--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(!hasFinally)throw new Error("try statement without catch or finally");if(this.prev<entry.finallyLoc)return handle(entry.finallyLoc)}else if(this.prev<entry.catchLoc)return handle(entry.catchLoc,!0)}}},abrupt:function abrupt(type,arg){for(var entry,i=this.tryEntries.length-1;0<=i;--i)if(entry=this.tryEntries[i],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 entry,i=this.tryEntries.length-1;0<=i;--i)if(entry=this.tryEntries[i],entry.finallyLoc===finallyLoc)return this.complete(entry.completion,entry.afterLoc),resetTryEntry(entry),ContinueSentinel},catch:function _catch(tryLoc){for(var entry,i=this.tryEntries.length-1;0<=i;--i)if(entry=this.tryEntries[i],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=void 0),ContinueSentinel}},exports}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value}catch(error){return void reject(error)}info.done?resolve(value):Promise.resolve(value).then(_next,_throw)}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value)}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err)}var gen=fn.apply(self,args);_next(void 0)})}}function injectHeaderEnrichmentScript(){return function(){var _ref=_asyncToGenerator(_regeneratorRuntime().mark(function _callee(dispatch){var _window,_window$pac_analytics,_window$pac_analytics2,_window$pac_analytics3,_window2,_window2$pac_analytic,_window2$pac_analytic2,_window3,_window3$pac_analytic,_window3$pac_analytic2,_window4,_window4$pac_analytic,_window4$pac_analytic2,_window5,_window5$pac_analytic,_window5$pac_analytic2,gateway,heMsisdn,heOperator,page,country,pn,internationalMsisdn,msisdnDetected,timerExpired,timerId,abTestPages,_window6,_window6$pac_analytic,_window6$pac_analytic2,_window7,_window7$pac_analytic,_window7$pac_analytic2,url,_window8,_window8$pac_analytic,_window8$pac_analytic2,_window8$pac_analytic3,_window9,_window9$TPay,_window9$TPay$HeaderE,isEnriched,heMsisdnTpay,_pn2,_internationalMsisdn2,operatorCode,operatorCodeMapping;return _regeneratorRuntime().wrap(function _callee$(_context){for(;1;)switch(_context.prev=_context.next){case 0:try{if(gateway=null===(_window=window)||void 0===_window||null===(_window$pac_analytics=_window.pac_analytics)||void 0===_window$pac_analytics||null===(_window$pac_analytics2=_window$pac_analytics.visitor)||void 0===_window$pac_analytics2||null===(_window$pac_analytics3=_window$pac_analytics2.genericJsLinkResult)||void 0===_window$pac_analytics3?void 0:_window$pac_analytics3.gateway,heMsisdn=null===(_window2=window)||void 0===_window2||null===(_window2$pac_analytic=_window2.pac_analytics)||void 0===_window2$pac_analytic||null===(_window2$pac_analytic2=_window2$pac_analytic.visitor)||void 0===_window2$pac_analytic2?void 0:_window2$pac_analytic2.heMsisdn,heOperator=null===(_window3=window)||void 0===_window3||null===(_window3$pac_analytic=_window3.pac_analytics)||void 0===_window3$pac_analytic||null===(_window3$pac_analytic2=_window3$pac_analytic.visitor)||void 0===_window3$pac_analytic2?void 0:_window3$pac_analytic2.heOperator,page=null===(_window4=window)||void 0===_window4||null===(_window4$pac_analytic=_window4.pac_analytics)||void 0===_window4$pac_analytic||null===(_window4$pac_analytic2=_window4$pac_analytic.visitor)||void 0===_window4$pac_analytic2?void 0:_window4$pac_analytic2.page,country=null===(_window5=window)||void 0===_window5||null===(_window5$pac_analytic=_window5.pac_analytics)||void 0===_window5$pac_analytic||null===(_window5$pac_analytic2=_window5$pac_analytic.visitor)||void 0===_window5$pac_analytic2?void 0:_window5$pac_analytic2.country,heMsisdn&&(pn=new _awesomePhonenumber.default(heMsisdn,country),internationalMsisdn=pn.getNumber("e164"),heMsisdn=internationalMsisdn.slice(1)),msisdnDetected=!1,timerExpired=!1,abTestPages=["ae-fl-infomedia-evina-hetest","ae-video-beyondvr-he-test","ae-video-beyondvr-3sec-hetest","ae-beyondvr-fileready-he-3sec","ae-video-beyondvr-he-timer","ae-video-beyondvr-cta-visible"],abTestPages.includes(page)&&(timerId=setTimeout(function(){!1===msisdnDetected&&(timerExpired=!0,_.tracker.customEvent("Flow","recede-auto","msisdn-detection-failure",{errorType:"3 second timer expired"}),window.isPrelanderClicked=!0,dispatch((0,_ask_mobile_number.default)()))},3e3)),"tpay"===gateway||heMsisdn||(url="/tallyman/he?country=".concat(null===(_window6=window)||void 0===_window6||null===(_window6$pac_analytic=_window6.pac_analytics)||void 0===_window6$pac_analytic||null===(_window6$pac_analytic2=_window6$pac_analytic.visitor)||void 0===_window6$pac_analytic2?void 0:_window6$pac_analytic2.country,"&rockman_id=").concat(null===(_window7=window)||void 0===_window7||null===(_window7$pac_analytic=_window7.pac_analytics)||void 0===_window7$pac_analytic||null===(_window7$pac_analytic2=_window7$pac_analytic.visitor)||void 0===_window7$pac_analytic2?void 0:_window7$pac_analytic2.rockmanId),_.tracker.customEvent("Flow","advance-auto","msisdn-detection-start",{url:url}),(0,_loadScriptSrc.default)({url:url,callBack:function callBack(){_.tracker.customEvent("Flow","recede-auto","msisdn-detection-failure",{errorType:"Could not load script possible reason is page is https and script is http"}),dispatch((0,_ask_mobile_number.default)())}})),window.addEventListener("he-success",function(event){var msisdn,_ref2=event,detail=_ref2.detail;if(detail.msisdn){var _pn=new _awesomePhonenumber.default(null===detail||void 0===detail?void 0:detail.msisdn,country),_internationalMsisdn=_pn.getNumber("e164");msisdn=_internationalMsisdn.slice(1)}abTestPages.includes(page)?!1===timerExpired&&(msisdnDetected=!0,clearTimeout(timerId),_.tracker.customEvent("Flow","advance-auto","msisdn-detected",{msisdn:msisdn}),dispatch((0,_ask_mobile_number.submitMSISDNAction)(msisdn,!0))):(_.tracker.customEvent("Flow","advance-auto","msisdn-detected",{msisdn:msisdn,operator:null===detail||void 0===detail?void 0:detail.operator_code}),dispatch((0,_ask_mobile_number.submitMSISDNAction)(msisdn,!0)))}),window.addEventListener("he-fail",function(){_.tracker.customEvent("Flow","recede-auto","msisdn-detection-failure",{errorType:"Header enrichment failed"}),dispatch((0,_ask_mobile_number.default)())}),"tpay"===gateway)try{_.tracker.customEvent("Flow","advance-auto","msisdn-detection-start",{url:null===(_window8=window)||void 0===_window8||null===(_window8$pac_analytic=_window8.pac_analytics)||void 0===_window8$pac_analytic||null===(_window8$pac_analytic2=_window8$pac_analytic.visitor)||void 0===_window8$pac_analytic2||null===(_window8$pac_analytic3=_window8$pac_analytic2.genericJsLinkResult)||void 0===_window8$pac_analytic3?void 0:_window8$pac_analytic3.jsLink}),isEnriched=null===(_window9=window)||void 0===_window9||null===(_window9$TPay=_window9.TPay)||void 0===_window9$TPay||null===(_window9$TPay$HeaderE=_window9$TPay.HeaderEnrichment)||void 0===_window9$TPay$HeaderE?void 0:_window9$TPay$HeaderE.enriched(),isEnriched?(heMsisdnTpay=window.TPay.HeaderEnrichment.msisdn(),heMsisdnTpay&&(_pn2=new _awesomePhonenumber.default(heMsisdnTpay,country),_internationalMsisdn2=_pn2.getNumber("e164"),heMsisdnTpay=_internationalMsisdn2.slice(1)),operatorCode=window.TPay.HeaderEnrichment.operatorCode(),operatorCodeMapping={42402:"AE_ETISALAT",42403:"AE_DU"},window.dispatchEvent(new CustomEvent("he-success",{detail:{msisdn:heMsisdnTpay,operator_code:operatorCodeMapping[operatorCode]}}))):(console.warn("Enriched() false, no msisdn, user need to submit msisdn"),_.tracker.customEvent("Flow","recede-auto","msisdn-detection-failure",{errorType:"Enriched() false, no msisdn, user need to submit msisdn"}),dispatch((0,_ask_mobile_number.default)()))}catch(e){console.error("Tpay Error",e),_.tracker.customEvent("Flow","recede-auto","msisdn-detection-failure",{errorType:null===e||void 0===e?void 0:e.message}),dispatch((0,_ask_mobile_number.default)())}heMsisdn&&window.dispatchEvent(new CustomEvent("he-success",{detail:{msisdn:heMsisdn,operator_code:heOperator}}))}catch(err){_.tracker.customEvent("Flow","recede-auto","msisdn-detection-failure",{errorType:null===err||void 0===err?void 0:err.message}),dispatch((0,_ask_mobile_number.default)())}case 1:case"end":return _context.stop();}},_callee)}));return function(_x){return _ref.apply(this,arguments)}}()}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import Either from '../../common-types/Either';
|
|
2
|
-
import { ILinkExtraParams } from '../oneClickFlow/OneClickTypes';
|
|
3
|
-
import { IConfig, IFlow, IStrategy, IStrategyReducerState } from './StrategyTypes';
|
|
4
|
-
export declare const wait: (ms: number) => Promise<unknown>;
|
|
5
|
-
export declare const loop: <_I extends {}, R extends {}>(f: () => Promise<R>, max: number, stop: (r: R) => boolean, i: number) => Promise<R>;
|
|
6
|
-
export declare function right<L, R>(r: R): Either<L, R>;
|
|
7
|
-
export declare function left<L, R>(l: L): Either<L, R>;
|
|
8
|
-
export declare const getConfig: () => IStrategy;
|
|
9
|
-
export declare const searchToObject: () => {};
|
|
10
|
-
export declare function determineFlowByMsidn(internationalMSISDN: string): Promise<IFlow>;
|
|
11
|
-
export declare function determineFlowByOperator(operator: string): IFlow;
|
|
12
|
-
export declare function determineFlowByOperatorFromIp(): Promise<IFlow>;
|
|
13
|
-
export declare function getOperators(): Array<string>;
|
|
14
|
-
export declare const identifyUser: (extraParams?: ILinkExtraParams) => Promise<{
|
|
15
|
-
msisdn: string;
|
|
16
|
-
operator: string;
|
|
17
|
-
subscription_url?: string;
|
|
18
|
-
redirect_url?: string;
|
|
19
|
-
action?: () => Promise<string>;
|
|
20
|
-
}>;
|
|
21
|
-
export declare const subscribe: (_url: string) => Promise<string>;
|
|
22
|
-
export declare function mockConfig(flow: string): IConfig;
|
|
23
|
-
export declare const mockedPinFlow: IStrategyReducerState;
|
|
24
|
-
export declare const mockedMoFlow: IStrategyReducerState;
|
|
25
|
-
export declare const mockedUssdFlow: IStrategyReducerState;
|
|
26
|
-
export declare const mockedMoRdirFlow: IStrategyReducerState;
|
|
27
|
-
export declare const mockedClick2smsFlow: IStrategyReducerState;
|
|
28
|
-
export declare const mockedOneClickFlow: IStrategyReducerState;
|
|
29
|
-
export declare const mockedTPayFlow: IStrategyReducerState;
|
|
30
|
-
export declare const mockedCreditCardFlow: IStrategyReducerState;
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { AppThunk } from '../../common-types/AppThunk';
|
|
2
|
-
import * as RDS from '../../common-types/RemoteDataState';
|
|
3
|
-
export declare type IUssdFlowCurrentState = {
|
|
4
|
-
type: 'MSISDNEntry';
|
|
5
|
-
result: RDS.RemoteDataState<MSISDNEntryFailure, MSISDNEntrySuccess>;
|
|
6
|
-
};
|
|
7
|
-
export declare type MSISDNEntryErrorTypes = 'AlreadySubscribed' | 'UnknownError' | 'InvalidMSISDN' | 'UnexpectedState';
|
|
8
|
-
export declare type MSISDNEntryFailure = {
|
|
9
|
-
errorType: MSISDNEntryErrorTypes;
|
|
10
|
-
error: any;
|
|
11
|
-
productUrl?: string;
|
|
12
|
-
};
|
|
13
|
-
export declare type MSISDNEntrySuccess = IKeywordShortcode;
|
|
14
|
-
export declare type IMsisnSubmitActionPayload = {
|
|
15
|
-
type: 'MSISDNEntry';
|
|
16
|
-
result: RDS.RemoteDataState<MSISDNEntryFailure, MSISDNEntrySuccess>;
|
|
17
|
-
};
|
|
18
|
-
export interface IUssdFlowReducerState {
|
|
19
|
-
currentState: IUssdFlowCurrentState;
|
|
20
|
-
}
|
|
21
|
-
export declare type IConfig = {
|
|
22
|
-
offer?: number;
|
|
23
|
-
slug?: string;
|
|
24
|
-
country?: string;
|
|
25
|
-
host?: string;
|
|
26
|
-
device?: 'smart' | 'feature';
|
|
27
|
-
operators?: string[];
|
|
28
|
-
};
|
|
29
|
-
export declare type IKeywordShortcode = {
|
|
30
|
-
keyword: string;
|
|
31
|
-
shortcode: string;
|
|
32
|
-
};
|
|
33
|
-
export declare type IMSISDNSubmissionResult = {
|
|
34
|
-
success: true;
|
|
35
|
-
rockman_id: string;
|
|
36
|
-
keyword: string;
|
|
37
|
-
shortcode: string;
|
|
38
|
-
} | {
|
|
39
|
-
success: false;
|
|
40
|
-
rockman_id: string;
|
|
41
|
-
message: string;
|
|
42
|
-
};
|
|
43
|
-
export declare type ICheckSubscriptionResult = {
|
|
44
|
-
success: false;
|
|
45
|
-
rockman_id: string;
|
|
46
|
-
message: string;
|
|
47
|
-
} | {
|
|
48
|
-
success: true;
|
|
49
|
-
msisdn: string;
|
|
50
|
-
product_url?: string;
|
|
51
|
-
rockman_id: string;
|
|
52
|
-
};
|
|
53
|
-
export declare type IBackToStartPayload = {
|
|
54
|
-
type: 'MSISDNEntry';
|
|
55
|
-
result: RDS.RemoteDataState<MSISDNEntryFailure, MSISDNEntrySuccess>;
|
|
56
|
-
};
|
|
57
|
-
export declare type IUssdActions = {
|
|
58
|
-
type: 'USSD_MSISDN_SUBMIT';
|
|
59
|
-
payload: IMsisnSubmitActionPayload;
|
|
60
|
-
} | {
|
|
61
|
-
type: 'USSD_MSISDN_SUBMIT_ERROR';
|
|
62
|
-
payload: IMsisdnSubmitErrorPayload;
|
|
63
|
-
} | {
|
|
64
|
-
type: 'USSD_BACK_TO_START';
|
|
65
|
-
payload: IBackToStartPayload;
|
|
66
|
-
} | {
|
|
67
|
-
type: 'MOCK_USSD_FLOW_STATE';
|
|
68
|
-
payload: IUssdFlowCurrentState;
|
|
69
|
-
};
|
|
70
|
-
export declare type IMsisdnSubmitErrorPayload = {
|
|
71
|
-
type: 'MSISDNEntry';
|
|
72
|
-
result: RDS.RemoteDataState<MSISDNEntryFailure, MSISDNEntrySuccess>;
|
|
73
|
-
};
|
|
74
|
-
export declare type IUssdFlowActionMaps = {
|
|
75
|
-
submitMSISDNAction: (msisdn: string) => AppThunk;
|
|
76
|
-
};
|
|
77
|
-
export declare type IMockUssdFlowStates = 'msisdn-entry-success-state' | 'msisdn-entry-failure-state';
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { AppThunk } from '../../common-types/AppThunk';
|
|
2
|
-
import * as RDS from '../../common-types/RemoteDataState';
|
|
3
|
-
import { IMockUssdFlowStates, IUssdActions, IUssdFlowActionMaps, IUssdFlowReducerState, MSISDNEntryFailure } from './UssdTypes';
|
|
4
|
-
export declare function submitMSISDNAction(msisdn: string): AppThunk;
|
|
5
|
-
export declare function mockUssdFlow(mockState: IMockUssdFlowStates): AppThunk;
|
|
6
|
-
export declare function backToStart(): {
|
|
7
|
-
type: string;
|
|
8
|
-
payload: {
|
|
9
|
-
type: string;
|
|
10
|
-
result: RDS.RemoteDataState<MSISDNEntryFailure, import("./UssdTypes").IKeywordShortcode>;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
export declare const UssdFlowActionMaps: IUssdFlowActionMaps;
|
|
14
|
-
export default function UssdFlowReducer(state: IUssdFlowReducerState, action: IUssdActions): IUssdFlowReducerState;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { IConfig, IKeywordShortcode, IUssdFlowReducerState } from './UssdTypes';
|
|
2
|
-
export default function submitMSISDN(window: Window, maybeConfig: IConfig, internationalMSISDN: string, extraParams?: {
|
|
3
|
-
[key: string]: string;
|
|
4
|
-
}): Promise<IKeywordShortcode>;
|
|
5
|
-
export declare function submitMSISDNWithConfig(window: Window, config: IConfig, internationalMSISDN: string, extraParams?: {
|
|
6
|
-
[key: string]: string;
|
|
7
|
-
}): Promise<IKeywordShortcode>;
|
|
8
|
-
export declare function checkSubscription(window: Window, maybeConfig: IConfig): Promise<string>;
|
|
9
|
-
export declare const formatSMSLink: (keywordAndShortcode: IKeywordShortcode) => string;
|
|
10
|
-
export declare const mockedMSISDNEntrySuccess: IUssdFlowReducerState;
|
|
11
|
-
export declare const mockedMSISDNEntryFailure: IUssdFlowReducerState;
|
package/dist/store/index.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { IClick2SmsActions } from '../reducers/click2smsFlow/Click2smsTypes';
|
|
2
|
-
import { ICreditCardActions } from '../reducers/creditCardFlow/CreditCardTypes';
|
|
3
|
-
import { IMoActions } from '../reducers/moFlow/MoTypes';
|
|
4
|
-
import { IMoRedirActions } from '../reducers/moRedirFlow/MoRedirTypes';
|
|
5
|
-
import { IOneClickActions } from '../reducers/oneClickFlow/OneClickTypes';
|
|
6
|
-
import { IPinActions } from '../reducers/pinFlow/PinTypes';
|
|
7
|
-
import { IStrategyActions } from '../reducers/strategy/StrategyTypes';
|
|
8
|
-
import { IUssdActions } from '../reducers/ussdFlow/UssdTypes';
|
|
9
|
-
import { IApplicationState } from './reducers';
|
|
10
|
-
export declare type IApplicationActions = IStrategyActions | IPinActions | IMoActions | IMoRedirActions | IOneClickActions | IClick2SmsActions | IUssdActions | ICreditCardActions;
|
|
11
|
-
declare const store: import("redux").Store<import("redux").EmptyObject & IApplicationState, import("redux").AnyAction> & {
|
|
12
|
-
dispatch: import("redux-thunk").ThunkDispatch<IApplicationState, undefined, IApplicationActions>;
|
|
13
|
-
};
|
|
14
|
-
export default store;
|
package/dist/store/reducers.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { IClick2smsFlowReducerState } from '../reducers/click2smsFlow/Click2smsTypes';
|
|
2
|
-
import { ICreditCardFlowReducerState } from '../reducers/creditCardFlow/CreditCardTypes';
|
|
3
|
-
import { IMoFlowReducerState } from '../reducers/moFlow/MoTypes';
|
|
4
|
-
import { IMoRedirFlowReducerState } from '../reducers/moRedirFlow/MoRedirTypes';
|
|
5
|
-
import { IOneClickFlowReducerState } from '../reducers/oneClickFlow/OneClickTypes';
|
|
6
|
-
import { IPinFlowReducerState } from '../reducers/pinFlow/PinTypes';
|
|
7
|
-
import { IStrategyReducerState } from '../reducers/strategy/StrategyTypes';
|
|
8
|
-
import { IUssdFlowReducerState } from '../reducers/ussdFlow/UssdTypes';
|
|
9
|
-
export interface IApplicationState {
|
|
10
|
-
strategy: IStrategyReducerState;
|
|
11
|
-
pinFlow: IPinFlowReducerState;
|
|
12
|
-
moFlow: IMoFlowReducerState;
|
|
13
|
-
moRedirFlow: IMoRedirFlowReducerState;
|
|
14
|
-
oneClickFlow: IOneClickFlowReducerState;
|
|
15
|
-
click2smsFlow: IClick2smsFlowReducerState;
|
|
16
|
-
ussdFlow: IUssdFlowReducerState;
|
|
17
|
-
creditCardFlow: ICreditCardFlowReducerState;
|
|
18
|
-
}
|
|
19
|
-
declare const _default: () => import("redux").Reducer<import("redux").CombinedState<IApplicationState>, import("redux").AnyAction>;
|
|
20
|
-
export default _default;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var _queryString=require("../pacman/queryString");function _typeof(obj){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}require("core-js/modules/es.symbol.js"),require("core-js/modules/es.symbol.description.js"),require("core-js/modules/es.symbol.iterator.js"),require("core-js/modules/es.array.iterator.js"),require("core-js/modules/es.string.iterator.js"),require("core-js/modules/web.dom-collections.iterator.js"),require("core-js/modules/es.symbol.async-iterator.js"),require("core-js/modules/es.symbol.to-string-tag.js"),require("core-js/modules/es.json.to-string-tag.js"),require("core-js/modules/es.math.to-string-tag.js"),require("core-js/modules/es.object.get-prototype-of.js"),require("core-js/modules/web.dom-collections.for-each.js"),require("core-js/modules/es.function.name.js"),require("core-js/modules/es.object.set-prototype-of.js"),require("core-js/modules/es.array.slice.js"),Object.defineProperty(exports,"__esModule",{value:!0}),exports.addEmpelloToken=addEmpelloToken,require("core-js/modules/es.object.to-string.js"),require("core-js/modules/es.promise.js");function _regeneratorRuntime(){"use strict";function define(obj,key,value){return Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}),obj[key]}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}}}function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}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(void 0===method){if(context.delegate=null,"throw"===context.method){if(delegate.iterator.return&&(context.method="return",context.arg=void 0,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=void 0),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=void 0,next.done=!0,next};return next.next=next}}return{next:doneResult}}function doneResult(){return{value:void 0,done:!0}}_regeneratorRuntime=function(){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";try{define({},"")}catch(err){define=function(obj,key,value){return obj[key]=value}}exports.wrap=wrap;var ContinueSentinel={},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);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=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!skipTempReset)for(var name in this)"t"===name.charAt(0)&&hasOwn.call(this,name)&&!isNaN(+name.slice(1))&&(this[name]=void 0)},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){function handle(loc,caught){return record.type="throw",record.arg=exception,context.next=loc,caught&&(context.method="next",context.arg=void 0),!!caught}if(this.done)throw exception;for(var context=this,i=this.tryEntries.length-1;0<=i;--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(!hasFinally)throw new Error("try statement without catch or finally");if(this.prev<entry.finallyLoc)return handle(entry.finallyLoc)}else if(this.prev<entry.catchLoc)return handle(entry.catchLoc,!0)}}},abrupt:function abrupt(type,arg){for(var entry,i=this.tryEntries.length-1;0<=i;--i)if(entry=this.tryEntries[i],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 entry,i=this.tryEntries.length-1;0<=i;--i)if(entry=this.tryEntries[i],entry.finallyLoc===finallyLoc)return this.complete(entry.completion,entry.afterLoc),resetTryEntry(entry),ContinueSentinel},catch:function _catch(tryLoc){for(var entry,i=this.tryEntries.length-1;0<=i;--i)if(entry=this.tryEntries[i],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=void 0),ContinueSentinel}},exports}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value}catch(error){return void reject(error)}info.done?resolve(value):Promise.resolve(value).then(_next,_throw)}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value)}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err)}var gen=fn.apply(self,args);_next(void 0)})}}function addEmpelloToken(){return _addEmpelloToken.apply(this,arguments)}function _addEmpelloToken(){return _addEmpelloToken=_asyncToGenerator(_regeneratorRuntime().mark(function _callee(_ref){var currentRedirectUrl,country,token,url;return _regeneratorRuntime().wrap(function _callee$(_context){for(;1;)switch(_context.prev=_context.next){case 0:if(currentRedirectUrl=_ref.currentRedirectUrl,country=_ref.country,"pe"!==country.toLowerCase()){_context.next=10;break}return _context.next=4,new Promise(function(resolve){var checkEmpelloAvailability=setInterval(function(){window.Empello&&(clearInterval(checkEmpelloAvailability),resolve())},100)});case 4:if(!("undefined"!=typeof window&&window.Empello)){_context.next=10;break}return _context.next=7,new Promise(function(resolve){window.Empello.getToken(function(empelloToken){resolve(empelloToken)})});case 7:return token=_context.sent,url=(0,_queryString.updateUrlParameter)(currentRedirectUrl,"empello_token",token),_context.abrupt("return",url);case 10:return _context.abrupt("return",currentRedirectUrl);case 11:case"end":return _context.stop();}},_callee)})),_addEmpelloToken.apply(this,arguments)}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Action } from 'redux';
|
|
2
|
-
import { ThunkDispatch } from 'redux-thunk';
|
|
3
|
-
import { AppThunk, IAllActionConstants } from '../common-types/AppThunk';
|
|
4
|
-
import { IApplicationState } from '../store/reducers';
|
|
5
|
-
export declare const handleAutoSubmitMsisdn: ({ msisdnValue, dispatch, submitMSISDNAction, isHeaderEnrichmentSuccess, setMsisdnValue, isHeaderEnrichmentAutoSubmit }: {
|
|
6
|
-
msisdnValue: string;
|
|
7
|
-
dispatch: ThunkDispatch<IApplicationState, unknown, Action<IAllActionConstants>>;
|
|
8
|
-
submitMSISDNAction: (msisdnValue: string) => AppThunk;
|
|
9
|
-
isHeaderEnrichmentSuccess: boolean;
|
|
10
|
-
setMsisdnValue: (msisdnValue: string) => void;
|
|
11
|
-
isHeaderEnrichmentAutoSubmit?: boolean;
|
|
12
|
-
}) => void;
|
|
13
|
-
export declare const handleFormSubmit: ({ isHeaderEnrichmentSuccess, setInternationalNumber, onEnd, internationalNumber }: {
|
|
14
|
-
isHeaderEnrichmentSuccess: boolean;
|
|
15
|
-
country: string;
|
|
16
|
-
setInternationalNumber: (msisdn: string) => void;
|
|
17
|
-
onEnd: (msisdn: string, extraParams?: {
|
|
18
|
-
[key: string]: string;
|
|
19
|
-
}) => void;
|
|
20
|
-
internationalNumber: string;
|
|
21
|
-
}) => void;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { IConfig } from '../reducers/strategy/StrategyTypes';
|
|
2
|
-
export declare const isDMBCheck: () => boolean;
|
|
3
|
-
export declare const setOnLoadUtilities: (config: IConfig) => void;
|
|
4
|
-
export declare type SAOperators = 'SA_VIRGIN' | 'SA_MOBILY' | 'SA_STC' | 'SA_ZAIN';
|
|
5
|
-
export declare function getSAOperatorByMsisdnPrefix(msisdn: string): SAOperators | undefined;
|
|
6
|
-
export declare const hasNumber: (myString: string) => boolean;
|
|
7
|
-
export declare const mapAgencyOperator: {
|
|
8
|
-
[key: string]: string;
|
|
9
|
-
};
|
|
10
|
-
export declare const getKeyByValue: (object: {
|
|
11
|
-
[key: string]: string;
|
|
12
|
-
}, value: string | number) => string;
|
|
13
|
-
export declare const isCookieExists: (cookieName: string) => boolean;
|
|
14
|
-
export declare const getCookie: (cookieName: string) => string;
|
package/dist/utilities/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getKeyByValue=exports.getCookie=void 0,exports.getSAOperatorByMsisdnPrefix=getSAOperatorByMsisdnPrefix,exports.setOnLoadUtilities=exports.mapAgencyOperator=exports.isDMBCheck=exports.isCookieExists=exports.hasNumber=void 0,require("core-js/modules/es.array.iterator.js"),require("core-js/modules/es.map.js"),require("core-js/modules/es.object.to-string.js"),require("core-js/modules/es.string.iterator.js"),require("core-js/modules/web.dom-collections.iterator.js"),require("core-js/modules/es.regexp.exec.js"),require("core-js/modules/es.regexp.test.js"),require("core-js/modules/es.array.find.js"),require("core-js/modules/es.object.keys.js"),require("core-js/modules/es.string.match.js"),require("core-js/modules/es.regexp.constructor.js"),require("core-js/modules/es.regexp.sticky.js"),require("core-js/modules/es.regexp.to-string.js"),require("core-js/modules/es.string.split.js");var _utils=require("../reducers/moFlow/utils"),_utils2=require("../reducers/moRedirFlow/utils"),_utils3=require("../reducers/pinFlow/utils"),isDMBCheck=function(){var _window$pac_analytics,_window$pac_analytics2,_window$pac_analytics3,_window$pac_analytics4;return!(null===window.pac_analytics.visitor.xaid||-1===(-1!==(null===(_window$pac_analytics=window.pac_analytics.visitor.xaid)||void 0===_window$pac_analytics||null===(_window$pac_analytics2=_window$pac_analytics.toLowerCase())||void 0===_window$pac_analytics2?void 0:_window$pac_analytics2.indexOf("dmb"))||(null===(_window$pac_analytics3=window.pac_analytics.visitor.xaid)||void 0===_window$pac_analytics3||null===(_window$pac_analytics4=_window$pac_analytics3.toLowerCase())||void 0===_window$pac_analytics4?void 0:_window$pac_analytics4.indexOf("amb"))))};exports.isDMBCheck=isDMBCheck;var setOnLoadUtilities=function(config){"undefined"!=typeof window&&("cz"===process.env.country.toLowerCase()&&(0,_utils.getGoogleReCaptchaConfig)(config),"a2"===process.env.country.toLowerCase()&&"production"===process.env.NODE_ENV&&(0,_utils2.startEvinaAgency)(config),("sa"===process.env.country.toLowerCase()||"iq"===process.env.country.toLowerCase()||"k2"===process.env.country.toLowerCase()||"bh"===process.env.country.toLowerCase())&&(0,_utils3.loadMcpShield)(window,config))};exports.setOnLoadUtilities=setOnLoadUtilities;var saPrefixOperatorMap=new Map([["966571","SA_VIRGIN"],["966500","SA_STC"],["966501","SA_STC"],["966502","SA_STC"],["966503","SA_STC"],["966504","SA_STC"],["966505","SA_STC"],["966506","SA_STC"],["966507","SA_STC"],["966508","SA_STC"],["966509","SA_STC"],["966512","SA_STC"],["966514","SA_STC"],["966515","SA_STC"],["966517","SA_STC"],["966530","SA_STC"],["966531","SA_STC"],["966532","SA_STC"],["966533","SA_STC"],["966534","SA_STC"],["966535","SA_STC"],["966536","SA_STC"],["966537","SA_STC"],["966538","SA_STC"],["966539","SA_STC"],["966540","SA_MOBILY"],["966541","SA_MOBILY"],["966542","SA_MOBILY"],["966543","SA_MOBILY"],["966544","SA_MOBILY"],["966545","SA_MOBILY"],["966546","SA_MOBILY"],["966547","SA_MOBILY"],["966548","SA_MOBILY"],["966549","SA_MOBILY"],["966550","SA_STC"],["966551","SA_STC"],["966552","SA_STC"],["966553","SA_STC"],["966554","SA_STC"],["966555","SA_STC"],["966556","SA_STC"],["966557","SA_STC"],["966558","SA_STC"],["966559","SA_STC"],["966560","SA_MOBILY"],["966561","SA_MOBILY"],["966562","SA_MOBILY"],["966563","SA_MOBILY"],["966564","SA_MOBILY"],["966565","SA_MOBILY"],["966566","SA_MOBILY"],["966567","SA_MOBILY"],["966568","SA_MOBILY"],["966569","SA_MOBILY"],["966570","SA_VIRGIN"],["966572","SA_VIRGIN"],["966573","SA_VIRGIN"],["966580","SA_ZAIN"],["966581","SA_ZAIN"],["966582","SA_ZAIN"],["966583","SA_ZAIN"],["966586","SA_ZAIN"],["966588","SA_ZAIN"],["966589","SA_ZAIN"],["966590","SA_ZAIN"],["966591","SA_ZAIN"],["966592","SA_ZAIN"],["966593","SA_ZAIN"],["966594","SA_ZAIN"],["966595","SA_ZAIN"],["966596","SA_ZAIN"],["966597","SA_ZAIN"],["966598","SA_ZAIN"],["966599","SA_ZAIN"]]);function getSAOperatorByMsisdnPrefix(msisdn){var msisdnF=msisdn;"0"===msisdnF[0]&&(msisdnF="966".concat(msisdnF.substring(1)));var prefix=msisdnF.substring(0,6);return saPrefixOperatorMap.get(prefix)}var hasNumber=function(myString){return /\d/.test(myString)};exports.hasNumber=hasNumber;var mapAgencyOperator={SA_STC:"S2_STC",SA_MOBILY:"S2_MOBILY",SA_ZAIN:"S2_ZAIN",KW_ZAIN:"K2_ZAIN",KW_OOREDOO:"K2_OOREDOO",KW_VIVA:"K2_VIVA",AE_DU:"A2_DU",AE_ETISALAT:"A2_ETISALAT",CA_SUNRISE:"C2_SUNRISE",CA_TELE2:"C2_TELE2",CA_SWISSCOM:"C2_SWISSCOM",CA_SALT:"C2_SALT",OM_OOREDOO:"O2_OOREDOO",OM_OMANTEL:"O2_OMANTEL",RS_TELEKOM:"R2_TELEKOM",RS_VIP:"R2_VIP",RS_TELIM:"R2_TELIM",BH_ZAIN:"B2_ZAIN",BH_BATELCO:"B2_BATELCO",BH_STC:"B2_STC",GR_VODAFONE:"G2_VODAFONE",GR_WIND:"G2_WIND",GR_COSMOTE:"G2_COSMOTE",AT_TELECOM:"A3_TELECOM",AT_DRIE:"A3_DRIE",AT_TMOBILE:"A3_TMOBILE"};exports.mapAgencyOperator=mapAgencyOperator;var getKeyByValue=function(object,value){return Object.keys(object).find(function(key){return object[key]===value})};exports.getKeyByValue=getKeyByValue;var isCookieExists=function(cookieName){return"undefined"!=typeof window&&null!==document.cookie.match(new RegExp("^(.*;)?\\s*".concat(cookieName,"\\s*=\\s*[^;]+(.*)?$")))};exports.isCookieExists=isCookieExists;var getCookie=function(cookieName){for(var cookie,name="".concat(cookieName,"="),decodedCookie=decodeURIComponent(document.cookie),cookieArray=decodedCookie.split(";"),i=0;i<cookieArray.length;i++){for(cookie=cookieArray[i];" "===cookie.charAt(0);)cookie=cookie.substring(1);if(0===cookie.indexOf(name))return cookie.substring(name.length,cookie.length)}return null};exports.getCookie=getCookie;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0,require("core-js/modules/es.symbol.js"),require("core-js/modules/es.symbol.description.js"),require("core-js/modules/es.object.to-string.js"),require("core-js/modules/es.symbol.iterator.js"),require("core-js/modules/es.array.iterator.js"),require("core-js/modules/es.string.iterator.js"),require("core-js/modules/web.dom-collections.iterator.js");function _typeof(obj){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}var loadScriptInnerHtml=function(innerHTML,isBody){var script=document.createElement("script");if(script.type="text/javascript",script.innerHTML=innerHTML,script.id="agency_mt2"===window.gateway?"EvinaPinTrigger":"",isBody)document.getElementsByTagName("body")[0].appendChild(script);else{var headElem=document.getElementsByTagName("head")[0];headElem.insertBefore(script,headElem.firstChild),setTimeout(function(){if("agency_mt2"===window.gateway&&void 0!==_typeof(window.evina_dcb)){console.log("Ev ready");var event=new Event("DCBProtectRun");"undefined"!=typeof window&&document.dispatchEvent(event)}},0)}},_default=loadScriptInnerHtml;exports.default=_default;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var _loadScriptInnerHtml=_interopRequireDefault(require("./loadScriptInnerHtml"));Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var loadScriptSrc=function(_ref){var url=_ref.url,key=_ref.key,_ref$isRecaptcha=_ref.isRecaptcha,callBack=_ref.callBack,_ref$id=_ref.id,id=void 0===_ref$id?"":_ref$id,script=document.createElement("script");script.type="text/javascript",script.src=url,script.id="injected_script_".concat(id);var headElem=document.getElementsByTagName("head")[0];headElem.insertBefore(script,headElem.firstChild),void 0!==_ref$isRecaptcha&&_ref$isRecaptcha&&(script.onload=function(){var scriptInner="\n grecaptcha.ready(function() {\n grecaptcha.execute(\"".concat(key,"\", {action: 'submit'}).then(function(token) {\n // To be used by tallyman\n window.reCaptchaToken = token;\n console.log(\"-------\" + token);\n });\n });\n ");(0,_loadScriptInnerHtml.default)(scriptInner,!0)}),script.onerror=function(){console.error("Error loading script",url),callBack&&callBack()}},_default=loadScriptSrc;exports.default=_default;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const replaceUrlParam: (url: string, paramName: string, paramValue?: string) => string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.replaceUrlParam=void 0,require("core-js/modules/es.regexp.constructor.js"),require("core-js/modules/es.regexp.exec.js"),require("core-js/modules/es.regexp.sticky.js"),require("core-js/modules/es.regexp.to-string.js"),require("core-js/modules/es.string.search.js"),require("core-js/modules/es.string.replace.js"),require("core-js/modules/es.array.concat.js");var replaceUrlParam=function(url,paramName){var paramValue=2<arguments.length&&arguments[2]!==void 0?arguments[2]:"",pattern=new RegExp("\\b(".concat(paramName,"=).*?(&|#|$)"));if(0<=url.search(pattern))return url.replace(pattern,"$1".concat(paramValue,"$2"));var newUrl=url.replace(/[?#]$/,"");return"".concat(newUrl+paramName,"=").concat(paramValue,"&")};exports.replaceUrlParam=replaceUrlParam;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";function _typeof(obj){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}require("core-js/modules/es.symbol.js"),require("core-js/modules/es.symbol.description.js"),require("core-js/modules/es.symbol.iterator.js"),require("core-js/modules/es.array.iterator.js"),require("core-js/modules/es.string.iterator.js"),require("core-js/modules/web.dom-collections.iterator.js"),require("core-js/modules/es.symbol.async-iterator.js"),require("core-js/modules/es.symbol.to-string-tag.js"),require("core-js/modules/es.json.to-string-tag.js"),require("core-js/modules/es.math.to-string-tag.js"),require("core-js/modules/es.object.get-prototype-of.js"),require("core-js/modules/web.dom-collections.for-each.js"),require("core-js/modules/es.function.name.js"),require("core-js/modules/es.object.set-prototype-of.js"),require("core-js/modules/es.array.slice.js"),Object.defineProperty(exports,"__esModule",{value:!0}),exports.setCookie=exports.getCookie=void 0,exports.storeMsisdn=storeMsisdn,require("core-js/modules/es.array.concat.js"),require("core-js/modules/es.regexp.exec.js"),require("core-js/modules/es.string.match.js"),require("core-js/modules/es.object.to-string.js"),require("core-js/modules/es.promise.js"),require("core-js/modules/es.json.stringify.js");function _regeneratorRuntime(){"use strict";function define(obj,key,value){return Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}),obj[key]}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}}}function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}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(void 0===method){if(context.delegate=null,"throw"===context.method){if(delegate.iterator.return&&(context.method="return",context.arg=void 0,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=void 0),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=void 0,next.done=!0,next};return next.next=next}}return{next:doneResult}}function doneResult(){return{value:void 0,done:!0}}_regeneratorRuntime=function(){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";try{define({},"")}catch(err){define=function(obj,key,value){return obj[key]=value}}exports.wrap=wrap;var ContinueSentinel={},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);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=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!skipTempReset)for(var name in this)"t"===name.charAt(0)&&hasOwn.call(this,name)&&!isNaN(+name.slice(1))&&(this[name]=void 0)},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){function handle(loc,caught){return record.type="throw",record.arg=exception,context.next=loc,caught&&(context.method="next",context.arg=void 0),!!caught}if(this.done)throw exception;for(var context=this,i=this.tryEntries.length-1;0<=i;--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(!hasFinally)throw new Error("try statement without catch or finally");if(this.prev<entry.finallyLoc)return handle(entry.finallyLoc)}else if(this.prev<entry.catchLoc)return handle(entry.catchLoc,!0)}}},abrupt:function abrupt(type,arg){for(var entry,i=this.tryEntries.length-1;0<=i;--i)if(entry=this.tryEntries[i],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 entry,i=this.tryEntries.length-1;0<=i;--i)if(entry=this.tryEntries[i],entry.finallyLoc===finallyLoc)return this.complete(entry.completion,entry.afterLoc),resetTryEntry(entry),ContinueSentinel},catch:function _catch(tryLoc){for(var entry,i=this.tryEntries.length-1;0<=i;--i)if(entry=this.tryEntries[i],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=void 0),ContinueSentinel}},exports}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value}catch(error){return void reject(error)}info.done?resolve(value):Promise.resolve(value).then(_next,_throw)}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value)}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err)}var gen=fn.apply(self,args);_next(void 0)})}}var setCookie=function(name,value,daysToExpire){var path=3<arguments.length&&arguments[3]!==void 0?arguments[3]:"/",cookieString="".concat(name,"=").concat(encodeURIComponent(value));if(daysToExpire){var date=new Date;date.setTime(date.getTime()+1e3*(60*(60*(24*daysToExpire)))),cookieString+="; expires=".concat(date.toUTCString())}cookieString+="; path=".concat(path),document.cookie=cookieString};exports.setCookie=setCookie;var getCookie=function(name){var cookieValue=document.cookie.match("(^|;)\\s*".concat(name,"\\s*=\\s*([^;]+)"));return cookieValue?decodeURIComponent(cookieValue.pop()):""};exports.getCookie=getCookie;function storeMsisdn(){return _storeMsisdn.apply(this,arguments)}function _storeMsisdn(){return _storeMsisdn=_asyncToGenerator(_regeneratorRuntime().mark(function _callee(msisdn){var encryptedMsisdn,response;return _regeneratorRuntime().wrap(function _callee$(_context){for(;1;)switch(_context.prev=_context.next){case 0:if("undefined"==typeof window){_context.next=18;break}if(encryptedMsisdn=window.btoa(msisdn),setCookie("_uuid",encryptedMsisdn,365,"/"),localStorage.setItem("_uuid",encryptedMsisdn),window.msisdnCookieUrl){_context.next=6;break}return _context.abrupt("return",{data:{success:!0,message:"MSISDN saved on cookies and localStorage"}});case 6:return _context.prev=6,_context.next=9,fetch(window.msisdnCookieUrl,{mode:"cors",method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({_uuid:encryptedMsisdn})});case 9:return response=_context.sent,_context.abrupt("return",response.json());case 13:return _context.prev=13,_context.t0=_context["catch"](6),_context.abrupt("return",_context.t0.message);case 16:_context.next=19;break;case 18:return _context.abrupt("return","Window object is not available");case 19:case"end":return _context.stop();}},_callee,null,[[6,13]])})),_storeMsisdn.apply(this,arguments)}
|