Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hellosign-embedded

Package Overview
Dependencies
Maintainers
4
Versions
99
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hellosign-embedded - npm Package Compare versions

Comparing version 2.0.0-2 to 2.0.0-3

2

package.json
{
"name": "hellosign-embedded",
"version": "2.0.0-2",
"version": "2.0.0-3",
"description": "Embed HelloSign signature requests and templates from within your web application.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -1,1 +0,1 @@

!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.HelloSign=n():e.HelloSign=n()}(window,function(){return function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=15)}([function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r={classNames:{BASE:"x-hellosign-embedded",BASE_IN_MODAL:"x-hellosign-embedded--in-modal",BASE_NO_CANCEL:"x-hellosign-embedded--no-cancel",IFRAME:"x-hellosign-embedded__iframe",MODAL_CLOSE:"x-hellosign-embedded__modal-close",MODAL_CLOSE_BTN:"x-hellosign-embedded__modal-close-button",MODAL_CONTENT:"x-hellosign-embedded__modal-content",MODAL_SCREEN:"x-hellosign-embedded__modal-screen"},events:{ERROR:"error",INITIALIZE:"initialize",SEND:"send",CLOSE:"close",CREATE_TEMPLATE:"createTemplate",DECLINE:"decline",OPEN:"open",REASSIGN:"reassign",SIGN:"sign"},iframe:{NAME:"x-hellosign-embedded"},locales:{DA_DK:"da_DK",DE_DE:"de_DE",EN_US:"en_US",ES_ES:"es_ES",ES_MX:"es_MX",FR_FR:"fr_FR",NL_NL:"nl_NL",PL_PL:"pl_PL",PT_BR:"pt_BR",SV_SE:"sv_SE",ZH_CN:"zh_CN"},messages:{APP_ERROR:"hellosign:error",APP_INITIALIZE:"hellosign:initialize",USER_CLOSE_REQUEST:"hellosign:userCloseRequest",USER_CREATE_TEMPLATE:"hellosign:userCreateTemplate",USER_DECLINE_REQUEST:"hellosign:userDeclineRequest",USER_REASSIGN_REQUEST:"hellosign:userReassignRequest",USER_SEND_REQUEST:"hellosign:userSendRequest",USER_SIGN_REQUEST:"hellosign:userSignRequest"}};n.default=r},function(e,n,t){"use strict";t.r(n);var r=function(){function e(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(n,t,r){return t&&e(n.prototype,t),r&&e(n,r),n}}(),o=function(e,n){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["",""],["",""]);var i=function(){function e(){for(var n=this,t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];return function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,e),this.tag=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];return"function"==typeof e?n.interimTag.bind(n,e):"string"==typeof e?n.transformEndResult(e):(e=e.map(n.transformString.bind(n)),n.transformEndResult(e.reduce(n.processSubstitutions.bind(n,r))))},r.length>0&&Array.isArray(r[0])&&(r=r[0]),this.transformers=r.map(function(e){return"function"==typeof e?e():e}),this.tag}return r(e,[{key:"interimTag",value:function(e,n){for(var t=arguments.length,r=Array(t>2?t-2:0),i=2;i<t;i++)r[i-2]=arguments[i];return this.tag(o,e.apply(void 0,[n].concat(r)))}},{key:"processSubstitutions",value:function(e,n,t){var r=this.transformSubstitution(e.shift(),n);return"".concat(n,r,t)}},{key:"transformString",value:function(e){return this.transformers.reduce(function(e,n){return n.onString?n.onString(e):e},e)}},{key:"transformSubstitution",value:function(e,n){return this.transformers.reduce(function(e,t){return t.onSubstitution?t.onSubstitution(e,n):e},e)}},{key:"transformEndResult",value:function(e){return this.transformers.reduce(function(e,n){return n.onEndResult?n.onEndResult(e):e},e)}}]),e}(),a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return{onEndResult:function(n){if(""===e)return n.trim();if("start"===(e=e.toLowerCase())||"left"===e)return n.replace(/^\s*/,"");if("end"===e||"right"===e)return n.replace(/\s*$/,"");throw new Error("Side not supported: "+e)}}};var s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"initial";return{onEndResult:function(n){if("initial"===e){var t=n.match(/^[^\S\n]*(?=\S)/gm),r=t&&Math.min.apply(Math,function(e){if(Array.isArray(e)){for(var n=0,t=Array(e.length);n<e.length;n++)t[n]=e[n];return t}return Array.from(e)}(t.map(function(e){return e.length})));if(r){var o=new RegExp("^.{"+r+"}","gm");return n.replace(o,"")}return n}if("all"===e)return n.replace(/^[^\S\n]+/gm,"");throw new Error("Unknown type: "+e)}}},u=function(e,n){return{onEndResult:function(t){if(null==e||null==n)throw new Error("replaceResultTransformer requires at least 2 arguments.");return t.replace(e,n)}}},l=function(e,n){return{onSubstitution:function(t,r){if(null==e||null==n)throw new Error("replaceSubstitutionTransformer requires at least 2 arguments.");return null==t?t:t.toString().replace(e,n)}}},c=function(e,n){return{onString:function(t){if(null==e||null==n)throw new Error("replaceStringTransformer requires at least 2 arguments.");return t.replace(e,n)}}},f={separator:"",conjunction:"",serial:!1},d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f;return{onSubstitution:function(n,t){if(Array.isArray(n)){var r=n.length,o=e.separator,i=e.conjunction,a=e.serial,s=t.match(/(\n?[^\S\n]+)$/);if(n=s?n.join(o+s[1]):n.join(o+" "),i&&r>1){var u=n.lastIndexOf(o);n=n.slice(0,u)+(a?o:"")+" "+i+n.slice(u+1)}}return n}}},p=function(e){return{onSubstitution:function(n,t){if(null==e||"string"!=typeof e)throw new Error("You need to specify a string character to split by.");return"string"==typeof n&&n.includes(e)&&(n=n.split(e)),n}}},h=function(e){return null!=e&&!Number.isNaN(e)&&"boolean"!=typeof e},m=function(){return{onSubstitution:function(e){return Array.isArray(e)?e.filter(h):h(e)?e:""}}},g=new i(d({separator:","}),s,a),b=new i(d({separator:",",conjunction:"and"}),s,a),v=new i(d({separator:",",conjunction:"or"}),s,a),y=new i(p("\n"),m,d,s,a),_=new i(p("\n"),d,s,a,l(/&/g,"&amp;"),l(/</g,"&lt;"),l(/>/g,"&gt;"),l(/"/g,"&quot;"),l(/'/g,"&#x27;"),l(/`/g,"&#x60;")),E=new i(u(/(?:\n(?:\s*))+/g," "),a),w=new i(u(/(?:\n\s*)/g,""),a),C=new i(d({separator:","}),u(/(?:\s+)/g," "),a),S=new i(d({separator:",",conjunction:"or"}),u(/(?:\s+)/g," "),a),T=new i(d({separator:",",conjunction:"and"}),u(/(?:\s+)/g," "),a),R=new i(d,s,a),F=new i(d,u(/(?:\s+)/g," "),a),L=new i(s,a),x=new i(s("all"),a);t.d(n,"TemplateTag",function(){return i}),t.d(n,"trimResultTransformer",function(){return a}),t.d(n,"stripIndentTransformer",function(){return s}),t.d(n,"replaceResultTransformer",function(){return u}),t.d(n,"replaceSubstitutionTransformer",function(){return l}),t.d(n,"replaceStringTransformer",function(){return c}),t.d(n,"inlineArrayTransformer",function(){return d}),t.d(n,"splitStringTransformer",function(){return p}),t.d(n,"removeNonPrintingValuesTransformer",function(){return m}),t.d(n,"commaLists",function(){return g}),t.d(n,"commaListsAnd",function(){return b}),t.d(n,"commaListsOr",function(){return v}),t.d(n,"html",function(){return y}),t.d(n,"codeBlock",function(){return y}),t.d(n,"source",function(){return y}),t.d(n,"safeHtml",function(){return _}),t.d(n,"oneLine",function(){return E}),t.d(n,"oneLineTrim",function(){return w}),t.d(n,"oneLineCommaLists",function(){return C}),t.d(n,"oneLineCommaListsOr",function(){return S}),t.d(n,"oneLineCommaListsAnd",function(){return T}),t.d(n,"inlineLists",function(){return R}),t.d(n,"oneLineInlineLists",function(){return F}),t.d(n,"stripIndent",function(){return L}),t.d(n,"stripIndents",function(){return x})},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r={allowCancel:!0,debug:!1,locale:function(e){return e&&e.__esModule?e:{default:e}}(t(0)).default.locales.EN_US,timeout:15e3,verifyDomain:!0};n.default=r},function(e,n){var t=1e3,r=60*t,o=60*r,i=24*o,a=365.25*i;function s(e,n,t){if(!(e<n))return e<1.5*n?Math.floor(e/n)+" "+t:Math.ceil(e/n)+" "+t+"s"}e.exports=function(e,n){n=n||{};var u=typeof e;if("string"===u&&e.length>0)return function(e){if((e=String(e)).length>100)return;var n=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(!n)return;var s=parseFloat(n[1]);switch((n[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return s*a;case"days":case"day":case"d":return s*i;case"hours":case"hour":case"hrs":case"hr":case"h":return s*o;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}(e);if("number"===u&&!1===isNaN(e))return n.long?function(e){return s(e,i,"day")||s(e,o,"hour")||s(e,r,"minute")||s(e,t,"second")||e+" ms"}(e):function(e){if(e>=i)return Math.round(e/i)+"d";if(e>=o)return Math.round(e/o)+"h";if(e>=r)return Math.round(e/r)+"m";if(e>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,n,t){function r(e){var t;function r(){if(r.enabled){var e=r,o=+new Date,i=o-(t||o);e.diff=i,e.prev=t,e.curr=o,t=o;for(var a=new Array(arguments.length),s=0;s<a.length;s++)a[s]=arguments[s];a[0]=n.coerce(a[0]),"string"!=typeof a[0]&&a.unshift("%O");var u=0;a[0]=a[0].replace(/%([a-zA-Z%])/g,function(t,r){if("%%"===t)return t;u++;var o=n.formatters[r];if("function"==typeof o){var i=a[u];t=o.call(e,i),a.splice(u,1),u--}return t}),n.formatArgs.call(e,a),(r.log||n.log||console.log.bind(console)).apply(e,a)}}return r.namespace=e,r.enabled=n.enabled(e),r.useColors=n.useColors(),r.color=function(e){var t,r=0;for(t in e)r=(r<<5)-r+e.charCodeAt(t),r|=0;return n.colors[Math.abs(r)%n.colors.length]}(e),r.destroy=o,"function"==typeof n.init&&n.init(r),n.instances.push(r),r}function o(){var e=n.instances.indexOf(this);return-1!==e&&(n.instances.splice(e,1),!0)}(n=e.exports=r.debug=r.default=r).coerce=function(e){return e instanceof Error?e.stack||e.message:e},n.disable=function(){n.enable("")},n.enable=function(e){var t;n.save(e),n.names=[],n.skips=[];var r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(t=0;t<o;t++)r[t]&&("-"===(e=r[t].replace(/\*/g,".*?"))[0]?n.skips.push(new RegExp("^"+e.substr(1)+"$")):n.names.push(new RegExp("^"+e+"$")));for(t=0;t<n.instances.length;t++){var i=n.instances[t];i.enabled=n.enabled(i.namespace)}},n.enabled=function(e){if("*"===e[e.length-1])return!0;var t,r;for(t=0,r=n.skips.length;t<r;t++)if(n.skips[t].test(e))return!1;for(t=0,r=n.names.length;t<r;t++)if(n.names[t].test(e))return!0;return!1},n.humanize=t(3),n.instances=[],n.names=[],n.skips=[],n.formatters={}},function(e,n){var t,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var u,l=[],c=!1,f=-1;function d(){c&&u&&(c=!1,u.length?l=u.concat(l):f=-1,l.length&&p())}function p(){if(!c){var e=s(d);c=!0;for(var n=l.length;n;){for(u=l,l=[];++f<n;)u&&u[f].run();f=-1,n=l.length}u=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(n){try{return r.call(null,e)}catch(n){return r.call(this,e)}}}(e)}}function h(e,n){this.fun=e,this.array=n}function m(){}o.nextTick=function(e){var n=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)n[t-1]=arguments[t];l.push(new h(e,n)),1!==l.length||c||s(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,n,t){(function(r){function o(){var e;try{e=n.storage.debug}catch(e){}return!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG),e}(n=e.exports=t(4)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},n.formatArgs=function(e){var t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+n.humanize(this.diff),!t)return;var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var o=0,i=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&"%c"===e&&(i=++o)}),e.splice(i,0,r)},n.save=function(e){try{null==e?n.storage.removeItem("debug"):n.storage.debug=e}catch(e){}},n.load=o,n.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},n.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),n.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],n.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},n.enable(o())}).call(this,t(5))},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(t(6));var o=(0,r.default)("".concat("hellosign-embedded",":info")),i=(0,r.default)("".concat("hellosign-embedded",":warn")),a=(0,r.default)("".concat("hellosign-embedded",":error"));o.log=console.log.bind(console),i.log=console.warn.bind(console);var s={info:o,warn:i,error:a};n.default=s},function(e,n){function t(){}t.prototype={on:function(e,n,t){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:n,ctx:t}),this},once:function(e,n,t){var r=this;function o(){r.off(e,o),n.apply(t,arguments)}return o._=n,this.on(e,o,t)},emit:function(e){for(var n=[].slice.call(arguments,1),t=((this.e||(this.e={}))[e]||[]).slice(),r=0,o=t.length;r<o;r++)t[r].fn.apply(t[r].ctx,n);return this},off:function(e,n){var t=this.e||(this.e={}),r=t[e],o=[];if(r&&n)for(var i=0,a=r.length;i<a;i++)r[i].fn!==n&&r[i].fn._!==n&&o.push(r[i]);return o.length?t[e]=o:delete t[e],this}},e.exports=t},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=u(t(8)),o=t(1),i=u(t(7)),a=u(t(2)),s=u(t(0));function u(e){return e&&e.__esModule?e:{default:e}}function l(){var e=d(["\n <div class=",">\n <button class=",' role="button" title="Close signature request"></button>\n </div>\n ']);return l=function(){return e},e}function c(){var e=d(['\n <div class="'," ",'">\n <div class="','"></div>\n <div class="','">\n <iframe class="','" name="','" src="','" />\n </div>\n </div>\n ']);return c=function(){return e},e}function f(){var e=d(['\n <div class="','">\n <iframe class="','" name="','" src="','" />\n </div>\n ']);return f=function(){return e},e}function d(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}function p(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.forEach(function(n){_(e,n,t[n])})}return e}function h(e){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function m(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function g(e,n,t){return(g="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,n,t){var r=function(e,n){for(;!Object.prototype.hasOwnProperty.call(e,n)&&null!==(e=b(e)););return e}(e,n);if(r){var o=Object.getOwnPropertyDescriptor(r,n);return o.get?o.get.call(t):o.value}})(e,n,t||e)}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function v(e,n){return(v=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var E=function(e){function n(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n),_(y(y(e=function(e,n){return!n||"object"!==h(n)&&"function"!=typeof n?y(e):n}(this,b(n).call(this)))),"_baseConfig",null),_(y(y(e)),"_baseEl",null),_(y(y(e)),"_iFrameURL",null),_(y(y(e)),"_iFrameEl",null),_(y(y(e)),"_initTimeout",null),_(y(y(e)),"_isOpen",!1),_(y(y(e)),"_onEmbeddedClick",e._onEmbeddedClick.bind(y(y(e)))),_(y(y(e)),"_onInitTimeout",e._onInitTimeout.bind(y(y(e)))),_(y(y(e)),"_onMessage",e._onMessage.bind(y(y(e)))),i.default.info("create new HelloSign instance with options",t),!t||"object"!==h(t))throw new TypeError("Configuration must be an object");return e._baseConfig=p({},t),e}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&v(e,n)}(n,r.default),function(e,n,t){n&&m(e.prototype,n),t&&m(e,t)}(n,[{key:"_applyClientId",value:function(e,n){var t=n.clientId;if(!t)throw new TypeError('"clientId" is required');if("string"!=typeof t)throw new TypeError('"clientId" must be a string');e.append("client_id",t)}},{key:"_applyDebug",value:function(e,n){var t=n.debug;if("boolean"!=typeof t)throw new TypeError('"debug" must be a boolean');e.append("debug",t?1:0)}},{key:"_applyFinalButtonText",value:function(e,n){if("finalButtonText"in n){var t=n.finalButtonText;if("string"!=typeof t)throw new TypeError('"finalButtonText" must be a string');if(!["Send","Continue"].includes(t))throw new TypeError('"finalButtonText" must be either "Send" or "Continue"');e.append("final_button_text",t)}}},{key:"_applyHideHeader",value:function(e,n){if("hideHeader"in n){var t=n.hideHeader;if("boolean"!=typeof t)throw new TypeError('"hideHeader" must be a boolean');e.append("hideHeader",t)}}},{key:"_applyLocale",value:function(e,n){var t=n.locale;if("string"!=typeof t)throw new TypeError('"locale" must be a string');if(!Object.values(s.default.locales).includes(t))throw new TypeError('"'.concat(t,'" is not a supported locale'));e.append("user_culture",t)}},{key:"_applyParentURL",value:function(e){e.append("parent_url",document.location.href)}},{key:"_applyRedirectTo",value:function(e,n){if("redirectTo"in n){var t=n.redirectTo;if("string"!=typeof t)throw new TypeError('"redirectTo" must be a string');e.append("redirect_url",t)}}},{key:"_applyRequestingEmail",value:function(e,n){if("requestingEmail"in n){var t=n.requestingEmail;if("string"!=typeof t)throw new TypeError('"requestingEmail" must be a string');e.append("requester",t)}}},{key:"_applyVerifyDomain",value:function(e,n){var t=n.verifyDomain;if("boolean"!=typeof t)throw new TypeError('"verifyDomain" must be a boolean');e.append("skip_domain_verification",t?0:1)}},{key:"_applyWhiteLabeling",value:function(e,n){if("whiteLabeling"in n){var t=n.whiteLabeling;if("object"!==h(t))throw new TypeError('"whiteLabeling" must be an object');e.append("white_labeling_options",JSON.stringify(t))}}},{key:"_applyVersion",value:function(e){e.append("js_version","2.0.0")}},{key:"_getFrameParams",value:function(e,n){var t=new URLSearchParams(e.search);return this._applyClientId(t,n),this._applyDebug(t,n),this._applyFinalButtonText(t,n),this._applyHideHeader(t,n),this._applyLocale(t,n),this._applyParentURL(t),this._applyRedirectTo(t,n),this._applyRequestingEmail(t,n),this._applyVerifyDomain(t,n),this._applyVersion(t),this._applyWhiteLabeling(t,n),t}},{key:"_updateFrameUrl",value:function(e,n){var t=new URL(e),r=this._getFrameParams(t,n);t.search=r.toString(),this._iFrameURL=t}},{key:"_renderFragment",value:function(e){var n=document.createElement("template");return e.container?n.innerHTML=(0,o.safeHtml)(f(),s.default.classNames.BASE,s.default.classNames.IFRAME,s.default.iframe.NAME,this._iFrameURL.href):(n.innerHTML=(0,o.safeHtml)(c(),s.default.classNames.BASE,s.default.classNames.BASE_IN_MODAL,s.default.classNames.MODAL_SCREEN,s.default.classNames.MODAL_CONTENT,s.default.classNames.IFRAME,s.default.iframe.NAME,this._iFrameURL.href),e.allowCancel&&n.content.firstChild.insertAdjacentHTML("beforeend",(0,o.safeHtml)(l(),s.default.classNames.MODAL_CLOSE,s.default.classNames.MODAL_CLOSE_BTN))),n.content}},{key:"_appendFragment",value:function(e){var n=this._renderFragment(e);this._baseEl=n.querySelector(".".concat(s.default.classNames.BASE)),this._iFrameEl=n.querySelector(".".concat(s.default.classNames.IFRAME)),this._baseEl.addEventListener("click",this._onEmbeddedClick),e.container?e.container.appendChild(n):document.body.appendChild(n)}},{key:"_clearFragment",value:function(){this._baseEl.parentElement.removeChild(this._baseEl)}},{key:"_sendMessage",value:function(e){i.default.info("posting message",e);var n=this._iFrameURL.href;this._iFrameEl.contentWindow.postMessage(e,n)}},{key:"_startInitTimeout",value:function(e){this._clearInitTimeout(),this._initTimeout=setTimeout(this._onInitTimeout,e)}},{key:"_clearInitTimeout",value:function(){this._initTimeout&&(clearTimeout(this._initTimeout),this._initTimeout=null)}},{key:"_appDidError",value:function(e){i.default.error("app encountered an error with code:",e.code),this.emit(s.default.events.ERROR,e)}},{key:"_appDidInitialize",value:function(e){i.default.info("app was initialized"),this.emit(s.default.events.INITIALIZE,e)}},{key:"_userDidCloseRequest",value:function(){i.default.info("user closed the signature request window"),this.close()}},{key:"_userDidCreateTemplate",value:function(e){i.default.info("user created the signature request template"),this.emit(s.default.events.CREATE_TEMPLATE,e)}},{key:"_userDidDeclineRequest",value:function(e){i.default.info("user declined the signature request"),this.emit(s.default.events.DECLINE,e)}},{key:"_userDidReassignRequest",value:function(e){i.default.info("user reassigned the signature request with reason:",e.reason),this.emit(s.default.events.REASSIGN,e)}},{key:"_userDidSendRequest",value:function(e){i.default.info("user sent the signature request"),this.emit(s.default.events.SEND,e)}},{key:"_userDidSignRequest",value:function(e){i.default.info("user signed the signature request"),this.emit(s.default.events.SIGN,e)}},{key:"_onEmbeddedClick",value:function(e){e.srcElement.classList.contains(s.default.classNames.MODAL_CLOSE_BTN)&&(e.preventDefault(),this.close())}},{key:"_onInitTimeout",value:function(){i.default.error("failed to initialized app before timeout"),this._sendMessage({type:s.default.messages.APP_ERROR,payload:{message:"App failed to initialize before timeout"}}),this._clearInitTimeout(),this.close()}},{key:"_onMessage",value:function(e){var n=e.data,t=e.origin;i.default.info("received message",n,t),t===this._iFrameURL.origin?(i.default.info("last message was sent from a valid origin"),"object"===h(n)&&this._delegateMessage(n)):i.default.warn("last message was sent from an unknown origin")}},{key:"_delegateMessage",value:function(e){var n=e.type,t=e.payload;switch(n){case s.default.messages.APP_ERROR:this._appDidError(t);break;case s.default.messages.APP_INITIALIZE:this._appDidInitialize(t);break;case s.default.messages.USER_CLOSE_REQUEST:this._userDidCloseRequest(t);break;case s.default.messages.USER_CREATE_TEMPLATE:this._userDidCreateTemplate(t);break;case s.default.messages.USER_DECLINE_REQUEST:this._userDidDeclineRequest(t);break;case s.default.messages.USER_REASSIGN_REQUEST:this._userDidReassignRequest(t);break;case s.default.messages.USER_SEND_REQUEST:this._userDidSendRequest(t);break;case s.default.messages.USER_SIGN_REQUEST:this._userDidSignRequest(t);break;default:i.default.warn("unhandled cross-origin window message")}}},{key:"open",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};i.default.info("open()",e,n);var t=p({},a.default,this._baseConfig,n);if(this._isOpen&&this.close(),t.container&&!(t.container instanceof HTMLElement))throw new TypeError('"container" must be an element');this._updateFrameUrl(e,t),this._appendFragment(t),this._isOpen=!0,this._iFrameEl.addEventListener("message",this._onMessage),this.emit(s.default.events.OPEN,{url:e,iFrameUrl:this._iFrameURL.href})}},{key:"close",value:function(){i.default.info("close()"),this._isOpen&&(this._clearInitTimeout(),this._clearFragment(),this._baseEl.removeEventListener("click",this._onEmbeddedClick),this._baseEl=null,this._iFrameEl=null,this._iFrameURL=null,this._isOpen=!1,window.removeEventListener("message",this._onMessage),this.emit(s.default.events.CLOSE))}},{key:"emit",value:function(){for(var e,t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];i.default.info.apply(i.default,["emit()"].concat(r)),(e=g(b(n.prototype),"emit",this)).call.apply(e,[this].concat(r))}},{key:"element",get:function(){return this._baseEl}},{key:"isOpen",get:function(){return this._isOpen}}]),n}();_(E,"classNames",s.default.classNames),_(E,"events",s.default.events),_(E,"locales",s.default.locales);var w=E;n.default=w},function(e,n){e.exports=function(e){var n="undefined"!=typeof window&&window.location;if(!n)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var t=n.protocol+"//"+n.host,r=t+n.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(e,n){var o,i=n.trim().replace(/^"(.*)"$/,function(e,n){return n}).replace(/^'(.*)'$/,function(e,n){return n});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(i)?e:(o=0===i.indexOf("//")?i:0===i.indexOf("/")?t+i:r+i.replace(/^\.\//,""),"url("+JSON.stringify(o)+")")})}},function(e,n,t){var r={},o=function(e){var n;return function(){return void 0===n&&(n=e.apply(this,arguments)),n}}(function(){return window&&document&&document.all&&!window.atob}),i=function(e){var n={};return function(e,t){if("function"==typeof e)return e();if(void 0===n[e]){var r=function(e,n){return n?n.querySelector(e):document.querySelector(e)}.call(this,e,t);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}n[e]=r}return n[e]}}(),a=null,s=0,u=[],l=t(10);function c(e,n){for(var t=0;t<e.length;t++){var o=e[t],i=r[o.id];if(i){i.refs++;for(var a=0;a<i.parts.length;a++)i.parts[a](o.parts[a]);for(;a<o.parts.length;a++)i.parts.push(g(o.parts[a],n))}else{var s=[];for(a=0;a<o.parts.length;a++)s.push(g(o.parts[a],n));r[o.id]={id:o.id,refs:1,parts:s}}}}function f(e,n){for(var t=[],r={},o=0;o<e.length;o++){var i=e[o],a=n.base?i[0]+n.base:i[0],s={css:i[1],media:i[2],sourceMap:i[3]};r[a]?r[a].parts.push(s):t.push(r[a]={id:a,parts:[s]})}return t}function d(e,n){var t=i(e.insertInto);if(!t)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=u[u.length-1];if("top"===e.insertAt)r?r.nextSibling?t.insertBefore(n,r.nextSibling):t.appendChild(n):t.insertBefore(n,t.firstChild),u.push(n);else if("bottom"===e.insertAt)t.appendChild(n);else{if("object"!=typeof e.insertAt||!e.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var o=i(e.insertAt.before,t);t.insertBefore(n,o)}}function p(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var n=u.indexOf(e);n>=0&&u.splice(n,1)}function h(e){var n=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var r=function(){0;return t.nc}();r&&(e.attrs.nonce=r)}return m(n,e.attrs),d(e,n),n}function m(e,n){Object.keys(n).forEach(function(t){e.setAttribute(t,n[t])})}function g(e,n){var t,r,o,i;if(n.transform&&e.css){if(!(i=n.transform(e.css)))return function(){};e.css=i}if(n.singleton){var u=s++;t=a||(a=h(n)),r=v.bind(null,t,u,!1),o=v.bind(null,t,u,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(t=function(e){var n=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",m(n,e.attrs),d(e,n),n}(n),r=function(e,n,t){var r=t.css,o=t.sourceMap,i=void 0===n.convertToAbsoluteUrls&&o;(n.convertToAbsoluteUrls||i)&&(r=l(r));o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var a=new Blob([r],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,t,n),o=function(){p(t),t.href&&URL.revokeObjectURL(t.href)}):(t=h(n),r=function(e,n){var t=n.css,r=n.media;r&&e.setAttribute("media",r);if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}.bind(null,t),o=function(){p(t)});return r(e),function(n){if(n){if(n.css===e.css&&n.media===e.media&&n.sourceMap===e.sourceMap)return;r(e=n)}else o()}}e.exports=function(e,n){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(n=n||{}).attrs="object"==typeof n.attrs?n.attrs:{},n.singleton||"boolean"==typeof n.singleton||(n.singleton=o()),n.insertInto||(n.insertInto="head"),n.insertAt||(n.insertAt="bottom");var t=f(e,n);return c(t,n),function(e){for(var o=[],i=0;i<t.length;i++){var a=t[i];(s=r[a.id]).refs--,o.push(s)}e&&c(f(e,n),n);for(i=0;i<o.length;i++){var s;if(0===(s=o[i]).refs){for(var u=0;u<s.parts.length;u++)s.parts[u]();delete r[s.id]}}}};var b=function(){var e=[];return function(n,t){return e[n]=t,e.filter(Boolean).join("\n")}}();function v(e,n,t,r){var o=t?"":r.css;if(e.styleSheet)e.styleSheet.cssText=b(n,o);else{var i=document.createTextNode(o),a=e.childNodes;a[n]&&e.removeChild(a[n]),a.length?e.insertBefore(i,a[n]):e.appendChild(i)}}},function(e,n){e.exports=function(e){var n=[];return n.toString=function(){return this.map(function(n){var t=function(e,n){var t=e[1]||"",r=e[3];if(!r)return t;if(n&&"function"==typeof btoa){var o=function(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}(r),i=r.sources.map(function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"});return[t].concat(i).concat([o]).join("\n")}return[t].join("\n")}(n,e);return n[2]?"@media "+n[2]+"{"+t+"}":t}).join("")},n.i=function(e,t){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},o=0;o<this.length;o++){var i=this[o][0];"number"==typeof i&&(r[i]=!0)}for(o=0;o<e.length;o++){var a=e[o];"number"==typeof a[0]&&r[a[0]]||(t&&!a[2]?a[2]=t:t&&(a[2]="("+a[2]+") and ("+t+")"),n.push(a))}},n}},function(e,n,t){(e.exports=t(12)(!1)).push([e.i,".x-hellosign-embedded {\n height: 100%; }\n .x-hellosign-embedded--in-modal {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%; }\n\n.x-hellosign-embedded__modal-screen {\n display: block;\n background-color: rgba(0, 0, 0, 0.5);\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%; }\n @media screen and (max-width: 767px) {\n .x-hellosign-embedded__modal-screen {\n display: none; } }\n\n.x-hellosign-embedded__modal-content {\n box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.25);\n position: absolute;\n top: 5vh;\n left: 50%;\n transform: translateX(-50%);\n height: 90vh;\n min-height: 400px;\n width: 80vw;\n min-width: 512px;\n max-width: 1024px; }\n @media screen and (max-width: 767px) {\n .x-hellosign-embedded__modal-content {\n overflow: hidden;\n box-shadow: none;\n height: 100%;\n min-height: 0;\n width: 100%;\n min-width: 0;\n transform: none;\n left: 0;\n top: 0; } }\n\n.x-hellosign-embedded__modal-close-button {\n -webkit-appearance: none;\n position: absolute;\n height: 40px;\n width: 40px;\n top: 10px;\n right: 10px;\n border: none;\n border-radius: 3px;\n background-color: #1a1a1a;\n transition: background-color 0.35s ease;\n will-change: background-color;\n box-shadow: 0px 3px 9px 0px rgba(0, 0, 0, 0.25);\n cursor: pointer; }\n .x-hellosign-embedded__modal-close-button:hover {\n background-color: #00B3E6; }\n .x-hellosign-embedded__modal-close-button::before, .x-hellosign-embedded__modal-close-button::after {\n content: '';\n position: absolute;\n width: 1px;\n background-color: white;\n height: 20px;\n top: 10px; }\n .x-hellosign-embedded__modal-close-button::before {\n transform: rotateZ(45deg); }\n .x-hellosign-embedded__modal-close-button::after {\n transform: rotateZ(-45deg); }\n\n.x-hellosign-embedded__iframe {\n min-height: 400px;\n background-color: #F7F8F9;\n height: 100%;\n width: 100%;\n border: none; }\n",""])},function(e,n,t){var r=t(13);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};t(11)(r,o);r.locals&&(e.exports=r.locals)},function(e,n,t){t(14),e.exports=t(9)}])});
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.HelloSign=n():e.HelloSign=n()}(window,function(){return function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=15)}([function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r={classNames:{BASE:"x-hellosign-embedded",BASE_IN_MODAL:"x-hellosign-embedded--in-modal",BASE_NO_CANCEL:"x-hellosign-embedded--no-cancel",IFRAME:"x-hellosign-embedded__iframe",MODAL_CLOSE:"x-hellosign-embedded__modal-close",MODAL_CLOSE_BTN:"x-hellosign-embedded__modal-close-button",MODAL_CONTENT:"x-hellosign-embedded__modal-content",MODAL_SCREEN:"x-hellosign-embedded__modal-screen"},events:{ERROR:"error",INITIALIZE:"initialize",SEND:"send",CLOSE:"close",CREATE_TEMPLATE:"createTemplate",DECLINE:"decline",OPEN:"open",REASSIGN:"reassign",SIGN:"sign"},iframe:{NAME:"x-hellosign-embedded"},locales:{DA_DK:"da_DK",DE_DE:"de_DE",EN_US:"en_US",ES_ES:"es_ES",ES_MX:"es_MX",FR_FR:"fr_FR",NL_NL:"nl_NL",PL_PL:"pl_PL",PT_BR:"pt_BR",SV_SE:"sv_SE",ZH_CN:"zh_CN"},messages:{APP_ERROR:"hellosign:error",APP_INITIALIZE:"hellosign:initialize",USER_CLOSE_REQUEST:"hellosign:userCloseRequest",USER_CREATE_TEMPLATE:"hellosign:userCreateTemplate",USER_DECLINE_REQUEST:"hellosign:userDeclineRequest",USER_REASSIGN_REQUEST:"hellosign:userReassignRequest",USER_SEND_REQUEST:"hellosign:userSendRequest",USER_SIGN_REQUEST:"hellosign:userSignRequest"}};n.default=r},function(e,n,t){"use strict";t.r(n);var r=function(){function e(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(n,t,r){return t&&e(n.prototype,t),r&&e(n,r),n}}(),o=function(e,n){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["",""],["",""]);var i=function(){function e(){for(var n=this,t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];return function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,e),this.tag=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];return"function"==typeof e?n.interimTag.bind(n,e):"string"==typeof e?n.transformEndResult(e):(e=e.map(n.transformString.bind(n)),n.transformEndResult(e.reduce(n.processSubstitutions.bind(n,r))))},r.length>0&&Array.isArray(r[0])&&(r=r[0]),this.transformers=r.map(function(e){return"function"==typeof e?e():e}),this.tag}return r(e,[{key:"interimTag",value:function(e,n){for(var t=arguments.length,r=Array(t>2?t-2:0),i=2;i<t;i++)r[i-2]=arguments[i];return this.tag(o,e.apply(void 0,[n].concat(r)))}},{key:"processSubstitutions",value:function(e,n,t){var r=this.transformSubstitution(e.shift(),n);return"".concat(n,r,t)}},{key:"transformString",value:function(e){return this.transformers.reduce(function(e,n){return n.onString?n.onString(e):e},e)}},{key:"transformSubstitution",value:function(e,n){return this.transformers.reduce(function(e,t){return t.onSubstitution?t.onSubstitution(e,n):e},e)}},{key:"transformEndResult",value:function(e){return this.transformers.reduce(function(e,n){return n.onEndResult?n.onEndResult(e):e},e)}}]),e}(),a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return{onEndResult:function(n){if(""===e)return n.trim();if("start"===(e=e.toLowerCase())||"left"===e)return n.replace(/^\s*/,"");if("end"===e||"right"===e)return n.replace(/\s*$/,"");throw new Error("Side not supported: "+e)}}};var s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"initial";return{onEndResult:function(n){if("initial"===e){var t=n.match(/^[^\S\n]*(?=\S)/gm),r=t&&Math.min.apply(Math,function(e){if(Array.isArray(e)){for(var n=0,t=Array(e.length);n<e.length;n++)t[n]=e[n];return t}return Array.from(e)}(t.map(function(e){return e.length})));if(r){var o=new RegExp("^.{"+r+"}","gm");return n.replace(o,"")}return n}if("all"===e)return n.replace(/^[^\S\n]+/gm,"");throw new Error("Unknown type: "+e)}}},u=function(e,n){return{onEndResult:function(t){if(null==e||null==n)throw new Error("replaceResultTransformer requires at least 2 arguments.");return t.replace(e,n)}}},l=function(e,n){return{onSubstitution:function(t,r){if(null==e||null==n)throw new Error("replaceSubstitutionTransformer requires at least 2 arguments.");return null==t?t:t.toString().replace(e,n)}}},c=function(e,n){return{onString:function(t){if(null==e||null==n)throw new Error("replaceStringTransformer requires at least 2 arguments.");return t.replace(e,n)}}},f={separator:"",conjunction:"",serial:!1},d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f;return{onSubstitution:function(n,t){if(Array.isArray(n)){var r=n.length,o=e.separator,i=e.conjunction,a=e.serial,s=t.match(/(\n?[^\S\n]+)$/);if(n=s?n.join(o+s[1]):n.join(o+" "),i&&r>1){var u=n.lastIndexOf(o);n=n.slice(0,u)+(a?o:"")+" "+i+n.slice(u+1)}}return n}}},p=function(e){return{onSubstitution:function(n,t){if(null==e||"string"!=typeof e)throw new Error("You need to specify a string character to split by.");return"string"==typeof n&&n.includes(e)&&(n=n.split(e)),n}}},h=function(e){return null!=e&&!Number.isNaN(e)&&"boolean"!=typeof e},m=function(){return{onSubstitution:function(e){return Array.isArray(e)?e.filter(h):h(e)?e:""}}},g=new i(d({separator:","}),s,a),b=new i(d({separator:",",conjunction:"and"}),s,a),v=new i(d({separator:",",conjunction:"or"}),s,a),y=new i(p("\n"),m,d,s,a),_=new i(p("\n"),d,s,a,l(/&/g,"&amp;"),l(/</g,"&lt;"),l(/>/g,"&gt;"),l(/"/g,"&quot;"),l(/'/g,"&#x27;"),l(/`/g,"&#x60;")),E=new i(u(/(?:\n(?:\s*))+/g," "),a),w=new i(u(/(?:\n\s*)/g,""),a),C=new i(d({separator:","}),u(/(?:\s+)/g," "),a),S=new i(d({separator:",",conjunction:"or"}),u(/(?:\s+)/g," "),a),T=new i(d({separator:",",conjunction:"and"}),u(/(?:\s+)/g," "),a),R=new i(d,s,a),F=new i(d,u(/(?:\s+)/g," "),a),L=new i(s,a),x=new i(s("all"),a);t.d(n,"TemplateTag",function(){return i}),t.d(n,"trimResultTransformer",function(){return a}),t.d(n,"stripIndentTransformer",function(){return s}),t.d(n,"replaceResultTransformer",function(){return u}),t.d(n,"replaceSubstitutionTransformer",function(){return l}),t.d(n,"replaceStringTransformer",function(){return c}),t.d(n,"inlineArrayTransformer",function(){return d}),t.d(n,"splitStringTransformer",function(){return p}),t.d(n,"removeNonPrintingValuesTransformer",function(){return m}),t.d(n,"commaLists",function(){return g}),t.d(n,"commaListsAnd",function(){return b}),t.d(n,"commaListsOr",function(){return v}),t.d(n,"html",function(){return y}),t.d(n,"codeBlock",function(){return y}),t.d(n,"source",function(){return y}),t.d(n,"safeHtml",function(){return _}),t.d(n,"oneLine",function(){return E}),t.d(n,"oneLineTrim",function(){return w}),t.d(n,"oneLineCommaLists",function(){return C}),t.d(n,"oneLineCommaListsOr",function(){return S}),t.d(n,"oneLineCommaListsAnd",function(){return T}),t.d(n,"inlineLists",function(){return R}),t.d(n,"oneLineInlineLists",function(){return F}),t.d(n,"stripIndent",function(){return L}),t.d(n,"stripIndents",function(){return x})},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r={allowCancel:!0,debug:!1,locale:function(e){return e&&e.__esModule?e:{default:e}}(t(0)).default.locales.EN_US,timeout:15e3,verifyDomain:!0};n.default=r},function(e,n){var t=1e3,r=60*t,o=60*r,i=24*o,a=365.25*i;function s(e,n,t){if(!(e<n))return e<1.5*n?Math.floor(e/n)+" "+t:Math.ceil(e/n)+" "+t+"s"}e.exports=function(e,n){n=n||{};var u=typeof e;if("string"===u&&e.length>0)return function(e){if((e=String(e)).length>100)return;var n=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(!n)return;var s=parseFloat(n[1]);switch((n[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return s*a;case"days":case"day":case"d":return s*i;case"hours":case"hour":case"hrs":case"hr":case"h":return s*o;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}(e);if("number"===u&&!1===isNaN(e))return n.long?function(e){return s(e,i,"day")||s(e,o,"hour")||s(e,r,"minute")||s(e,t,"second")||e+" ms"}(e):function(e){if(e>=i)return Math.round(e/i)+"d";if(e>=o)return Math.round(e/o)+"h";if(e>=r)return Math.round(e/r)+"m";if(e>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,n,t){function r(e){var t;function r(){if(r.enabled){var e=r,o=+new Date,i=o-(t||o);e.diff=i,e.prev=t,e.curr=o,t=o;for(var a=new Array(arguments.length),s=0;s<a.length;s++)a[s]=arguments[s];a[0]=n.coerce(a[0]),"string"!=typeof a[0]&&a.unshift("%O");var u=0;a[0]=a[0].replace(/%([a-zA-Z%])/g,function(t,r){if("%%"===t)return t;u++;var o=n.formatters[r];if("function"==typeof o){var i=a[u];t=o.call(e,i),a.splice(u,1),u--}return t}),n.formatArgs.call(e,a),(r.log||n.log||console.log.bind(console)).apply(e,a)}}return r.namespace=e,r.enabled=n.enabled(e),r.useColors=n.useColors(),r.color=function(e){var t,r=0;for(t in e)r=(r<<5)-r+e.charCodeAt(t),r|=0;return n.colors[Math.abs(r)%n.colors.length]}(e),r.destroy=o,"function"==typeof n.init&&n.init(r),n.instances.push(r),r}function o(){var e=n.instances.indexOf(this);return-1!==e&&(n.instances.splice(e,1),!0)}(n=e.exports=r.debug=r.default=r).coerce=function(e){return e instanceof Error?e.stack||e.message:e},n.disable=function(){n.enable("")},n.enable=function(e){var t;n.save(e),n.names=[],n.skips=[];var r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(t=0;t<o;t++)r[t]&&("-"===(e=r[t].replace(/\*/g,".*?"))[0]?n.skips.push(new RegExp("^"+e.substr(1)+"$")):n.names.push(new RegExp("^"+e+"$")));for(t=0;t<n.instances.length;t++){var i=n.instances[t];i.enabled=n.enabled(i.namespace)}},n.enabled=function(e){if("*"===e[e.length-1])return!0;var t,r;for(t=0,r=n.skips.length;t<r;t++)if(n.skips[t].test(e))return!1;for(t=0,r=n.names.length;t<r;t++)if(n.names[t].test(e))return!0;return!1},n.humanize=t(3),n.instances=[],n.names=[],n.skips=[],n.formatters={}},function(e,n){var t,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var u,l=[],c=!1,f=-1;function d(){c&&u&&(c=!1,u.length?l=u.concat(l):f=-1,l.length&&p())}function p(){if(!c){var e=s(d);c=!0;for(var n=l.length;n;){for(u=l,l=[];++f<n;)u&&u[f].run();f=-1,n=l.length}u=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(n){try{return r.call(null,e)}catch(n){return r.call(this,e)}}}(e)}}function h(e,n){this.fun=e,this.array=n}function m(){}o.nextTick=function(e){var n=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)n[t-1]=arguments[t];l.push(new h(e,n)),1!==l.length||c||s(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,n,t){(function(r){function o(){var e;try{e=n.storage.debug}catch(e){}return!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG),e}(n=e.exports=t(4)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},n.formatArgs=function(e){var t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+n.humanize(this.diff),!t)return;var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var o=0,i=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&"%c"===e&&(i=++o)}),e.splice(i,0,r)},n.save=function(e){try{null==e?n.storage.removeItem("debug"):n.storage.debug=e}catch(e){}},n.load=o,n.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},n.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),n.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],n.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},n.enable(o())}).call(this,t(5))},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(t(6));var o=(0,r.default)("".concat("hellosign-embedded",":info")),i=(0,r.default)("".concat("hellosign-embedded",":warn")),a=(0,r.default)("".concat("hellosign-embedded",":error"));o.log=console.log.bind(console),i.log=console.warn.bind(console);var s={info:o,warn:i,error:a};n.default=s},function(e,n){function t(){}t.prototype={on:function(e,n,t){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:n,ctx:t}),this},once:function(e,n,t){var r=this;function o(){r.off(e,o),n.apply(t,arguments)}return o._=n,this.on(e,o,t)},emit:function(e){for(var n=[].slice.call(arguments,1),t=((this.e||(this.e={}))[e]||[]).slice(),r=0,o=t.length;r<o;r++)t[r].fn.apply(t[r].ctx,n);return this},off:function(e,n){var t=this.e||(this.e={}),r=t[e],o=[];if(r&&n)for(var i=0,a=r.length;i<a;i++)r[i].fn!==n&&r[i].fn._!==n&&o.push(r[i]);return o.length?t[e]=o:delete t[e],this}},e.exports=t},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=u(t(8)),o=t(1),i=u(t(7)),a=u(t(2)),s=u(t(0));function u(e){return e&&e.__esModule?e:{default:e}}function l(){var e=d(["\n <div class=",">\n <button class=",' role="button" title="Close signature request"></button>\n </div>\n ']);return l=function(){return e},e}function c(){var e=d(['\n <div class="'," ",'">\n <div class="','"></div>\n <div class="','">\n <iframe class="','" name="','" src="','" />\n </div>\n </div>\n ']);return c=function(){return e},e}function f(){var e=d(['\n <div class="','">\n <iframe class="','" name="','" src="','" />\n </div>\n ']);return f=function(){return e},e}function d(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}function p(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.forEach(function(n){_(e,n,t[n])})}return e}function h(e){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function m(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function g(e,n,t){return(g="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,n,t){var r=function(e,n){for(;!Object.prototype.hasOwnProperty.call(e,n)&&null!==(e=b(e)););return e}(e,n);if(r){var o=Object.getOwnPropertyDescriptor(r,n);return o.get?o.get.call(t):o.value}})(e,n,t||e)}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function v(e,n){return(v=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var E=function(e){function n(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n),_(y(y(e=function(e,n){return!n||"object"!==h(n)&&"function"!=typeof n?y(e):n}(this,b(n).call(this)))),"_baseConfig",null),_(y(y(e)),"_baseEl",null),_(y(y(e)),"_iFrameURL",null),_(y(y(e)),"_iFrameEl",null),_(y(y(e)),"_initTimeout",null),_(y(y(e)),"_isOpen",!1),_(y(y(e)),"_onEmbeddedClick",e._onEmbeddedClick.bind(y(y(e)))),_(y(y(e)),"_onInitTimeout",e._onInitTimeout.bind(y(y(e)))),_(y(y(e)),"_onMessage",e._onMessage.bind(y(y(e)))),i.default.info("create new HelloSign instance with options",t),!t||"object"!==h(t))throw new TypeError("Configuration must be an object");return e._baseConfig=p({},t),e}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&v(e,n)}(n,r.default),function(e,n,t){n&&m(e.prototype,n),t&&m(e,t)}(n,[{key:"_applyClientId",value:function(e,n){var t=n.clientId;if(!t)throw new TypeError('"clientId" is required');if("string"!=typeof t)throw new TypeError('"clientId" must be a string');e.append("client_id",t)}},{key:"_applyDebug",value:function(e,n){var t=n.debug;if("boolean"!=typeof t)throw new TypeError('"debug" must be a boolean');e.append("debug",t?1:0)}},{key:"_applyFinalButtonText",value:function(e,n){if("finalButtonText"in n){var t=n.finalButtonText;if("string"!=typeof t)throw new TypeError('"finalButtonText" must be a string');if(!["Send","Continue"].includes(t))throw new TypeError('"finalButtonText" must be either "Send" or "Continue"');e.append("final_button_text",t)}}},{key:"_applyHideHeader",value:function(e,n){if("hideHeader"in n){var t=n.hideHeader;if("boolean"!=typeof t)throw new TypeError('"hideHeader" must be a boolean');e.append("hideHeader",t)}}},{key:"_applyLocale",value:function(e,n){var t=n.locale;if("string"!=typeof t)throw new TypeError('"locale" must be a string');if(!Object.values(s.default.locales).includes(t))throw new TypeError('"'.concat(t,'" is not a supported locale'));e.append("user_culture",t)}},{key:"_applyParentURL",value:function(e){e.append("parent_url",document.location.href)}},{key:"_applyRedirectTo",value:function(e,n){if("redirectTo"in n){var t=n.redirectTo;if("string"!=typeof t)throw new TypeError('"redirectTo" must be a string');e.append("redirect_url",t)}}},{key:"_applyRequestingEmail",value:function(e,n){if("requestingEmail"in n){var t=n.requestingEmail;if("string"!=typeof t)throw new TypeError('"requestingEmail" must be a string');e.append("requester",t)}}},{key:"_applyVerifyDomain",value:function(e,n){var t=n.verifyDomain;if("boolean"!=typeof t)throw new TypeError('"verifyDomain" must be a boolean');e.append("skip_domain_verification",t?0:1)}},{key:"_applyWhiteLabeling",value:function(e,n){if("whiteLabeling"in n){var t=n.whiteLabeling;if("object"!==h(t))throw new TypeError('"whiteLabeling" must be an object');e.append("white_labeling_options",JSON.stringify(t))}}},{key:"_applyVersion",value:function(e){e.append("js_version","2.0.0")}},{key:"_getFrameParams",value:function(e,n){var t=new URLSearchParams(e.search);return this._applyClientId(t,n),this._applyDebug(t,n),this._applyFinalButtonText(t,n),this._applyHideHeader(t,n),this._applyLocale(t,n),this._applyParentURL(t),this._applyRedirectTo(t,n),this._applyRequestingEmail(t,n),this._applyVerifyDomain(t,n),this._applyVersion(t),this._applyWhiteLabeling(t,n),t}},{key:"_updateFrameUrl",value:function(e,n){var t=new URL(e),r=this._getFrameParams(t,n);t.search=r.toString(),this._iFrameURL=t}},{key:"_renderFragment",value:function(e){var n=document.createElement("template");return e.container?n.innerHTML=(0,o.safeHtml)(f(),s.default.classNames.BASE,s.default.classNames.IFRAME,s.default.iframe.NAME,this._iFrameURL.href):(n.innerHTML=(0,o.safeHtml)(c(),s.default.classNames.BASE,s.default.classNames.BASE_IN_MODAL,s.default.classNames.MODAL_SCREEN,s.default.classNames.MODAL_CONTENT,s.default.classNames.IFRAME,s.default.iframe.NAME,this._iFrameURL.href),e.allowCancel&&n.content.firstChild.insertAdjacentHTML("beforeend",(0,o.safeHtml)(l(),s.default.classNames.MODAL_CLOSE,s.default.classNames.MODAL_CLOSE_BTN))),n.content}},{key:"_appendFragment",value:function(e){var n=this._renderFragment(e);this._baseEl=n.querySelector(".".concat(s.default.classNames.BASE)),this._iFrameEl=n.querySelector(".".concat(s.default.classNames.IFRAME)),this._baseEl.addEventListener("click",this._onEmbeddedClick),e.container?e.container.appendChild(n):document.body.appendChild(n)}},{key:"_clearFragment",value:function(){this._baseEl.parentElement.removeChild(this._baseEl)}},{key:"_sendMessage",value:function(e){i.default.info("posting message",e);var n=this._iFrameURL.href;this._iFrameEl.contentWindow.postMessage(e,n)}},{key:"_startInitTimeout",value:function(e){this._clearInitTimeout(),this._initTimeout=setTimeout(this._onInitTimeout,e)}},{key:"_clearInitTimeout",value:function(){this._initTimeout&&(clearTimeout(this._initTimeout),this._initTimeout=null)}},{key:"_appDidError",value:function(e){i.default.error("app encountered an error with code:",e.code),this.emit(s.default.events.ERROR,e)}},{key:"_appDidInitialize",value:function(e){i.default.info("app was initialized"),this.emit(s.default.events.INITIALIZE,e)}},{key:"_userDidCloseRequest",value:function(){i.default.info("user closed the signature request window"),this.close()}},{key:"_userDidCreateTemplate",value:function(e){i.default.info("user created the signature request template"),this.emit(s.default.events.CREATE_TEMPLATE,e)}},{key:"_userDidDeclineRequest",value:function(e){i.default.info("user declined the signature request"),this.emit(s.default.events.DECLINE,e)}},{key:"_userDidReassignRequest",value:function(e){i.default.info("user reassigned the signature request with reason:",e.reason),this.emit(s.default.events.REASSIGN,e)}},{key:"_userDidSendRequest",value:function(e){i.default.info("user sent the signature request"),this.emit(s.default.events.SEND,e)}},{key:"_userDidSignRequest",value:function(e){i.default.info("user signed the signature request"),this.emit(s.default.events.SIGN,e)}},{key:"_onEmbeddedClick",value:function(e){e.srcElement.classList.contains(s.default.classNames.MODAL_CLOSE_BTN)&&(e.preventDefault(),this.close())}},{key:"_onInitTimeout",value:function(){i.default.error("failed to initialized app before timeout"),this._sendMessage({type:s.default.messages.APP_ERROR,payload:{message:"App failed to initialize before timeout"}}),this._clearInitTimeout(),this.close()}},{key:"_onMessage",value:function(e){var n=e.data,t=e.origin;i.default.info("received message",n,t),t===this._iFrameURL.origin?(i.default.info("last message was sent from a valid origin"),"object"===h(n)&&this._delegateMessage(n)):i.default.warn("last message was sent from an unknown origin")}},{key:"_delegateMessage",value:function(e){var n=e.type,t=e.payload;switch(n){case s.default.messages.APP_ERROR:this._appDidError(t);break;case s.default.messages.APP_INITIALIZE:this._appDidInitialize(t);break;case s.default.messages.USER_CLOSE_REQUEST:this._userDidCloseRequest(t);break;case s.default.messages.USER_CREATE_TEMPLATE:this._userDidCreateTemplate(t);break;case s.default.messages.USER_DECLINE_REQUEST:this._userDidDeclineRequest(t);break;case s.default.messages.USER_REASSIGN_REQUEST:this._userDidReassignRequest(t);break;case s.default.messages.USER_SEND_REQUEST:this._userDidSendRequest(t);break;case s.default.messages.USER_SIGN_REQUEST:this._userDidSignRequest(t);break;default:i.default.warn("unhandled cross-origin window message")}}},{key:"open",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};i.default.info("open()",e,n);var t=p({},a.default,this._baseConfig,n);if(this._isOpen&&this.close(),t.container&&!(t.container instanceof HTMLElement))throw new TypeError('"container" must be an element');this._updateFrameUrl(e,t),this._appendFragment(t),this._isOpen=!0,window.addEventListener("message",this._onMessage),this.emit(s.default.events.OPEN,{url:e,iFrameUrl:this._iFrameURL.href})}},{key:"close",value:function(){i.default.info("close()"),this._isOpen&&(this._clearInitTimeout(),this._clearFragment(),this._baseEl.removeEventListener("click",this._onEmbeddedClick),this._baseEl=null,this._iFrameEl=null,this._iFrameURL=null,this._isOpen=!1,window.removeEventListener("message",this._onMessage),this.emit(s.default.events.CLOSE))}},{key:"emit",value:function(){for(var e,t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];i.default.info.apply(i.default,["emit()"].concat(r)),(e=g(b(n.prototype),"emit",this)).call.apply(e,[this].concat(r))}},{key:"element",get:function(){return this._baseEl}},{key:"isOpen",get:function(){return this._isOpen}}]),n}();_(E,"classNames",s.default.classNames),_(E,"events",s.default.events),_(E,"locales",s.default.locales);var w=E;n.default=w},function(e,n){e.exports=function(e){var n="undefined"!=typeof window&&window.location;if(!n)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var t=n.protocol+"//"+n.host,r=t+n.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(e,n){var o,i=n.trim().replace(/^"(.*)"$/,function(e,n){return n}).replace(/^'(.*)'$/,function(e,n){return n});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(i)?e:(o=0===i.indexOf("//")?i:0===i.indexOf("/")?t+i:r+i.replace(/^\.\//,""),"url("+JSON.stringify(o)+")")})}},function(e,n,t){var r={},o=function(e){var n;return function(){return void 0===n&&(n=e.apply(this,arguments)),n}}(function(){return window&&document&&document.all&&!window.atob}),i=function(e){var n={};return function(e,t){if("function"==typeof e)return e();if(void 0===n[e]){var r=function(e,n){return n?n.querySelector(e):document.querySelector(e)}.call(this,e,t);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}n[e]=r}return n[e]}}(),a=null,s=0,u=[],l=t(10);function c(e,n){for(var t=0;t<e.length;t++){var o=e[t],i=r[o.id];if(i){i.refs++;for(var a=0;a<i.parts.length;a++)i.parts[a](o.parts[a]);for(;a<o.parts.length;a++)i.parts.push(g(o.parts[a],n))}else{var s=[];for(a=0;a<o.parts.length;a++)s.push(g(o.parts[a],n));r[o.id]={id:o.id,refs:1,parts:s}}}}function f(e,n){for(var t=[],r={},o=0;o<e.length;o++){var i=e[o],a=n.base?i[0]+n.base:i[0],s={css:i[1],media:i[2],sourceMap:i[3]};r[a]?r[a].parts.push(s):t.push(r[a]={id:a,parts:[s]})}return t}function d(e,n){var t=i(e.insertInto);if(!t)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=u[u.length-1];if("top"===e.insertAt)r?r.nextSibling?t.insertBefore(n,r.nextSibling):t.appendChild(n):t.insertBefore(n,t.firstChild),u.push(n);else if("bottom"===e.insertAt)t.appendChild(n);else{if("object"!=typeof e.insertAt||!e.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var o=i(e.insertAt.before,t);t.insertBefore(n,o)}}function p(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var n=u.indexOf(e);n>=0&&u.splice(n,1)}function h(e){var n=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var r=function(){0;return t.nc}();r&&(e.attrs.nonce=r)}return m(n,e.attrs),d(e,n),n}function m(e,n){Object.keys(n).forEach(function(t){e.setAttribute(t,n[t])})}function g(e,n){var t,r,o,i;if(n.transform&&e.css){if(!(i=n.transform(e.css)))return function(){};e.css=i}if(n.singleton){var u=s++;t=a||(a=h(n)),r=v.bind(null,t,u,!1),o=v.bind(null,t,u,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(t=function(e){var n=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",m(n,e.attrs),d(e,n),n}(n),r=function(e,n,t){var r=t.css,o=t.sourceMap,i=void 0===n.convertToAbsoluteUrls&&o;(n.convertToAbsoluteUrls||i)&&(r=l(r));o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var a=new Blob([r],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,t,n),o=function(){p(t),t.href&&URL.revokeObjectURL(t.href)}):(t=h(n),r=function(e,n){var t=n.css,r=n.media;r&&e.setAttribute("media",r);if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}.bind(null,t),o=function(){p(t)});return r(e),function(n){if(n){if(n.css===e.css&&n.media===e.media&&n.sourceMap===e.sourceMap)return;r(e=n)}else o()}}e.exports=function(e,n){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(n=n||{}).attrs="object"==typeof n.attrs?n.attrs:{},n.singleton||"boolean"==typeof n.singleton||(n.singleton=o()),n.insertInto||(n.insertInto="head"),n.insertAt||(n.insertAt="bottom");var t=f(e,n);return c(t,n),function(e){for(var o=[],i=0;i<t.length;i++){var a=t[i];(s=r[a.id]).refs--,o.push(s)}e&&c(f(e,n),n);for(i=0;i<o.length;i++){var s;if(0===(s=o[i]).refs){for(var u=0;u<s.parts.length;u++)s.parts[u]();delete r[s.id]}}}};var b=function(){var e=[];return function(n,t){return e[n]=t,e.filter(Boolean).join("\n")}}();function v(e,n,t,r){var o=t?"":r.css;if(e.styleSheet)e.styleSheet.cssText=b(n,o);else{var i=document.createTextNode(o),a=e.childNodes;a[n]&&e.removeChild(a[n]),a.length?e.insertBefore(i,a[n]):e.appendChild(i)}}},function(e,n){e.exports=function(e){var n=[];return n.toString=function(){return this.map(function(n){var t=function(e,n){var t=e[1]||"",r=e[3];if(!r)return t;if(n&&"function"==typeof btoa){var o=function(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}(r),i=r.sources.map(function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"});return[t].concat(i).concat([o]).join("\n")}return[t].join("\n")}(n,e);return n[2]?"@media "+n[2]+"{"+t+"}":t}).join("")},n.i=function(e,t){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},o=0;o<this.length;o++){var i=this[o][0];"number"==typeof i&&(r[i]=!0)}for(o=0;o<e.length;o++){var a=e[o];"number"==typeof a[0]&&r[a[0]]||(t&&!a[2]?a[2]=t:t&&(a[2]="("+a[2]+") and ("+t+")"),n.push(a))}},n}},function(e,n,t){(e.exports=t(12)(!1)).push([e.i,".x-hellosign-embedded {\n height: 100%; }\n .x-hellosign-embedded--in-modal {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%; }\n\n.x-hellosign-embedded__modal-screen {\n display: block;\n background-color: rgba(0, 0, 0, 0.5);\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%; }\n @media screen and (max-width: 767px) {\n .x-hellosign-embedded__modal-screen {\n display: none; } }\n\n.x-hellosign-embedded__modal-content {\n box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.25);\n position: absolute;\n top: 5vh;\n left: 50%;\n transform: translateX(-50%);\n height: 90vh;\n min-height: 400px;\n width: 80vw;\n min-width: 512px;\n max-width: 1024px; }\n @media screen and (max-width: 767px) {\n .x-hellosign-embedded__modal-content {\n overflow: hidden;\n box-shadow: none;\n height: 100%;\n min-height: 0;\n width: 100%;\n min-width: 0;\n transform: none;\n left: 0;\n top: 0; } }\n\n.x-hellosign-embedded__modal-close-button {\n -webkit-appearance: none;\n position: absolute;\n height: 40px;\n width: 40px;\n top: 10px;\n right: 10px;\n border: none;\n border-radius: 3px;\n background-color: #1a1a1a;\n transition: background-color 0.35s ease;\n will-change: background-color;\n box-shadow: 0px 3px 9px 0px rgba(0, 0, 0, 0.25);\n cursor: pointer; }\n .x-hellosign-embedded__modal-close-button:hover {\n background-color: #00B3E6; }\n .x-hellosign-embedded__modal-close-button::before, .x-hellosign-embedded__modal-close-button::after {\n content: '';\n position: absolute;\n width: 1px;\n background-color: white;\n height: 20px;\n top: 10px; }\n .x-hellosign-embedded__modal-close-button::before {\n transform: rotateZ(45deg); }\n .x-hellosign-embedded__modal-close-button::after {\n transform: rotateZ(-45deg); }\n\n.x-hellosign-embedded__iframe {\n min-height: 400px;\n background-color: #F7F8F9;\n height: 100%;\n width: 100%;\n border: none; }\n",""])},function(e,n,t){var r=t(13);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};t(11)(r,o);r.locals&&(e.exports=r.locals)},function(e,n,t){t(14),e.exports=t(9)}]).default});

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc