Comparing version 4.7.2 to 4.8.0-alpha
@@ -9,3 +9,3 @@ import * as React from 'react'; | ||
} | ||
declare const _default: ({ accountId, containerId, environment, environmentId, fields, flowType, frameAncestors, frameHeight, frameWidth, host, inquiryId, language, lockedAttributes, messageTargetOrigin, onCancel, onComplete, onError, onEvent, onLoad, onReady, prefill, refIframe, referenceId, sessionToken, templateId, templateVersionId, themeId, }: InquiryInternalProps) => JSX.Element; | ||
declare const _default: ({ accountId, containerId, environment, sendClientSideCollectedDataInEvents, environmentId, fields, flowType, frameAncestors, frameHeight, frameWidth, host, inquiryId, language, lockedAttributes, messageTargetOrigin, onCancel, onComplete, onError, onEvent, onLoad, onReady, prefill, refIframe, referenceId, sessionToken, templateId, templateVersionId, themeId, }: InquiryInternalProps) => JSX.Element; | ||
export default _default; |
@@ -105,2 +105,48 @@ import { CSSProperties } from 'react'; | ||
}; | ||
export declare type StepType = 'ui' | 'document' | 'government_id' | 'selfie'; | ||
export declare type UiStepFormData = Record<string, string | boolean | number | string[] | Record<string, string | boolean>>; | ||
export interface UiStepCollectedData { | ||
name: string; | ||
type: 'ui'; | ||
data: UiStepFormData; | ||
} | ||
export interface CollectedFile { | ||
filename: string; | ||
fileType: 'application/pdf' | 'image/jpeg' | 'image/png' | string; | ||
dataUrl: string; | ||
captureMethod?: string; | ||
captureFlow?: string; | ||
} | ||
export declare enum GovernmentIdSide { | ||
Front = "front", | ||
Back = "back", | ||
BarcodePdf417 = "barcode_pdf417", | ||
FrontOrBack = "front_or_back", | ||
PassportSignature = "passport_signature" | ||
} | ||
export interface GovernmentIdStepCollectedData { | ||
name: string; | ||
type: 'government_id'; | ||
data: Record<GovernmentIdSide, CollectedFile>; | ||
} | ||
export declare enum SelfieStep { | ||
Center = "center", | ||
Left = "left", | ||
Right = "right" | ||
} | ||
export interface CollectedSelfie { | ||
dataUrl: string; | ||
captureMethod?: string; | ||
} | ||
export interface SelfieStepCollectedData { | ||
name: string; | ||
type: 'selfie'; | ||
data: Record<SelfieStep, CollectedSelfie>; | ||
} | ||
export interface DocumentStepCollectedData { | ||
name: string; | ||
type: 'document'; | ||
data: CollectedFile[]; | ||
} | ||
export declare type ClientSideCollectedData = UiStepCollectedData | GovernmentIdStepCollectedData | SelfieStepCollectedData | DocumentStepCollectedData; | ||
/** | ||
@@ -200,2 +246,10 @@ * Events sent from the persona-web iframe. | ||
/** | ||
* @experimental | ||
* Enables sending data collected on the client side | ||
* in onComplete event. | ||
* | ||
* May be removed in a future version without a deprecation warning. | ||
*/ | ||
sendClientSideCollectedDataInEvents?: boolean; | ||
/** | ||
* Required when resuming inquiries. | ||
@@ -223,6 +277,7 @@ */ | ||
*/ | ||
onComplete?: ({ inquiryId, status, fields, }: { | ||
onComplete?: ({ inquiryId, status, fields, collectedData, }: { | ||
inquiryId: string; | ||
status: string; | ||
fields: Record<string, Field> | InquiryAttributes; | ||
collectedData?: ClientSideCollectedData; | ||
}) => void; | ||
@@ -319,2 +374,3 @@ /** | ||
scopes: undefined; | ||
collectedData?: ClientSideCollectedData; | ||
} | { | ||
@@ -325,2 +381,3 @@ inquiryId: string; | ||
scopes: InquiryAttributes; | ||
collectedData?: ClientSideCollectedData; | ||
}; | ||
@@ -336,2 +393,3 @@ error?: never; | ||
scopes: undefined; | ||
collectedData?: ClientSideCollectedData; | ||
} | { | ||
@@ -342,2 +400,3 @@ inquiryId: string; | ||
scopes: InquiryAttributes; | ||
collectedData?: ClientSideCollectedData; | ||
}; | ||
@@ -344,0 +403,0 @@ error?: never; |
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom"),require("styled-components")):"function"==typeof define&&define.amd?define(["react","react-dom","styled-components"],t):"object"==typeof exports?exports.Persona=t(require("react"),require("react-dom"),require("styled-components")):e.Persona=t(e.react,e["react-dom"],e["styled-components"])}(self,(function(e,t,n){return(()=>{var r={937:(e,t,n)=>{var r=n(158).Symbol;e.exports=r},41:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}},276:e=>{e.exports=function(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}},28:e=>{var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;e.exports=function(e){return e.match(t)||[]}},194:(e,t,n)=>{var r=n(937),o=n(401),i=n(445),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},653:e=>{e.exports=function(e){return function(t){return null==e?void 0:e[t]}}},430:(e,t,n)=>{var r=n(937),o=n(41),i=n(706),a=n(878),l=r?r.prototype:void 0,s=l?l.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(i(t))return o(t,e)+"";if(a(t))return s?s.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},292:(e,t,n)=>{var r=n(276),o=n(567),i=n(973),a=RegExp("['’]","g");e.exports=function(e){return function(t){return r(i(o(t).replace(a,"")),e,"")}}},64:(e,t,n)=>{var r=n(653)({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"});e.exports=r},528:(e,t,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},401:(e,t,n)=>{var r=n(937),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,l=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,l),n=e[l];try{e[l]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[l]=n:delete e[l]),o}},405:e=>{var t=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;e.exports=function(e){return t.test(e)}},445:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},158:(e,t,n)=>{var r=n(528),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},667:e=>{var t="a-z\\xdf-\\xf6\\xf8-\\xff",n="A-Z\\xc0-\\xd6\\xd8-\\xde",r="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",o="["+r+"]",i="\\d+",a="["+t+"]",l="[^\\ud800-\\udfff"+r+i+"\\u2700-\\u27bf"+t+n+"]",s="(?:\\ud83c[\\udde6-\\uddff]){2}",c="[\\ud800-\\udbff][\\udc00-\\udfff]",u="["+n+"]",f="(?:"+a+"|"+l+")",d="(?:"+u+"|"+l+")",p="(?:['’](?:d|ll|m|re|s|t|ve))?",m="(?:['’](?:D|LL|M|RE|S|T|VE))?",h="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",y="[\\ufe0e\\ufe0f]?",g=y+h+"(?:\\u200d(?:"+["[^\\ud800-\\udfff]",s,c].join("|")+")"+y+h+")*",b="(?:"+["[\\u2700-\\u27bf]",s,c].join("|")+")"+g,v=RegExp([u+"?"+a+"+"+p+"(?="+[o,u,"$"].join("|")+")",d+"+"+m+"(?="+[o,u+f,"$"].join("|")+")",u+"?"+f+"+"+p,u+"+"+m,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",i,b].join("|"),"g");e.exports=function(e){return e.match(v)||[]}},567:(e,t,n)=>{var r=n(64),o=n(270),i=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,a=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");e.exports=function(e){return(e=o(e))&&e.replace(i,r).replace(a,"")}},706:e=>{var t=Array.isArray;e.exports=t},288:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},878:(e,t,n)=>{var r=n(194),o=n(288);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},277:(e,t,n)=>{var r=n(292)((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}));e.exports=r},270:(e,t,n)=>{var r=n(430);e.exports=function(e){return null==e?"":r(e)}},973:(e,t,n)=>{var r=n(28),o=n(405),i=n(270),a=n(667);e.exports=function(e,t,n){return e=i(e),void 0===(t=n?void 0:t)?o(e)?a(e):r(e):e.match(t)||[]}},663:e=>{"use strict";var t=String.prototype.replace,n=/%20/g;e.exports={default:"RFC3986",formatters:{RFC1738:function(e){return t.call(e,n,"+")},RFC3986:function(e){return e}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},907:(e,t,n)=>{"use strict";var r=n(38),o=n(186),i=n(663);e.exports={formats:i,parse:o,stringify:r}},186:(e,t,n)=>{"use strict";var r=n(304),o=Object.prototype.hasOwnProperty,i={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:r.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},a=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},l=function(e,t,n){if(e){var r=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,i=/(\[[^[\]]*])/g,a=/(\[[^[\]]*])/.exec(r),l=a?r.slice(0,a.index):r,s=[];if(l){if(!n.plainObjects&&o.call(Object.prototype,l)&&!n.allowPrototypes)return;s.push(l)}for(var c=0;null!==(a=i.exec(r))&&c<n.depth;){if(c+=1,!n.plainObjects&&o.call(Object.prototype,a[1].slice(1,-1))&&!n.allowPrototypes)return;s.push(a[1])}return a&&s.push("["+r.slice(a.index)+"]"),function(e,t,n){for(var r=t,o=e.length-1;o>=0;--o){var i,a=e[o];if("[]"===a&&n.parseArrays)i=[].concat(r);else{i=n.plainObjects?Object.create(null):{};var l="["===a.charAt(0)&&"]"===a.charAt(a.length-1)?a.slice(1,-1):a,s=parseInt(l,10);n.parseArrays||""!==l?!isNaN(s)&&a!==l&&String(s)===l&&s>=0&&n.parseArrays&&s<=n.arrayLimit?(i=[])[s]=r:i[l]=r:i={0:r}}r=i}return r}(s,t,n)}};e.exports=function(e,t){var n=function(e){if(!e)return i;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new Error("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?i.charset:e.charset;return{allowDots:void 0===e.allowDots?i.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:i.allowPrototypes,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:i.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:i.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:i.comma,decoder:"function"==typeof e.decoder?e.decoder:i.decoder,delimiter:"string"==typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:i.delimiter,depth:"number"==typeof e.depth?e.depth:i.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:i.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:i.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:i.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:i.strictNullHandling}}(t);if(""===e||null==e)return n.plainObjects?Object.create(null):{};for(var s="string"==typeof e?function(e,t){var n,l={},s=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,c=t.parameterLimit===1/0?void 0:t.parameterLimit,u=s.split(t.delimiter,c),f=-1,d=t.charset;if(t.charsetSentinel)for(n=0;n<u.length;++n)0===u[n].indexOf("utf8=")&&("utf8=%E2%9C%93"===u[n]?d="utf-8":"utf8=%26%2310003%3B"===u[n]&&(d="iso-8859-1"),f=n,n=u.length);for(n=0;n<u.length;++n)if(n!==f){var p,m,h=u[n],y=h.indexOf("]="),g=-1===y?h.indexOf("="):y+1;-1===g?(p=t.decoder(h,i.decoder,d),m=t.strictNullHandling?null:""):(p=t.decoder(h.slice(0,g),i.decoder,d),m=t.decoder(h.slice(g+1),i.decoder,d)),m&&t.interpretNumericEntities&&"iso-8859-1"===d&&(m=a(m)),m&&t.comma&&m.indexOf(",")>-1&&(m=m.split(",")),o.call(l,p)?l[p]=r.combine(l[p],m):l[p]=m}return l}(e,n):e,c=n.plainObjects?Object.create(null):{},u=Object.keys(s),f=0;f<u.length;++f){var d=u[f],p=l(d,s[d],n);c=r.merge(c,p,n)}return r.compact(c)}},38:(e,t,n)=>{"use strict";var r=n(304),o=n(663),i=Object.prototype.hasOwnProperty,a={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},l=Array.isArray,s=Array.prototype.push,c=function(e,t){s.apply(e,l(t)?t:[t])},u=Date.prototype.toISOString,f={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:r.encode,encodeValuesOnly:!1,formatter:o.formatters[o.default],indices:!1,serializeDate:function(e){return u.call(e)},skipNulls:!1,strictNullHandling:!1},d=function e(t,n,o,i,a,s,u,d,p,m,h,y,g){var b=t;if("function"==typeof u?b=u(n,b):b instanceof Date?b=m(b):"comma"===o&&l(b)&&(b=b.join(",")),null===b){if(i)return s&&!y?s(n,f.encoder,g):n;b=""}if("string"==typeof b||"number"==typeof b||"boolean"==typeof b||r.isBuffer(b))return s?[h(y?n:s(n,f.encoder,g))+"="+h(s(b,f.encoder,g))]:[h(n)+"="+h(String(b))];var v,x=[];if(void 0===b)return x;if(l(u))v=u;else{var w=Object.keys(b);v=d?w.sort(d):w}for(var O=0;O<v.length;++O){var j=v[O];a&&null===b[j]||(l(b)?c(x,e(b[j],"function"==typeof o?o(n,j):n,o,i,a,s,u,d,p,m,h,y,g)):c(x,e(b[j],n+(p?"."+j:"["+j+"]"),o,i,a,s,u,d,p,m,h,y,g)))}return x};e.exports=function(e,t){var n,r=e,s=function(e){if(!e)return f;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||f.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=o.default;if(void 0!==e.format){if(!i.call(o.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var r=o.formatters[n],a=f.filter;return("function"==typeof e.filter||l(e.filter))&&(a=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:f.addQueryPrefix,allowDots:void 0===e.allowDots?f.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:f.charsetSentinel,delimiter:void 0===e.delimiter?f.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:f.encode,encoder:"function"==typeof e.encoder?e.encoder:f.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:f.encodeValuesOnly,filter:a,formatter:r,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:f.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:f.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:f.strictNullHandling}}(t);"function"==typeof s.filter?r=(0,s.filter)("",r):l(s.filter)&&(n=s.filter);var u,p=[];if("object"!=typeof r||null===r)return"";u=t&&t.arrayFormat in a?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var m=a[u];n||(n=Object.keys(r)),s.sort&&n.sort(s.sort);for(var h=0;h<n.length;++h){var y=n[h];s.skipNulls&&null===r[y]||c(p,d(r[y],y,m,s.strictNullHandling,s.skipNulls,s.encode?s.encoder:null,s.filter,s.sort,s.allowDots,s.serializeDate,s.formatter,s.encodeValuesOnly,s.charset))}var g=p.join(s.delimiter),b=!0===s.addQueryPrefix?"?":"";return s.charsetSentinel&&("iso-8859-1"===s.charset?b+="utf8=%26%2310003%3B&":b+="utf8=%E2%9C%93&"),g.length>0?b+g:""}},304:e=>{"use strict";var t=Object.prototype.hasOwnProperty,n=Array.isArray,r=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),o=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r<e.length;++r)void 0!==e[r]&&(n[r]=e[r]);return n};e.exports={arrayToObject:o,assign:function(e,t){return Object.keys(t).reduce((function(e,n){return e[n]=t[n],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],o=0;o<t.length;++o)for(var i=t[o],a=i.obj[i.prop],l=Object.keys(a),s=0;s<l.length;++s){var c=l[s],u=a[c];"object"==typeof u&&null!==u&&-1===r.indexOf(u)&&(t.push({obj:a,prop:c}),r.push(u))}return function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(n(r)){for(var o=[],i=0;i<r.length;++i)void 0!==r[i]&&o.push(r[i]);t.obj[t.prop]=o}}}(t),e},decode:function(e,t,n){var r=e.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(e){return r}},encode:function(e,t,n){if(0===e.length)return e;var o="string"==typeof e?e:String(e);if("iso-8859-1"===n)return escape(o).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var i="",a=0;a<o.length;++a){var l=o.charCodeAt(a);45===l||46===l||95===l||126===l||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122?i+=o.charAt(a):l<128?i+=r[l]:l<2048?i+=r[192|l>>6]+r[128|63&l]:l<55296||l>=57344?i+=r[224|l>>12]+r[128|l>>6&63]+r[128|63&l]:(a+=1,l=65536+((1023&l)<<10|1023&o.charCodeAt(a)),i+=r[240|l>>18]+r[128|l>>12&63]+r[128|l>>6&63]+r[128|63&l])}return i},isBuffer:function(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},merge:function e(r,i,a){if(!i)return r;if("object"!=typeof i){if(n(r))r.push(i);else{if(!r||"object"!=typeof r)return[r,i];(a&&(a.plainObjects||a.allowPrototypes)||!t.call(Object.prototype,i))&&(r[i]=!0)}return r}if(!r||"object"!=typeof r)return[r].concat(i);var l=r;return n(r)&&!n(i)&&(l=o(r,a)),n(r)&&n(i)?(i.forEach((function(n,o){if(t.call(r,o)){var i=r[o];i&&"object"==typeof i&&n&&"object"==typeof n?r[o]=e(i,n,a):r.push(n)}else r[o]=n})),r):Object.keys(i).reduce((function(n,r){var o=i[r];return t.call(n,r)?n[r]=e(n[r],o,a):n[r]=o,n}),l)}}},793:(e,t,n)=>{"use strict";n.d(t,{default:()=>K});var r,o=n(297),i=n(268),a=n(914),l=n.n(a);function s(){return"persona-widget-"+new Array(16).fill(void 0).map((function(){return Math.floor(35*Math.random()).toString(35)})).join("")}!function(e){e.Embedded="embedded",e.Inline="inline"}(r||(r={}));var c=n(907),u=n.n(c);var f,d,p;!function(e){e.Cancel="exit",e.Complete="complete",e.Error="error",e.Fail="fail",e.Load="load",e.Ready="ready",e.Start="start",e.Success="success",e.DocumentCameraSelect="document-camera-select",e.DocumentCameraCapture="document-camera-capture",e.DocumentUpload="document-upload",e.OneTimeLinkSent="one-time-link-sent",e.OneTimeLinkStart="one-time-link-start",e.OneTimeLinkExit="one-time-link-exit",e.SelfieCameraSelect="selfie-camera-select",e.SelfieCameraCapture="selfie-camera-capture",e.SelfieRecordUpload="selfie-record-upload",e.LoadCameraFailed="load-camera-failed",e.InquiryLoad="inquiry-load",e.CountrySelect="country-select",e.VerificationChange="verification-change"}(f||(f={})),function(e){e.Open="open",e.Exit="exit",e.Destroy="destroy"}(d||(d={})),function(e){e.Development="http://localhost:3000",e.Staging="https://withpersona-staging.com",e.Production="https://withpersona.com"}(p||(p={}));var m=n(277),h=n.n(m),y=function(){return(y=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function g(e){return Array.isArray(e)?e.map(g):function(e){return null!=e&&e.constructor===Object}(e)?Object.keys(e).reduce((function(t,n){var r;return y(y({},t),((r={})[h()(n)]=g(e[n]),r))}),{}):e}var b=function(e){return e.split(".").slice(-2).join(".")};const v=function(e){var t,n=e.accountId,r=e.containerId,i=e.environment,a=e.environmentId,l=e.fields,s=e.flowType,c=e.frameAncestors,d=e.frameHeight,m=e.frameWidth,h=e.host,y=e.inquiryId,v=e.language,x=e.lockedAttributes,w=e.messageTargetOrigin,O=e.onCancel,j=e.onComplete,E=e.onError,I=e.onEvent,k=e.onLoad,S=e.onReady,C=e.prefill,A=e.refIframe,L=e.referenceId,P=e.sessionToken,N=e.templateId,D=e.templateVersionId,R=e.themeId,T=!(!N&&!D),q=null==N?void 0:N.startsWith("itmpl_");if(!T&&!y)throw new Error("Either templateId or inquiryId must be specified to start a flow");if(T&&y)throw new Error("Only one of templateId or inquiryId should be specified to start a flow");if(L&&n)throw new Error("Only one of referenceId or accountId should be specified");switch(h){case"development":t=p.Development;break;case"staging":t=p.Staging;break;default:t=p.Production}o.useEffect((function(){window.addEventListener("message",(function(e){var n;if((""===e.origin||b(new URL(e.origin).host)===b(new URL(t).host))&&!(N&&N!==e.data.templateId||D&&D!==e.data.templateVersionId||e.data.containerId&&r!==e.data.containerId))switch(null==I||I(e.data.name,e.data.metadata),e.data.name){case f.Load:null==k||k();break;case f.Ready:null==S||S();break;case f.Complete:case f.Fail:null==j||j({inquiryId:e.data.metadata.inquiryId,status:e.data.metadata.status,fields:null!==(n=e.data.metadata.fields)&&void 0!==n?n:e.data.metadata.scopes});break;case f.Cancel:null==O||O({inquiryId:e.data.metadata.inquiryId,sessionToken:e.data.metadata.sessionToken});break;case f.Error:null==E||E(e.data.error)}}))}),[]);var U=u().stringify({"client-version":"4.7.2","container-id":r,"flow-type":s,"template-id":(q?null:N)||null,"inquiry-template-id":(q?N:null)||null,"inquiry-template-version-id":D||null,environment:i,"environment-id":a,"iframe-origin":window.location.origin,"frame-ancestors":null!=c?c:null,"message-target-origin":w||null,"inquiry-id":y||null,language:v,"session-token":P,"reference-id":L,"account-id":n,fields:g(null!=l?l:{}),"theme-id":R,prefill:g(null!=C?C:{}),"locked-attributes":g(null!=x?x:{})},{addQueryPrefix:!0,skipNulls:!0});return o.createElement("iframe",{style:{maxHeight:d,maxWidth:m},className:"persona-widget__iframe",allow:"camera",sandbox:"allow-same-origin allow-scripts allow-forms allow-popups allow-modals allow-top-navigation-by-user-activation",frameBorder:"0",ref:A,src:t+"/widget"+U,onLoad:function(){}})};var x=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},w=(0,a.keyframes)(E||(E=x(["\n from {\n transform: translate(-50%,-50%) rotate(0deg);\n }\n to {\n transform: translate(-50%,-50%) rotate(360deg);\n }\n"],["\n from {\n transform: translate(-50%,-50%) rotate(0deg);\n }\n to {\n transform: translate(-50%,-50%) rotate(360deg);\n }\n"]))),O=l()("svg")(I||(I=x(["\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n animation: "," 5s linear infinite;\n"],["\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n animation: "," 5s linear infinite;\n"])),w);const j=function(){return o.createElement(O,{xmlns:"http://www.w3.org/2000/svg",width:"114",height:"114"},o.createElement("path",{fill:"none",stroke:"#0F2B72",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M25.887 10.432a56.275 56.275 0 0 0-15.455 15.455 55.86 55.86 0 0 0-5.183 9.678A55.576 55.576 0 0 0 2.066 46.07m-.8 5.438A56.678 56.678 0 0 0 1 57m4.249 21.435a55.86 55.86 0 0 0 5.183 9.678 56.275 56.275 0 0 0 6.97 8.485m8.485 6.97a55.86 55.86 0 0 0 9.678 5.183 55.576 55.576 0 0 0 10.506 3.183c3.535.7 7.19 1.066 10.929 1.066 3.74 0 7.394-.367 10.929-1.066a55.576 55.576 0 0 0 10.506-3.183 55.86 55.86 0 0 0 9.678-5.183 56.275 56.275 0 0 0 15.455-15.455 55.86 55.86 0 0 0 5.183-9.678 55.576 55.576 0 0 0 3.183-10.506A56.274 56.274 0 0 0 113 57c0-3.74-.367-7.394-1.066-10.929a55.576 55.576 0 0 0-3.183-10.506M96.598 17.402a56.275 56.275 0 0 0-8.485-6.97 55.86 55.86 0 0 0-9.678-5.183A55.576 55.576 0 0 0 67.93 2.066 56.274 56.274 0 0 0 57 1c-3.74 0-7.394.367-10.929 1.066m-34.94 30.418A51.76 51.76 0 0 0 7.225 41.9a51.633 51.633 0 0 0-1.98 10 52.63 52.63 0 0 0 .744 15.247 51.633 51.633 0 0 0 7.768 18.743 52.188 52.188 0 0 0 10.254 11.308 52.188 52.188 0 0 0 8.472 5.67m9.417 3.905a51.633 51.633 0 0 0 10 1.98 52.63 52.63 0 0 0 10.197 0 51.939 51.939 0 0 0 10-1.98 51.61 51.61 0 0 0 9.418-3.904 51.984 51.984 0 0 0 8.472-5.671m3.782-3.43a52.308 52.308 0 0 0 3.429-3.78m9.575-17.89a51.633 51.633 0 0 0 1.98-10 52.63 52.63 0 0 0-.744-15.247 51.633 51.633 0 0 0-7.768-18.743 52.188 52.188 0 0 0-10.254-11.308m-4.097-3.043a51.984 51.984 0 0 0-4.375-2.628M67.148 5.99a51.939 51.939 0 0 0-5.05-.743 52.63 52.63 0 0 0-15.246.743 51.633 51.633 0 0 0-18.743 7.768M24.012 16.8a52.308 52.308 0 0 0-3.782 3.43"}))};var E,I,k=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},S=((0,a.keyframes)(A||(A=k(["\n from {\n transform: translate(-50%,-50%) rotate(0deg);\n }\n to {\n transform: translate(-50%,-50%) rotate(360deg);\n }\n"],["\n from {\n transform: translate(-50%,-50%) rotate(0deg);\n }\n to {\n transform: translate(-50%,-50%) rotate(360deg);\n }\n"]))),l()("div")(L||(L=k(["\n position: relative;\n width: 120px;\n height: 120px;\n"],["\n position: relative;\n width: 120px;\n height: 120px;\n"]))));const C=function(){return o.createElement(S,null,o.createElement(j,null))};var A,L,P=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},N=function(){return(N=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},D=(0,a.keyframes)(F||(F=P(["\n from {\n background-color: rgba(0, 0, 0, 0);\n opacity: 0;\n }\n to {\n background-color: rgba(0, 0, 0, ",");\n opacity: 1;\n }\n"],["\n from {\n background-color: rgba(0, 0, 0, 0);\n opacity: 0;\n }\n to {\n background-color: rgba(0, 0, 0, ",");\n opacity: 1;\n }\n"])),.7),R=l()("div")(M||(M=P(["\n animation: "," 0.3s;\n background-color: rgba(0, 0, 0, ",");\n display: ",";\n\n position: fixed;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n z-index: 9999;\n"],["\n animation: "," 0.3s;\n background-color: rgba(0, 0, 0, ",");\n display: ",";\n\n position: fixed;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n z-index: 9999;\n"])),D,.7,(function(e){return e.isOpen?"block":"none"})),T=l()("div")(Q||(Q=P(["\n width: 120px;\n height: 120px;\n position: absolute;\n left: calc(50% - 60px);\n top: calc(50% - 60px);\n z-index: 9999;\n"],["\n width: 120px;\n height: 120px;\n position: absolute;\n left: calc(50% - 60px);\n top: calc(50% - 60px);\n z-index: 9999;\n"]))),q=(0,a.keyframes)(V||(V=P(["\n from {\n transform: translate(-50%, -40%) scale(.8);\n }\n 90% {\n transform: translate(-50%, -51%) scale(1.01);\n }\n to {\n transform: translate(-50%, -50%);\n }\n"],["\n from {\n transform: translate(-50%, -40%) scale(.8);\n }\n 90% {\n transform: translate(-50%, -51%) scale(1.01);\n }\n to {\n transform: translate(-50%, -50%);\n }\n"]))),U=(0,a.keyframes)(W||(W=P(["\n from {\n transform: translate(-50%, -55%);\n }\n to {\n transform: translate(-50%, -50%);\n }\n"],["\n from {\n transform: translate(-50%, -55%);\n }\n to {\n transform: translate(-50%, -50%);\n }\n"]))),z=l()("div")(Z||(Z=P(["\n iframe {\n animation: "," 0.3s, "," ease-out 0.3s;\n\n width: 100%;\n height: 100%;\n\n margin-left: auto;\n margin-right: auto;\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n\n background-color: #ffffff;\n border: none;\n border-radius: 4px;\n box-shadow: 0px 12px 40px 2px rgba(0, 0, 0, 0.4);\n\n @media only screen and (min-width: 600.02px) and (min-height: 600.02px) {\n max-width: 400px;\n max-height: 650px;\n }\n }\n"],["\n iframe {\n animation: "," 0.3s, "," ease-out 0.3s;\n\n width: 100%;\n height: 100%;\n\n margin-left: auto;\n margin-right: auto;\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n\n background-color: #ffffff;\n border: none;\n border-radius: 4px;\n box-shadow: 0px 12px 40px 2px rgba(0, 0, 0, 0.4);\n\n @media only screen and (min-width: 600.02px) and (min-height: 600.02px) {\n max-width: 400px;\n max-height: 650px;\n }\n }\n"])),q,U),_=(0,a.createGlobalStyle)(B||(B=P(["\n // Don't allow scrolling when widget is open\n html body {\n overflow: hidden !important;\n }\n\n // When the widget takes the full screen, hide everything else to prevent iOS scroll issues.\n @media "," {\n html body > *:not(#",") {\n display: none !important;\n }\n }\n"],["\n // Don't allow scrolling when widget is open\n html body {\n overflow: hidden !important;\n }\n\n // When the widget takes the full screen, hide everything else to prevent iOS scroll issues.\n @media "," {\n html body > *:not(#",") {\n display: none !important;\n }\n }\n"])),"(max-width: 600px), (max-height: 420px)",(function(e){return e.containerId}));const H=function(e){return o.createElement(R,{isOpen:e.isOpen,className:"persona-widget__overlay"},e.isLoading&&o.createElement(T,null,o.createElement(C,null)),o.createElement(z,null,o.createElement(v,N({},e,{flowType:r.Embedded}))),e.isOpen&&o.createElement(_,{containerId:e.containerId}))};var F,M,Q,V,W,Z,B;const G=function(){function e(){}return e.log=function(e,t){void 0===t&&(t="info")},e}();var Y=function(){return(Y=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},$=function(){function e(e){var t,n,r=this;this._isLoading=!0,this._isOpen=!1,this.onLoad=function(){var e,t;r._isLoading=!1,r.render(),null===(t=(e=r.options).onLoad)||void 0===t||t.call(e)},this.onReady=function(){var e,t;null===(t=(e=r.options).onReady)||void 0===t||t.call(e)},this.onComplete=function(e){var t,n,o=e.inquiryId,i=e.status,a=e.fields;r._isOpen=!1,r.render(),null===(n=(t=r.options).onComplete)||void 0===n||n.call(t,{inquiryId:o,status:i,fields:a})},this.onCancel=function(e){var t,n,o=e.inquiryId,i=e.sessionToken;r._isOpen=!1,r.render(),null===(n=(t=r.options).onCancel)||void 0===n||n.call(t,{inquiryId:o,sessionToken:i})},this.options=e,this.refIframe=o.createRef(),this.container=document.createElement("div"),this.containerId=s(),this.container.setAttribute("id",this.containerId),this.containerParent=null!==(n=null!==(t=e.parent)&&void 0!==t?t:document.body)&&void 0!==n?n:document.children[0],this.containerParent.appendChild(this.container),this.render()}return e.prototype.render=function(){if(null!=this.container)try{i.render(o.createElement(H,Y({isLoading:this._isLoading,isOpen:this._isOpen,containerId:this.containerId,refIframe:this.refIframe},this.options,{onLoad:this.onLoad,onReady:this.onReady,onComplete:this.onComplete,onCancel:this.onCancel,onEvent:this.options.onEvent})),this.container)}catch(e){throw this.destroy(),e}else G.log("Cannot render client that has been destroyed","error")},e.prototype.open=function(){var e,t;null===(t=null===(e=this.refIframe.current)||void 0===e?void 0:e.contentWindow)||void 0===t||t.postMessage({action:d.Open,metadata:{}},this.baseUrl),this._isOpen=!0,this.render()},e.prototype.cancel=function(e){var t,n;null===(n=null===(t=this.refIframe.current)||void 0===t?void 0:t.contentWindow)||void 0===n||n.postMessage({action:d.Exit,metadata:{force:e}},this.baseUrl),this.render()},e.prototype.destroy=function(){var e,t;null===(t=null===(e=this.refIframe.current)||void 0===e?void 0:e.contentWindow)||void 0===t||t.postMessage({action:d.Destroy,metadata:{}},this.baseUrl),i.unmountComponentAtNode(this.container),this.containerParent.removeChild(this.container)},Object.defineProperty(e.prototype,"isLoading",{get:function(){return this._isLoading},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"baseUrl",{get:function(){switch(this.options.host){case"development":return p.Development;case"staging":return p.Staging;default:return p.Production}},enumerable:!1,configurable:!0}),e}(),J=function(){return(J=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};const K={Client:$,Inquiry:function(e){var t=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}(o.useState(s()),2),n=t[0];return t[1],o.createElement(v,J({},e,{containerId:n,flowType:r.Inline}))}}},297:t=>{"use strict";t.exports=e},268:e=>{"use strict";e.exports=t},914:e=>{"use strict";e.exports=n}},o={};function i(e){if(o[e])return o[e].exports;var t=o[e]={exports:{}};return r[e](t,t.exports,i),t.exports}return i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i(793)})().default})); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom"),require("styled-components")):"function"==typeof define&&define.amd?define(["react","react-dom","styled-components"],t):"object"==typeof exports?exports.Persona=t(require("react"),require("react-dom"),require("styled-components")):e.Persona=t(e.react,e["react-dom"],e["styled-components"])}(self,(function(e,t,n){return(()=>{var r={937:(e,t,n)=>{var r=n(158).Symbol;e.exports=r},41:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}},276:e=>{e.exports=function(e,t,n,r){var o=-1,a=null==e?0:e.length;for(r&&a&&(n=e[++o]);++o<a;)n=t(n,e[o],o,e);return n}},28:e=>{var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;e.exports=function(e){return e.match(t)||[]}},194:(e,t,n)=>{var r=n(937),o=n(401),a=n(445),i=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":i&&i in Object(e)?o(e):a(e)}},653:e=>{e.exports=function(e){return function(t){return null==e?void 0:e[t]}}},430:(e,t,n)=>{var r=n(937),o=n(41),a=n(706),i=n(878),l=r?r.prototype:void 0,s=l?l.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(a(t))return o(t,e)+"";if(i(t))return s?s.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},292:(e,t,n)=>{var r=n(276),o=n(567),a=n(973),i=RegExp("['’]","g");e.exports=function(e){return function(t){return r(a(o(t).replace(i,"")),e,"")}}},64:(e,t,n)=>{var r=n(653)({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"});e.exports=r},528:(e,t,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},401:(e,t,n)=>{var r=n(937),o=Object.prototype,a=o.hasOwnProperty,i=o.toString,l=r?r.toStringTag:void 0;e.exports=function(e){var t=a.call(e,l),n=e[l];try{e[l]=void 0;var r=!0}catch(e){}var o=i.call(e);return r&&(t?e[l]=n:delete e[l]),o}},405:e=>{var t=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;e.exports=function(e){return t.test(e)}},445:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},158:(e,t,n)=>{var r=n(528),o="object"==typeof self&&self&&self.Object===Object&&self,a=r||o||Function("return this")();e.exports=a},667:e=>{var t="a-z\\xdf-\\xf6\\xf8-\\xff",n="A-Z\\xc0-\\xd6\\xd8-\\xde",r="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",o="["+r+"]",a="\\d+",i="["+t+"]",l="[^\\ud800-\\udfff"+r+a+"\\u2700-\\u27bf"+t+n+"]",s="(?:\\ud83c[\\udde6-\\uddff]){2}",c="[\\ud800-\\udbff][\\udc00-\\udfff]",u="["+n+"]",f="(?:"+i+"|"+l+")",d="(?:"+u+"|"+l+")",p="(?:['’](?:d|ll|m|re|s|t|ve))?",m="(?:['’](?:D|LL|M|RE|S|T|VE))?",h="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",y="[\\ufe0e\\ufe0f]?",g=y+h+"(?:\\u200d(?:"+["[^\\ud800-\\udfff]",s,c].join("|")+")"+y+h+")*",b="(?:"+["[\\u2700-\\u27bf]",s,c].join("|")+")"+g,v=RegExp([u+"?"+i+"+"+p+"(?="+[o,u,"$"].join("|")+")",d+"+"+m+"(?="+[o,u+f,"$"].join("|")+")",u+"?"+f+"+"+p,u+"+"+m,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",a,b].join("|"),"g");e.exports=function(e){return e.match(v)||[]}},567:(e,t,n)=>{var r=n(64),o=n(270),a=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,i=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");e.exports=function(e){return(e=o(e))&&e.replace(a,r).replace(i,"")}},706:e=>{var t=Array.isArray;e.exports=t},288:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},878:(e,t,n)=>{var r=n(194),o=n(288);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},277:(e,t,n)=>{var r=n(292)((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}));e.exports=r},270:(e,t,n)=>{var r=n(430);e.exports=function(e){return null==e?"":r(e)}},973:(e,t,n)=>{var r=n(28),o=n(405),a=n(270),i=n(667);e.exports=function(e,t,n){return e=a(e),void 0===(t=n?void 0:t)?o(e)?i(e):r(e):e.match(t)||[]}},663:e=>{"use strict";var t=String.prototype.replace,n=/%20/g;e.exports={default:"RFC3986",formatters:{RFC1738:function(e){return t.call(e,n,"+")},RFC3986:function(e){return e}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},907:(e,t,n)=>{"use strict";var r=n(38),o=n(186),a=n(663);e.exports={formats:a,parse:o,stringify:r}},186:(e,t,n)=>{"use strict";var r=n(304),o=Object.prototype.hasOwnProperty,a={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:r.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},i=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},l=function(e,t,n){if(e){var r=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,i=/(\[[^[\]]*])/.exec(r),l=i?r.slice(0,i.index):r,s=[];if(l){if(!n.plainObjects&&o.call(Object.prototype,l)&&!n.allowPrototypes)return;s.push(l)}for(var c=0;null!==(i=a.exec(r))&&c<n.depth;){if(c+=1,!n.plainObjects&&o.call(Object.prototype,i[1].slice(1,-1))&&!n.allowPrototypes)return;s.push(i[1])}return i&&s.push("["+r.slice(i.index)+"]"),function(e,t,n){for(var r=t,o=e.length-1;o>=0;--o){var a,i=e[o];if("[]"===i&&n.parseArrays)a=[].concat(r);else{a=n.plainObjects?Object.create(null):{};var l="["===i.charAt(0)&&"]"===i.charAt(i.length-1)?i.slice(1,-1):i,s=parseInt(l,10);n.parseArrays||""!==l?!isNaN(s)&&i!==l&&String(s)===l&&s>=0&&n.parseArrays&&s<=n.arrayLimit?(a=[])[s]=r:a[l]=r:a={0:r}}r=a}return r}(s,t,n)}};e.exports=function(e,t){var n=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new Error("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?a.charset:e.charset;return{allowDots:void 0===e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:a.comma,decoder:"function"==typeof e.decoder?e.decoder:a.decoder,delimiter:"string"==typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"==typeof e.depth?e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null==e)return n.plainObjects?Object.create(null):{};for(var s="string"==typeof e?function(e,t){var n,l={},s=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,c=t.parameterLimit===1/0?void 0:t.parameterLimit,u=s.split(t.delimiter,c),f=-1,d=t.charset;if(t.charsetSentinel)for(n=0;n<u.length;++n)0===u[n].indexOf("utf8=")&&("utf8=%E2%9C%93"===u[n]?d="utf-8":"utf8=%26%2310003%3B"===u[n]&&(d="iso-8859-1"),f=n,n=u.length);for(n=0;n<u.length;++n)if(n!==f){var p,m,h=u[n],y=h.indexOf("]="),g=-1===y?h.indexOf("="):y+1;-1===g?(p=t.decoder(h,a.decoder,d),m=t.strictNullHandling?null:""):(p=t.decoder(h.slice(0,g),a.decoder,d),m=t.decoder(h.slice(g+1),a.decoder,d)),m&&t.interpretNumericEntities&&"iso-8859-1"===d&&(m=i(m)),m&&t.comma&&m.indexOf(",")>-1&&(m=m.split(",")),o.call(l,p)?l[p]=r.combine(l[p],m):l[p]=m}return l}(e,n):e,c=n.plainObjects?Object.create(null):{},u=Object.keys(s),f=0;f<u.length;++f){var d=u[f],p=l(d,s[d],n);c=r.merge(c,p,n)}return r.compact(c)}},38:(e,t,n)=>{"use strict";var r=n(304),o=n(663),a=Object.prototype.hasOwnProperty,i={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},l=Array.isArray,s=Array.prototype.push,c=function(e,t){s.apply(e,l(t)?t:[t])},u=Date.prototype.toISOString,f={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:r.encode,encodeValuesOnly:!1,formatter:o.formatters[o.default],indices:!1,serializeDate:function(e){return u.call(e)},skipNulls:!1,strictNullHandling:!1},d=function e(t,n,o,a,i,s,u,d,p,m,h,y,g){var b=t;if("function"==typeof u?b=u(n,b):b instanceof Date?b=m(b):"comma"===o&&l(b)&&(b=b.join(",")),null===b){if(a)return s&&!y?s(n,f.encoder,g):n;b=""}if("string"==typeof b||"number"==typeof b||"boolean"==typeof b||r.isBuffer(b))return s?[h(y?n:s(n,f.encoder,g))+"="+h(s(b,f.encoder,g))]:[h(n)+"="+h(String(b))];var v,x=[];if(void 0===b)return x;if(l(u))v=u;else{var w=Object.keys(b);v=d?w.sort(d):w}for(var O=0;O<v.length;++O){var j=v[O];i&&null===b[j]||(l(b)?c(x,e(b[j],"function"==typeof o?o(n,j):n,o,a,i,s,u,d,p,m,h,y,g)):c(x,e(b[j],n+(p?"."+j:"["+j+"]"),o,a,i,s,u,d,p,m,h,y,g)))}return x};e.exports=function(e,t){var n,r=e,s=function(e){if(!e)return f;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||f.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=o.default;if(void 0!==e.format){if(!a.call(o.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var r=o.formatters[n],i=f.filter;return("function"==typeof e.filter||l(e.filter))&&(i=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:f.addQueryPrefix,allowDots:void 0===e.allowDots?f.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:f.charsetSentinel,delimiter:void 0===e.delimiter?f.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:f.encode,encoder:"function"==typeof e.encoder?e.encoder:f.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:f.encodeValuesOnly,filter:i,formatter:r,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:f.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:f.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:f.strictNullHandling}}(t);"function"==typeof s.filter?r=(0,s.filter)("",r):l(s.filter)&&(n=s.filter);var u,p=[];if("object"!=typeof r||null===r)return"";u=t&&t.arrayFormat in i?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var m=i[u];n||(n=Object.keys(r)),s.sort&&n.sort(s.sort);for(var h=0;h<n.length;++h){var y=n[h];s.skipNulls&&null===r[y]||c(p,d(r[y],y,m,s.strictNullHandling,s.skipNulls,s.encode?s.encoder:null,s.filter,s.sort,s.allowDots,s.serializeDate,s.formatter,s.encodeValuesOnly,s.charset))}var g=p.join(s.delimiter),b=!0===s.addQueryPrefix?"?":"";return s.charsetSentinel&&("iso-8859-1"===s.charset?b+="utf8=%26%2310003%3B&":b+="utf8=%E2%9C%93&"),g.length>0?b+g:""}},304:e=>{"use strict";var t=Object.prototype.hasOwnProperty,n=Array.isArray,r=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),o=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r<e.length;++r)void 0!==e[r]&&(n[r]=e[r]);return n};e.exports={arrayToObject:o,assign:function(e,t){return Object.keys(t).reduce((function(e,n){return e[n]=t[n],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],o=0;o<t.length;++o)for(var a=t[o],i=a.obj[a.prop],l=Object.keys(i),s=0;s<l.length;++s){var c=l[s],u=i[c];"object"==typeof u&&null!==u&&-1===r.indexOf(u)&&(t.push({obj:i,prop:c}),r.push(u))}return function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(n(r)){for(var o=[],a=0;a<r.length;++a)void 0!==r[a]&&o.push(r[a]);t.obj[t.prop]=o}}}(t),e},decode:function(e,t,n){var r=e.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(e){return r}},encode:function(e,t,n){if(0===e.length)return e;var o="string"==typeof e?e:String(e);if("iso-8859-1"===n)return escape(o).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var a="",i=0;i<o.length;++i){var l=o.charCodeAt(i);45===l||46===l||95===l||126===l||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122?a+=o.charAt(i):l<128?a+=r[l]:l<2048?a+=r[192|l>>6]+r[128|63&l]:l<55296||l>=57344?a+=r[224|l>>12]+r[128|l>>6&63]+r[128|63&l]:(i+=1,l=65536+((1023&l)<<10|1023&o.charCodeAt(i)),a+=r[240|l>>18]+r[128|l>>12&63]+r[128|l>>6&63]+r[128|63&l])}return a},isBuffer:function(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},merge:function e(r,a,i){if(!a)return r;if("object"!=typeof a){if(n(r))r.push(a);else{if(!r||"object"!=typeof r)return[r,a];(i&&(i.plainObjects||i.allowPrototypes)||!t.call(Object.prototype,a))&&(r[a]=!0)}return r}if(!r||"object"!=typeof r)return[r].concat(a);var l=r;return n(r)&&!n(a)&&(l=o(r,i)),n(r)&&n(a)?(a.forEach((function(n,o){if(t.call(r,o)){var a=r[o];a&&"object"==typeof a&&n&&"object"==typeof n?r[o]=e(a,n,i):r.push(n)}else r[o]=n})),r):Object.keys(a).reduce((function(n,r){var o=a[r];return t.call(n,r)?n[r]=e(n[r],o,i):n[r]=o,n}),l)}}},793:(e,t,n)=>{"use strict";n.d(t,{default:()=>ee});var r,o=n(297),a=n(268),i=n(914),l=n.n(i);function s(){return"persona-widget-"+new Array(16).fill(void 0).map((function(){return Math.floor(35*Math.random()).toString(35)})).join("")}!function(e){e.Embedded="embedded",e.Inline="inline"}(r||(r={}));var c=n(907),u=n.n(c);var f,d,p,m,h;!function(e){e.Front="front",e.Back="back",e.BarcodePdf417="barcode_pdf417",e.FrontOrBack="front_or_back",e.PassportSignature="passport_signature"}(f||(f={})),function(e){e.Center="center",e.Left="left",e.Right="right"}(d||(d={})),function(e){e.Cancel="exit",e.Complete="complete",e.Error="error",e.Fail="fail",e.Load="load",e.Ready="ready",e.Start="start",e.Success="success",e.DocumentCameraSelect="document-camera-select",e.DocumentCameraCapture="document-camera-capture",e.DocumentUpload="document-upload",e.OneTimeLinkSent="one-time-link-sent",e.OneTimeLinkStart="one-time-link-start",e.OneTimeLinkExit="one-time-link-exit",e.SelfieCameraSelect="selfie-camera-select",e.SelfieCameraCapture="selfie-camera-capture",e.SelfieRecordUpload="selfie-record-upload",e.LoadCameraFailed="load-camera-failed",e.InquiryLoad="inquiry-load",e.CountrySelect="country-select",e.VerificationChange="verification-change"}(p||(p={})),function(e){e.Open="open",e.Exit="exit",e.Destroy="destroy"}(m||(m={})),function(e){e.Development="http://localhost:3000",e.Staging="https://withpersona-staging.com",e.Production="https://withpersona.com"}(h||(h={}));var y=n(277),g=n.n(y),b=function(){return(b=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function v(e){return Array.isArray(e)?e.map(v):function(e){return null!=e&&e.constructor===Object}(e)?Object.keys(e).reduce((function(t,n){var r;return b(b({},t),((r={})[g()(n)]=v(e[n]),r))}),{}):e}var x=function(e){return e.split(".").slice(-2).join(".")};const w=function(e){var t,n=e.accountId,r=e.containerId,a=e.environment,i=e.sendClientSideCollectedDataInEvents,l=e.environmentId,s=e.fields,c=e.flowType,f=e.frameAncestors,d=e.frameHeight,m=e.frameWidth,y=e.host,g=e.inquiryId,b=e.language,w=e.lockedAttributes,O=e.messageTargetOrigin,j=e.onCancel,E=e.onComplete,k=e.onError,I=e.onEvent,S=e.onLoad,C=e.onReady,A=e.prefill,P=e.refIframe,L=e.referenceId,D=e.sessionToken,N=e.templateId,R=e.templateVersionId,T=e.themeId,q=!(!N&&!R),_=null==N?void 0:N.startsWith("itmpl_");if(!q&&!g)throw new Error("Either templateId or inquiryId must be specified to start a flow");if(q&&g)throw new Error("Only one of templateId or inquiryId should be specified to start a flow");if(L&&n)throw new Error("Only one of referenceId or accountId should be specified");switch(y){case"development":t=h.Development;break;case"staging":t=h.Staging;break;default:t=h.Production}o.useEffect((function(){window.addEventListener("message",(function(e){var n;if((""===e.origin||x(new URL(e.origin).host)===x(new URL(t).host))&&!(N&&N!==e.data.templateId||R&&R!==e.data.templateVersionId||e.data.containerId&&r!==e.data.containerId))switch(null==I||I(e.data.name,e.data.metadata),e.data.name){case p.Load:null==S||S();break;case p.Ready:null==C||C();break;case p.Complete:case p.Fail:null==E||E({inquiryId:e.data.metadata.inquiryId,status:e.data.metadata.status,fields:null!==(n=e.data.metadata.fields)&&void 0!==n?n:e.data.metadata.scopes,collectedData:e.data.metadata.collectedData});break;case p.Cancel:null==j||j({inquiryId:e.data.metadata.inquiryId,sessionToken:e.data.metadata.sessionToken});break;case p.Error:null==k||k(e.data.error)}}))}),[]);var U=u().stringify({"client-version":"4.8.0-alpha","container-id":r,"flow-type":c,"template-id":(_?null:N)||null,"inquiry-template-id":(_?N:null)||null,"inquiry-template-version-id":R||null,environment:a,"environment-id":l,"iframe-origin":window.location.origin,"frame-ancestors":null!=f?f:null,"message-target-origin":O||null,"inquiry-id":g||null,language:b,"session-token":D,"reference-id":L,"account-id":n,fields:v(null!=s?s:{}),"send-client-side-collected-data-in-events":i,"theme-id":T,prefill:v(null!=A?A:{}),"locked-attributes":v(null!=w?w:{})},{addQueryPrefix:!0,skipNulls:!0});return o.createElement("iframe",{style:{maxHeight:d,maxWidth:m},className:"persona-widget__iframe",allow:"camera",sandbox:"allow-same-origin allow-scripts allow-forms allow-popups allow-modals allow-top-navigation-by-user-activation",frameBorder:"0",ref:P,src:t+"/widget"+U,onLoad:function(){}})};var O=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},j=(0,i.keyframes)(I||(I=O(["\n from {\n transform: translate(-50%,-50%) rotate(0deg);\n }\n to {\n transform: translate(-50%,-50%) rotate(360deg);\n }\n"],["\n from {\n transform: translate(-50%,-50%) rotate(0deg);\n }\n to {\n transform: translate(-50%,-50%) rotate(360deg);\n }\n"]))),E=l()("svg")(S||(S=O(["\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n animation: "," 5s linear infinite;\n"],["\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n animation: "," 5s linear infinite;\n"])),j);const k=function(){return o.createElement(E,{xmlns:"http://www.w3.org/2000/svg",width:"114",height:"114"},o.createElement("path",{fill:"none",stroke:"#0F2B72",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M25.887 10.432a56.275 56.275 0 0 0-15.455 15.455 55.86 55.86 0 0 0-5.183 9.678A55.576 55.576 0 0 0 2.066 46.07m-.8 5.438A56.678 56.678 0 0 0 1 57m4.249 21.435a55.86 55.86 0 0 0 5.183 9.678 56.275 56.275 0 0 0 6.97 8.485m8.485 6.97a55.86 55.86 0 0 0 9.678 5.183 55.576 55.576 0 0 0 10.506 3.183c3.535.7 7.19 1.066 10.929 1.066 3.74 0 7.394-.367 10.929-1.066a55.576 55.576 0 0 0 10.506-3.183 55.86 55.86 0 0 0 9.678-5.183 56.275 56.275 0 0 0 15.455-15.455 55.86 55.86 0 0 0 5.183-9.678 55.576 55.576 0 0 0 3.183-10.506A56.274 56.274 0 0 0 113 57c0-3.74-.367-7.394-1.066-10.929a55.576 55.576 0 0 0-3.183-10.506M96.598 17.402a56.275 56.275 0 0 0-8.485-6.97 55.86 55.86 0 0 0-9.678-5.183A55.576 55.576 0 0 0 67.93 2.066 56.274 56.274 0 0 0 57 1c-3.74 0-7.394.367-10.929 1.066m-34.94 30.418A51.76 51.76 0 0 0 7.225 41.9a51.633 51.633 0 0 0-1.98 10 52.63 52.63 0 0 0 .744 15.247 51.633 51.633 0 0 0 7.768 18.743 52.188 52.188 0 0 0 10.254 11.308 52.188 52.188 0 0 0 8.472 5.67m9.417 3.905a51.633 51.633 0 0 0 10 1.98 52.63 52.63 0 0 0 10.197 0 51.939 51.939 0 0 0 10-1.98 51.61 51.61 0 0 0 9.418-3.904 51.984 51.984 0 0 0 8.472-5.671m3.782-3.43a52.308 52.308 0 0 0 3.429-3.78m9.575-17.89a51.633 51.633 0 0 0 1.98-10 52.63 52.63 0 0 0-.744-15.247 51.633 51.633 0 0 0-7.768-18.743 52.188 52.188 0 0 0-10.254-11.308m-4.097-3.043a51.984 51.984 0 0 0-4.375-2.628M67.148 5.99a51.939 51.939 0 0 0-5.05-.743 52.63 52.63 0 0 0-15.246.743 51.633 51.633 0 0 0-18.743 7.768M24.012 16.8a52.308 52.308 0 0 0-3.782 3.43"}))};var I,S,C=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},A=((0,i.keyframes)(L||(L=C(["\n from {\n transform: translate(-50%,-50%) rotate(0deg);\n }\n to {\n transform: translate(-50%,-50%) rotate(360deg);\n }\n"],["\n from {\n transform: translate(-50%,-50%) rotate(0deg);\n }\n to {\n transform: translate(-50%,-50%) rotate(360deg);\n }\n"]))),l()("div")(D||(D=C(["\n position: relative;\n width: 120px;\n height: 120px;\n"],["\n position: relative;\n width: 120px;\n height: 120px;\n"]))));const P=function(){return o.createElement(A,null,o.createElement(k,null))};var L,D,N=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},R=function(){return(R=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},T=(0,i.keyframes)(M||(M=N(["\n from {\n background-color: rgba(0, 0, 0, 0);\n opacity: 0;\n }\n to {\n background-color: rgba(0, 0, 0, ",");\n opacity: 1;\n }\n"],["\n from {\n background-color: rgba(0, 0, 0, 0);\n opacity: 0;\n }\n to {\n background-color: rgba(0, 0, 0, ",");\n opacity: 1;\n }\n"])),.7),q=l()("div")(Q||(Q=N(["\n animation: "," 0.3s;\n background-color: rgba(0, 0, 0, ",");\n display: ",";\n\n position: fixed;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n z-index: 9999;\n"],["\n animation: "," 0.3s;\n background-color: rgba(0, 0, 0, ",");\n display: ",";\n\n position: fixed;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n z-index: 9999;\n"])),T,.7,(function(e){return e.isOpen?"block":"none"})),_=l()("div")(V||(V=N(["\n width: 120px;\n height: 120px;\n position: absolute;\n left: calc(50% - 60px);\n top: calc(50% - 60px);\n z-index: 9999;\n"],["\n width: 120px;\n height: 120px;\n position: absolute;\n left: calc(50% - 60px);\n top: calc(50% - 60px);\n z-index: 9999;\n"]))),U=(0,i.keyframes)(W||(W=N(["\n from {\n transform: translate(-50%, -40%) scale(.8);\n }\n 90% {\n transform: translate(-50%, -51%) scale(1.01);\n }\n to {\n transform: translate(-50%, -50%);\n }\n"],["\n from {\n transform: translate(-50%, -40%) scale(.8);\n }\n 90% {\n transform: translate(-50%, -51%) scale(1.01);\n }\n to {\n transform: translate(-50%, -50%);\n }\n"]))),z=(0,i.keyframes)(Z||(Z=N(["\n from {\n transform: translate(-50%, -55%);\n }\n to {\n transform: translate(-50%, -50%);\n }\n"],["\n from {\n transform: translate(-50%, -55%);\n }\n to {\n transform: translate(-50%, -50%);\n }\n"]))),F=l()("div")(G||(G=N(["\n iframe {\n animation: "," 0.3s, "," ease-out 0.3s;\n\n width: 100%;\n height: 100%;\n\n margin-left: auto;\n margin-right: auto;\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n\n background-color: #ffffff;\n border: none;\n border-radius: 4px;\n box-shadow: 0px 12px 40px 2px rgba(0, 0, 0, 0.4);\n\n @media only screen and (min-width: 600.02px) and (min-height: 600.02px) {\n max-width: 400px;\n max-height: 650px;\n }\n }\n"],["\n iframe {\n animation: "," 0.3s, "," ease-out 0.3s;\n\n width: 100%;\n height: 100%;\n\n margin-left: auto;\n margin-right: auto;\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n\n background-color: #ffffff;\n border: none;\n border-radius: 4px;\n box-shadow: 0px 12px 40px 2px rgba(0, 0, 0, 0.4);\n\n @media only screen and (min-width: 600.02px) and (min-height: 600.02px) {\n max-width: 400px;\n max-height: 650px;\n }\n }\n"])),U,z),H=(0,i.createGlobalStyle)(Y||(Y=N(["\n // Don't allow scrolling when widget is open\n html body {\n overflow: hidden !important;\n }\n\n // When the widget takes the full screen, hide everything else to prevent iOS scroll issues.\n @media "," {\n html body > *:not(#",") {\n display: none !important;\n }\n }\n"],["\n // Don't allow scrolling when widget is open\n html body {\n overflow: hidden !important;\n }\n\n // When the widget takes the full screen, hide everything else to prevent iOS scroll issues.\n @media "," {\n html body > *:not(#",") {\n display: none !important;\n }\n }\n"])),"(max-width: 600px), (max-height: 420px)",(function(e){return e.containerId}));const B=function(e){return o.createElement(q,{isOpen:e.isOpen,className:"persona-widget__overlay"},e.isLoading&&o.createElement(_,null,o.createElement(P,null)),o.createElement(F,null,o.createElement(w,R({},e,{flowType:r.Embedded}))),e.isOpen&&o.createElement(H,{containerId:e.containerId}))};var M,Q,V,W,Z,G,Y;const $=function(){function e(){}return e.log=function(e,t){void 0===t&&(t="info")},e}();var J=function(){return(J=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},K=function(){function e(e){var t,n,r=this;this._isLoading=!0,this._isOpen=!1,this.onLoad=function(){var e,t;r._isLoading=!1,r.render(),null===(t=(e=r.options).onLoad)||void 0===t||t.call(e)},this.onReady=function(){var e,t;null===(t=(e=r.options).onReady)||void 0===t||t.call(e)},this.onComplete=function(e){var t,n,o=e.inquiryId,a=e.status,i=e.fields,l=e.collectedData;r._isOpen=!1,r.render(),null===(n=(t=r.options).onComplete)||void 0===n||n.call(t,l?{inquiryId:o,status:a,fields:i,collectedData:l}:{inquiryId:o,status:a,fields:i})},this.onCancel=function(e){var t,n,o=e.inquiryId,a=e.sessionToken;r._isOpen=!1,r.render(),null===(n=(t=r.options).onCancel)||void 0===n||n.call(t,{inquiryId:o,sessionToken:a})},this.options=e,this.refIframe=o.createRef(),this.container=document.createElement("div"),this.containerId=s(),this.container.setAttribute("id",this.containerId),this.containerParent=null!==(n=null!==(t=e.parent)&&void 0!==t?t:document.body)&&void 0!==n?n:document.children[0],this.containerParent.appendChild(this.container),this.render()}return e.prototype.render=function(){if(null!=this.container)try{a.render(o.createElement(B,J({isLoading:this._isLoading,isOpen:this._isOpen,containerId:this.containerId,refIframe:this.refIframe},this.options,{onLoad:this.onLoad,onReady:this.onReady,onComplete:this.onComplete,onCancel:this.onCancel,onEvent:this.options.onEvent})),this.container)}catch(e){throw this.destroy(),e}else $.log("Cannot render client that has been destroyed","error")},e.prototype.open=function(){var e,t;null===(t=null===(e=this.refIframe.current)||void 0===e?void 0:e.contentWindow)||void 0===t||t.postMessage({action:m.Open,metadata:{}},this.baseUrl),this._isOpen=!0,this.render()},e.prototype.cancel=function(e){var t,n;null===(n=null===(t=this.refIframe.current)||void 0===t?void 0:t.contentWindow)||void 0===n||n.postMessage({action:m.Exit,metadata:{force:e}},this.baseUrl),this.render()},e.prototype.destroy=function(){var e,t;null===(t=null===(e=this.refIframe.current)||void 0===e?void 0:e.contentWindow)||void 0===t||t.postMessage({action:m.Destroy,metadata:{}},this.baseUrl),a.unmountComponentAtNode(this.container),this.containerParent.removeChild(this.container)},Object.defineProperty(e.prototype,"isLoading",{get:function(){return this._isLoading},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"baseUrl",{get:function(){switch(this.options.host){case"development":return h.Development;case"staging":return h.Staging;default:return h.Production}},enumerable:!1,configurable:!0}),e}(),X=function(){return(X=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};const ee={Client:K,Inquiry:function(e){var t=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i}(o.useState(s()),2),n=t[0];return t[1],o.createElement(w,X({},e,{containerId:n,flowType:r.Inline}))}}},297:t=>{"use strict";t.exports=e},268:e=>{"use strict";e.exports=t},914:e=>{"use strict";e.exports=n}},o={};function a(e){if(o[e])return o[e].exports;var t=o[e]={exports:{}};return r[e](t,t.exports,a),t.exports}return a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a(793)})().default})); |
{ | ||
"name": "persona", | ||
"version": "4.7.2", | ||
"version": "4.8.0-alpha", | ||
"description": "The official web client library for the Persona API.", | ||
@@ -5,0 +5,0 @@ "main": "./dist/persona.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
53214
558
3