Socket
Socket
Sign inDemoInstall

@pactsafe/pactsafe-react-sdk

Package Overview
Dependencies
Maintainers
13
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pactsafe/pactsafe-react-sdk - npm Package Compare versions

Comparing version 2.4.7 to 2.4.8

LICENSE

3

es/PSClickWrap.js

@@ -14,2 +14,3 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

import uuid from 'uuid/v4';
import isEqual from 'lodash.isequal';
import PSSnippet from './PSSnippet';

@@ -93,3 +94,3 @@

}
if (renderData !== prevProps.renderData) {
if (!isEqual(renderData, prevProps.renderData)) {
if (clickWrapStyle && _psLoadedValidGroup) {

@@ -96,0 +97,0 @@ _ps.getByKey(clickwrapGroupKey).site.set('style', clickWrapStyle);

@@ -23,2 +23,6 @@ 'use strict';

var _lodash = require('lodash.isequal');
var _lodash2 = _interopRequireDefault(_lodash);
var _PSSnippet = require('./PSSnippet');

@@ -113,3 +117,3 @@

}
if (renderData !== prevProps.renderData) {
if (!(0, _lodash2.default)(renderData, prevProps.renderData)) {
if (clickWrapStyle && _psLoadedValidGroup) {

@@ -116,0 +120,0 @@ _ps.getByKey(clickwrapGroupKey).site.set('style', clickWrapStyle);

{
"name": "@pactsafe/pactsafe-react-sdk",
"version": "2.4.7",
"version": "2.4.8",
"description": "PactSafe React SDK - React SDK for easy Clickwrap/Browsewrap implementation leveraging PactSafe's JavaScript API",
"author": "PactSafe",
"license": "MIT",
"main": "lib/index.js",

@@ -31,2 +32,3 @@ "module": "es/index.js",

"dotenv-webpack": "^1.6.0",
"lodash.isequal": "^4.5.0",
"prop-types": "^15.5.10",

@@ -33,0 +35,0 @@ "react-proptype-conditional-require": "^1.0.4",

@@ -6,7 +6,7 @@ # PactSafe React SDK

## Features
- Automatically loads the PactSafe Snippet into your app so all you have to do is call `_ps` to use the [PactSafe library](https://developer.pactsafe.com/docs/get-to-know-our-javascript-library).
#### PSClickWrap Component:
#### PSClickWrap Component
- Renders a PactSafe ClickWrap group by providing a site access ID and group key

@@ -16,16 +16,15 @@ - Ability to render PactSafe ClickWrap groups dynamically using a filter to specify contract ID's and/or tags

- Ability to override properties set within the PactSafe App's group configuration such as:
- ClickWrap style using the `clickWrapStyle` prop
- Signer ID selector using the `signerIdSelector` prop
- Displaying all contracts using the `displayAll` prop
- and more! ([See more detailed documentation on available PSClickWrap props here](#props))
- ClickWrap style using the `clickWrapStyle` prop
- Signer ID selector using the `signerIdSelector` prop
- Displaying all contracts using the `displayAll` prop
- and more! ([See more detailed documentation on available PSClickWrap props here](#props))
- Ability to hook into events fired by the Snippet using function props ([See documentation on PSClickwrap callback props here](#callback-props))
#### PSBrowseWrap Component:
#### PSBrowseWrap Component
- Renders a PactSafe BrowseWrap group by providing a site access ID and group key
- Ability to override properties set within the PactSafe App's group configuration such as:
- Position of BrowseWrap with the `position` prop
- Whether the BrowseWrap should always be visible with the `alwaysVisible` prop
- and more! ([See more detailed documentation on available PSBrowseWrap props here](#props))
- Position of BrowseWrap with the `position` prop
- Whether the BrowseWrap should always be visible with the `alwaysVisible` prop
- and more! ([See more detailed documentation on available PSBrowseWrap props here](#props))

@@ -36,6 +35,7 @@ ## Demo & Examples

#### PSClickWrap:
#### PSClickWrap
![PSClickCrap](images/psclickwrap.gif "PSClickWrap")
#### PSBrowseWrap:
#### PSBrowseWrap

@@ -53,6 +53,6 @@ ![PSBrowseWrap](images/psbrowsewrap.gif "PSBrowseWrap")

[Some helpful information on creating contracts with render data can be found here.](https://developer.pactsafe.com/docs/how-to-use-smart-contracts-with-the-javascript-library)
[Some helpful information on creating contracts with render data can be found here.](https://developer.pactsafe.com/docs/how-to-use-smart-contracts-with-the-javascript-library)
(Note: You shouldn't have to write any javascript to get the demo to work! When implementing yourself, the React SDK uses the `dynamic` and `renderData` props to handle rendering of dynamic contracts instead of having to make `_ps` calls.)
After completing these steps the demo should load as the online example does by running
After completing these steps the demo should load as the online example does by running

@@ -64,3 +64,3 @@ ```

Then open [`http://localhost:3000`](http://localhost:3000) in a browser.
Then open [`http://localhost:3000`](http://localhost:3000) in a browser.

@@ -78,3 +78,4 @@ ## Installation

The following can be found in the project's root directory, as well as compiled using `npm run build`:
* A CommonJS build in `lib/`
* A CommonJS build in `lib/`
* An ES modules build in `es/` (enabled by default/without configuration using `npm install`)

@@ -87,3 +88,3 @@ * UMD development and production builds in `/umd`

In order to use the PSClickWrap, you must specify a signer ID selector that corresponds to the ID of an `<input>` field on the page that will identify the signer (usually an email field). This ID should then be passed as the `signerIdSelector` prop to the PSClickWrap component:
In order to use the PSClickWrap, you must specify a signer ID selector that corresponds to the ID of an `<input>` field on the page that will identify the signer (usually an email field). This ID should then be passed as the `signerIdSelector` prop to the PSClickWrap component:

@@ -112,3 +113,2 @@ ```JSX

```JSX

@@ -121,6 +121,8 @@ import { PSBrowseWrap } from '@pactsafe/pactsafe-react-sdk'

```
---
## <a name="props"></a>Props
### PSClickWrap Props:
### PSClickWrap Props

@@ -161,3 +163,3 @@ (*Note you may have to scroll to the right to see the default value*)

## <a name="callback-props"></a>PSClickwrap Triggered Event Callback Props:
## <a name="callback-props"></a>PSClickwrap Triggered Event Callback Props

@@ -168,2 +170,3 @@ New in v2.0 of the React SDK we are introducing triggered event props. These props are functions that can be passed in as props and are called in response to events that happen after a user interacts with a PSClickwrap component. These function props correspond to the triggered events that can be also created using the _ps global created by the snippet. [For more information on how triggered events work within the PSSnippet and calling them without the props, you can learn about them here](https://developer.pactsafe.com/v1.1/reference#triggered-events-1). By using function props, the component will interact with the `_ps` API for you and clean up after itself when the component is destroyed.

As a quick example of the usage of these, if you wanted to enable a button on a valid clickwrap event, here is example code to do so using the onValid and onInvalid event props:
```JSX

@@ -179,18 +182,18 @@ import { PSClickWrap } from '@pactsafe/pactsafe-react-sdk'

}
onValid = () => {
this.setState({ hasAgreed: true });
}
onInvalid = () => {
this.setState({ hasAgreed: false });
}
render () {
return
return
<div>
<input type="email" id="userEmail" placeholder="Your Email"/>
<PSClickWrap accessId={"YOUR_PACTSAFE_ACCESS_ID_HERE"} groupKey={"YOUR_GROUP_KEY_HERE"} signerIdSelector={"userEmail"} onValid={this.onValid} onInvalid={this.onInvalid}/>
<button disabled={!this.state.hasAgreed} type="submit">Submit</button>

@@ -207,7 +210,9 @@ </div>

## <a name="onAll"></a> onAll
_ps event: `all`
A special event that is triggered when any other event is triggered. The name of the original event is always the first argument passed to the callback function. The rest of the arguments will match whatever arguments were passed to the original event's callback function.
A special event that is triggered when any other event is triggered. The name of the original event is always the first argument passed to the callback function. The rest of the arguments will match whatever arguments were passed to the original event's callback function.
### Callback Arguments:
### Callback Arguments
| Name | Type | Description |

@@ -219,2 +224,3 @@ |:----------------:|:------------------:|:---------------------------------------------------------------------------------------------------------------------------------------------------:|

## <a name="onSent"></a> onSent
_ps event: `sent`

@@ -224,3 +230,4 @@

### Callback Arguments:
### Callback Arguments
| Name | Type | Description |

@@ -234,2 +241,3 @@ |:----------------:|:---------------------------------------:|:---------------------------------------------------------------------------------------------------------------------------------------------------:|

## <a name="onRetrieved"></a> onRetrieved
_ps event: `retrieved`

@@ -239,3 +247,4 @@

### Callback Arguments:
### Callback Arguments
| Name | Type | Description |

@@ -248,2 +257,3 @@ |:----------------:|:---------------------------------------:|:---------------------------------------------------------------------------------------------------------------------------------------------------:|

## <a name="onSet"></a> onSet
_ps event: `set`

@@ -254,3 +264,4 @@

### Callback Arguments:
### Callback Arguments
| Name | Type | Description |

@@ -263,2 +274,3 @@ |:----------------:|:--------------------------------------------------------------:|:---------------------------------------------------------------------------------------------------------------------------------------------------:|

## <a name="onSetSignerId"></a> onSetSignerId
_ps event: `set:signer_id`

@@ -268,9 +280,11 @@

### Callback Arguments:
### Callback Arguments
| Name | Type | Description |
|:----------------:|:--------------------------------------------------------------:|:---------------------------------------------------------------------------------------------------------------------------------------------------:|
| value | String | The `signer_id` that was set |
| value | String | The `signer_id` that was set |
| context | Site, BrowsewrapGroup or ClickwrapGroup | The Site or Group object on which the parameter was set. |
## <a name="onValid"></a> onValid
_ps event: `valid`

@@ -280,3 +294,4 @@

### Callback Arguments:
### Callback Arguments
| Name | Type | Description |

@@ -288,2 +303,3 @@ |:----------------:|:--------------------------------------------------------------:|:---------------------------------------------------------------------------------------------------------------------------------------------------:|

## <a name="onInvalid"></a> onInvalid
_ps event: `invalid`

@@ -293,3 +309,4 @@

### Callback Arguments:
### Callback Arguments
| Name | Type | Description |

@@ -301,2 +318,3 @@ |:----------------:|:--------------------------------------------------------------:|:---------------------------------------------------------------------------------------------------------------------------------------------------:|

## <a name="onRendered"></a> onRendered
_ps event: `rendered`

@@ -306,3 +324,4 @@

### Callback Arguments:
### Callback Arguments
| Name | Type | Description |

@@ -313,2 +332,3 @@ |:----------------:|:--------------------------------------------------------------:|:---------------------------------------------------------------------------------------------------------------------------------------------------:|

## <a name="onDisplayed"></a> onDisplayed
_ps event: `displayed`

@@ -318,3 +338,4 @@

### Callback Arguments:
### Callback Arguments
| Name | Type | Description |

@@ -326,2 +347,3 @@ |:----------------:|:--------------------------------------------------------------:|:---------------------------------------------------------------------------------------------------------------------------------------------------:|

## <a name="onScrolled"></a> onScrolled
_ps event: `scrolled`

@@ -331,3 +353,4 @@

### Callback Arguments:
### Callback Arguments
| Name | Type | Description |

@@ -338,4 +361,4 @@ |:----------------:|:--------------------------------------------------------------:|:---------------------------------------------------------------------------------------------------------------------------------------------------:|

## <a name="onScrolledContract"></a> onScrolledContract
## <a name="onScrolledContract"></a> onScrolledContract
_ps event: `scrolled:contract`

@@ -345,3 +368,4 @@

### Callback Arguments:
### Callback Arguments
| Name | Type | Description |

@@ -353,2 +377,3 @@ |:----------------:|:--------------------------------------------------------------:|:---------------------------------------------------------------------------------------------------------------------------------------------------:|

## <a name="onError"></a> onError
_ps event: `error`

@@ -358,3 +383,4 @@

### Callback Arguments:
### Callback Arguments
| Name | Type | Description |

@@ -368,3 +394,3 @@ |:-------------------:|:--------------------------------------------------------------:|:---------------------------------------------------------------------------------------------------------------------------------------------------:|

### PSBrowseWrap Props:
### PSBrowseWrap Props

@@ -377,9 +403,9 @@ (*Note you may have to scroll to the right to see the description*)

| `alwaysVisible` | bool | false | No | Keep the badge visible on the page at all times. If disabled, the badge will be hidden if the target link is visible on screen. |
| `badgeText` | string | value of `linkText` | No | Provide alternate text for the BrowseWrap badge |
| `groupKey` | string | null | Yes | PactSafe group key, this is found within the PactSafe Groups configuration. |
| `link` | string | null | If `openLegalCenter` is set to false | Location of where the BrowseWrap link should redirect to, should only be used if `openLegalCenter` is set to false, otherwise the link will open the group's PactSafe legal center |
| `linkText` | string | null | Yes | The text that your BrowseWrap link will display (for example, 'Legal Center' or 'Terms of Service') |
| `openLegalCenter` | bool | true | No | Open this group's legal center page when the badge or link is clicked. If enabled, the target link's original `href` will be replaced. |
| `position` | string.oneOf[`'middle'`, `'left'`, `'right'`, `'auto'`] | auto | Yes | Position of where the BrowseWrap badge will float within the browser window |
| `psScriptUrl` | string | '//vault.pactsafe.io/ps.min.js' | Yes | If using a custom (or development) version of the ps.js file, pass the file URL in here. You probably won't need to use this. |
| `badgeText` | string | value of `linkText` | No | Provide alternate text for the BrowseWrap badge |
| `groupKey` | string | null | Yes | PactSafe group key, this is found within the PactSafe Groups configuration. |
| `link` | string | null | If `openLegalCenter` is set to false | Location of where the BrowseWrap link should redirect to, should only be used if `openLegalCenter` is set to false, otherwise the link will open the group's PactSafe legal center |
| `linkText` | string | null | Yes | The text that your BrowseWrap link will display (for example, 'Legal Center' or 'Terms of Service') |
| `openLegalCenter` | bool | true | No | Open this group's legal center page when the badge or link is clicked. If enabled, the target link's original `href` will be replaced. |
| `position` | string.oneOf[`'middle'`, `'left'`, `'right'`, `'auto'`] | auto | Yes | Position of where the BrowseWrap badge will float within the browser window |
| `psScriptUrl` | string | '//vault.pactsafe.io/ps.min.js' | Yes | If using a custom (or development) version of the ps.js file, pass the file URL in here. You probably won't need to use this. |

@@ -390,5 +416,6 @@ ## Development (`src`, `lib` and the build process)

## License
[MIT License](LICENSE)
Copyright &copy; 2019 PactSafe.

@@ -395,0 +422,0 @@

@@ -1,3 +0,6 @@

/*! @pactsafe/pactsafe-react-sdk v2.4.7 - https://github.com/PactSafe/pactsafe-react-sdk */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.PSReactSDK=t(require("react")):e.PSReactSDK=t(e.React)}(window,function(e){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}([function(t,r){t.exports=e},function(e,t){e.exports={injectSnippet:function(e,t){!function(e,t,r,n,o,i,a,s,p,c,u){e.PactSafeObject=i,e[i]=e[i]||function(){(e[i].q=e[i].q||[]).push(arguments)},e[i].on=function(){(e[i].e=e[i].e||[]).push(arguments)},e[i].once=function(){(e[i].eo=e[i].eo||[]).push(arguments)},e[i].off=function(){(e[i].o=e[i].o||[]).push(arguments)},e[i].t=1*new Date,e[i].l=0,p=t.createElement(r),c=t.getElementsByTagName(r)[0],p.async=1,p.src=n,p.onload=p.onreadystatechange=function(){e[i].l=1},p.onerror=p.onabort=function(){e[i].l=0},c?c.parentNode.insertBefore(p,c):document.body.appendChild(p),setTimeout(function(){e[i].l||e[i].loaded||(e[i].error=1,(p=t.createElement(r)).async=1,p.src=o,p.onload=p.onreadystatechange=function(){e[i].l=1},p.onerror=p.onabort=function(){e[i].l=0},c.parentNode.insertBefore(p,c),(u=function(r,n){try{(n=t.createElement("img")).src="https://d3r8bdci515tjv.cloudfront.net/error.gif?t="+e[i].t+"&u="+encodeURIComponent(r),t.getElementsByTagName("body")[0].appendChild(n)}catch(e){}})(n),setTimeout(function(){e[i].l||e[i].loaded||(e[i].error=1,s&&s.call(this),u(o))},4e3))},4e3)}(window,document,"script",e,t,"_ps",0,function(){console.log("Unable to load the PactSafe PS.JS Library.")})},isSnippetLoaded:function(e){var t=document.getElementsByTagName("script");if(window._ps&&window._ps.loaded&&317===window._ps.realThang)return!0;for(var r=0;r<t.length;r+=1)if(-1!==t[r].src.indexOf(e))return!0;return!1}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e,t,r){return function(e,t){if("function"!=typeof e)throw new TypeError("The typeValidator argument must be a function with the signature function(props, propName, componentName).");if(t&&"string"!=typeof t)throw new TypeError("The error message is optional, but must be a string if provided.")}(e,r),function(n,o,i){for(var a=arguments.length,s=Array(3<a?a-3:0),p=3;p<a;p++)s[p-3]=arguments[p];return function(e,t,r,n){return"boolean"==typeof e?e:"function"==typeof e?e(t,r,n):!(1!=!!e||!e)}(t,n,o,i)?function(e,t){return Object.hasOwnProperty.call(e,t)}(n,o)?e.apply(void 0,[n,o,i].concat(s)):function(e,t,r,n){return n?new Error(n):new Error("Required "+e[t]+" `"+t+"` was not specified in `"+r+"`.")}(n,o,i,r):e.apply(void 0,[n,o,i].concat(s))}}},function(e,t,r){var n=r(5),o=r(6);e.exports=function(e,t,r){var i=t&&r||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||n)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var s=0;s<16;++s)t[i+s]=a[s];return t||o(a)}},function(e,t,r){e.exports=r(7)},function(e,t){var r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(r){var n=new Uint8Array(16);e.exports=function(){return r(n),n}}else{var o=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),o[t]=e>>>((3&t)<<3)&255;return o}}},function(e,t){for(var r=[],n=0;n<256;++n)r[n]=(n+256).toString(16).substr(1);e.exports=function(e,t){var n=t||0,o=r;return[o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]]].join("")}},function(e,t,r){"use strict";r.r(t);var n=r(0),o=r.n(n),i=(r(2),r(3)),a=r.n(i),s=r(1),p=r.n(s),c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};var u=function(e){function t(r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,r));n._isMounted=!1,n.createClickWrap=n.createClickWrap.bind(n),n.state={clickwrapGroupKey:null,dynamicGroup:!1},n.propsEventMap={onAll:"all",onSent:"sent",onRetrieved:"retrieved",onSet:"set",onSetSignerId:"set:signer_id",onValid:"valid",onInvalid:"invalid",onRendered:"rendered",onDisplayed:"displayed",onScrolledContract:"scrolled:contract",onScrolled:"scrolled",onError:"error"};var o=n.props,i=o.psScriptUrl,a=o.backupScriptURL,s=o.accessId,c=o.testMode,u=o.disableSending,l=o.dynamic,f=o.signerId,d=o.debug;return p.a.isSnippetLoaded(i,a)||p.a.injectSnippet(i,a),_ps("create",s,{test_mode:c,disable_sending:u,dynamic:l,signer_id:f}),d&&(_ps.debug=!0),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.componentDidMount=function(){this._isMounted=!0,this.createClickWrap()},t.prototype.componentDidUpdate=function(e){var t=this.props,r=t.clickWrapStyle,n=t.renderData,o=t.filter,i=t.groupKey,a=t.signerId,s=this.state,p=s.clickwrapGroupKey,c=s.dynamicGroup,u=_ps&&_ps.getByKey&&"function"==typeof _ps.getByKey&&p&&_ps.getByKey(p);r!==e.clickWrapStyle&&!c&&u&&(_ps.getByKey(p).site.set("style",r),_ps.getByKey(p).retrieveHTML()),n!==e.renderData&&(r&&u&&_ps.getByKey(p).site.set("style",r),_ps(p+":retrieveHTML",n)),a!==e.signerId&&(r&&u&&_ps.getByKey(p).site.set("style",r),_ps("set","signer_id",a)),r!==e.clickWrapStyle&&c&&this.createClickWrap(),o!==e.filter&&this.createClickWrap(),i===e.groupKey||c||(this.createClickWrap(),u&&_ps.getByKey(p).retrieveHTML())},t.prototype.componentWillUnmount=function(){this._isMounted=!1;var e=this.props.groupKey;_ps&&_ps.getByKey&&"function"==typeof _ps.getByKey&&_ps.getByKey(e)&&(_ps.getByKey(e).rendered&&(_ps.getByKey(e).rendered=!1),_ps.getByKey(e).resetData()),this.unregisterEventListeners()},t.prototype.registerEventListener=function(e,t){var r=this,n=function(){for(var n=arguments.length,o=Array(n),i=0;i<n;i++)o[i]=arguments[i];var a,s=!1;(o.forEach(function(e){e&&e.get&&e.get("key")&&e.get("key")===t?s=!0:e&&"[object Site]"===e.toString()&&(s=!0)}),s)&&(a=r.props)[e].apply(a,o)},o=a()();return n.toString=function(){return o},_ps.on(this.propsEventMap[e],n),n.toString()},t.prototype.registerEventListeners=function(e){var t=this,r={};Object.keys(this.propsEventMap).forEach(function(n){t.props[n]&&(r[t.propsEventMap[n]]=t.registerEventListener(n,e))}),this._isMounted&&this.setState({eventListeners:r})},t.prototype.unregisterEventListeners=function(){var e=this;this.state.eventListeners&&Object.keys(this.state.eventListeners).forEach(function(t){var r=e.state.eventListeners[t],n=function(){return r};n.toString=function(){return r},_ps.off(t,n)})},t.prototype.createClickWrap=function(){var e=this,t=this.props,r=t.filter,n=t.containerId,o=t.signerIdSelector,i=t.clickWrapStyle,a=t.displayAll,s=t.renderData,p=t.displayImmediately,u=t.forceScroll,l=t.groupKey,f={filter:r,container_selector:n,confirmation_email:t.confirmationEmail,signer_id_selector:o,style:i,display_all:a,render_data:s,auto_run:p,force_scroll:u};l&&this._isMounted&&this.setState({clickwrapGroupKey:l,dynamicGroup:!1});var d=!l,y=function(t,r){if(r){var n=l||r.get("key"),o={clickwrapGroupKey:n};d&&(o.dynamicGroup=!0),e._isMounted&&e.setState(o),d||r.render(),e.registerEventListeners(n)}};l?_ps("load",l,c({},f,{event_callback:y})):_ps("load",c({},f,{event_callback:y}))},t.prototype.render=function(){var e=this.props.containerId;return o.a.createElement("div",{id:e})},t}(o.a.Component);u.FILTER_OR_GROUPKEY_REQUIRED_ERROR_MESSAGE="PSClickWrap Error: You must provide either a groupKey or filter prop in order to use the PactSafe ClickWrap component!",u.MUST_PROVIDE_RENDER_DATA_ERROR_MESSAGE="PSClickWrap Error: You must provide a renderData prop when passing down the dynamic prop",u.MUST_PROVIDE_SIGNER_ID_OR_SIGNER_ID_SELECTOR="PSClickWrap Error: You must provide either a signer ID or a signer ID selector",u.defaultProps={psScriptUrl:"//vault.pactsafe.io/ps.min.js",backupScriptURL:"//d3l1mqnl5xpsuc.cloudfront.net/ps.min.js",containerId:"ps-clickwrap",displayImmediately:!0,disableSending:!1,displayAll:!0,dynamic:!1,testMode:!1};var l=u;var f=function(e){function t(r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,r)),o=n.props,i=o.psScriptUrl,a=o.groupKey,s=o.accessId;return p.a.isSnippetLoaded(i)||p.a.injectSnippet(i),n.targetSelector="psbw-"+a,_ps("create",s),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.componentDidMount=function(){var e=this.props,t=e.groupKey,r=e.position,n=e.badgeText,o=e.alwaysVisible,i=e.openLegalCenter;_ps("load",t,{target_selector:this.targetSelector,position:r,badge_text:n,always_visible:o,open_legal_center:i})},t.prototype.componentWillUnmount=function(){var e=this.props.groupKey;_ps.getByKey(e).rendered=!1},t.prototype.isSnippetLoaded=function(){for(var e=this.props.psScriptUrl,t=document.getElementsByTagName("script"),r=0;r<t.length;r+=1)if(-1!==t[r].src.indexOf(e))return!0;return!1},t.prototype.render=function(){var e=this.props,t=e.link,r=e.linkText;return o.a.createElement("a",{href:t,id:this.targetSelector},r)},t}(o.a.Component);f.MUST_PROVIDE_LINK_IF_OPEN_LEGAL_CENTER_FALSE="PSBrowseWrap Error: You must provide a link prop if openLegalCenter is passed false",f.defaultProps={psScriptUrl:"//vault.pactsafe.io/ps.min.js",position:"auto",link:"#",openLegalCenter:!0};var d=f;r.d(t,"PSClickWrap",function(){return l}),r.d(t,"PSBrowseWrap",function(){return d})}]).default});
/*!
* @pactsafe/pactsafe-react-sdk v2.4.8 - https://github.com/PactSafe/pactsafe-react-sdk
* MIT Licensed
*/
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.PSReactSDK=e(require("react")):t.PSReactSDK=e(t.React)}(window,function(t){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=5)}([function(e,r){e.exports=t},function(t,e){t.exports={injectSnippet:function(t,e){!function(t,e,r,n,o,i,a,c,s,u,p){t.PactSafeObject=i,t[i]=t[i]||function(){(t[i].q=t[i].q||[]).push(arguments)},t[i].on=function(){(t[i].e=t[i].e||[]).push(arguments)},t[i].once=function(){(t[i].eo=t[i].eo||[]).push(arguments)},t[i].off=function(){(t[i].o=t[i].o||[]).push(arguments)},t[i].t=1*new Date,t[i].l=0,s=e.createElement(r),u=e.getElementsByTagName(r)[0],s.async=1,s.src=n,s.onload=s.onreadystatechange=function(){t[i].l=1},s.onerror=s.onabort=function(){t[i].l=0},u?u.parentNode.insertBefore(s,u):document.body.appendChild(s),setTimeout(function(){t[i].l||t[i].loaded||(t[i].error=1,(s=e.createElement(r)).async=1,s.src=o,s.onload=s.onreadystatechange=function(){t[i].l=1},s.onerror=s.onabort=function(){t[i].l=0},u.parentNode.insertBefore(s,u),(p=function(r,n){try{(n=e.createElement("img")).src="https://d3r8bdci515tjv.cloudfront.net/error.gif?t="+t[i].t+"&u="+encodeURIComponent(r),e.getElementsByTagName("body")[0].appendChild(n)}catch(t){}})(n),setTimeout(function(){t[i].l||t[i].loaded||(t[i].error=1,c&&c.call(this),p(o))},4e3))},4e3)}(window,document,"script",t,e,"_ps",0,function(){console.log("Unable to load the PactSafe PS.JS Library.")})},isSnippetLoaded:function(t){var e=document.getElementsByTagName("script");if(window._ps&&window._ps.loaded&&317===window._ps.realThang)return!0;for(var r=0;r<e.length;r+=1)if(-1!==e[r].src.indexOf(t))return!0;return!1}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t,e,r){return function(t,e){if("function"!=typeof t)throw new TypeError("The typeValidator argument must be a function with the signature function(props, propName, componentName).");if(e&&"string"!=typeof e)throw new TypeError("The error message is optional, but must be a string if provided.")}(t,r),function(n,o,i){for(var a=arguments.length,c=Array(3<a?a-3:0),s=3;s<a;s++)c[s-3]=arguments[s];return function(t,e,r,n){return"boolean"==typeof t?t:"function"==typeof t?t(e,r,n):!(1!=!!t||!t)}(e,n,o,i)?function(t,e){return Object.hasOwnProperty.call(t,e)}(n,o)?t.apply(void 0,[n,o,i].concat(c)):function(t,e,r,n){return n?new Error(n):new Error("Required "+t[e]+" `"+e+"` was not specified in `"+r+"`.")}(n,o,i,r):t.apply(void 0,[n,o,i].concat(c))}}},function(t,e,r){var n=r(6),o=r(7);t.exports=function(t,e,r){var i=e&&r||0;"string"==typeof t&&(e="binary"===t?new Array(16):null,t=null);var a=(t=t||{}).random||(t.rng||n)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,e)for(var c=0;c<16;++c)e[i+c]=a[c];return e||o(a)}},function(t,e,r){(function(t,r){var n=200,o="__lodash_hash_undefined__",i=1,a=2,c=9007199254740991,s="[object Arguments]",u="[object Array]",p="[object AsyncFunction]",f="[object Boolean]",l="[object Date]",d="[object Error]",y="[object Function]",_="[object GeneratorFunction]",h="[object Map]",v="[object Number]",b="[object Null]",g="[object Object]",m="[object Proxy]",j="[object RegExp]",w="[object Set]",S="[object String]",E="[object Symbol]",O="[object Undefined]",k="[object ArrayBuffer]",P="[object DataView]",R=/^\[object .+?Constructor\]$/,A=/^(?:0|[1-9]\d*)$/,L={};L["[object Float32Array]"]=L["[object Float64Array]"]=L["[object Int8Array]"]=L["[object Int16Array]"]=L["[object Int32Array]"]=L["[object Uint8Array]"]=L["[object Uint8ClampedArray]"]=L["[object Uint16Array]"]=L["[object Uint32Array]"]=!0,L[s]=L[u]=L[k]=L[f]=L[P]=L[l]=L[d]=L[y]=L[h]=L[v]=L[g]=L[j]=L[w]=L[S]=L["[object WeakMap]"]=!1;var M="object"==typeof t&&t&&t.Object===Object&&t,T="object"==typeof self&&self&&self.Object===Object&&self,x=M||T||Function("return this")(),I="object"==typeof e&&e&&!e.nodeType&&e,C=I&&"object"==typeof r&&r&&!r.nodeType&&r,K=C&&C.exports===I,B=K&&M.process,D=function(){try{return B&&B.binding&&B.binding("util")}catch(t){}}(),z=D&&D.isTypedArray;function U(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}function W(t,e){return t.has(e)}function N(t){var e=-1,r=Array(t.size);return t.forEach(function(t,n){r[++e]=[n,t]}),r}function G(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=t}),r}var V=Array.prototype,F=Function.prototype,$=Object.prototype,q=x["__core-js_shared__"],Y=F.toString,H=$.hasOwnProperty,J=function(){var t=/[^.]+$/.exec(q&&q.keys&&q.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Q=$.toString,X=RegExp("^"+Y.call(H).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Z=K?x.Buffer:void 0,tt=x.Symbol,et=x.Uint8Array,rt=$.propertyIsEnumerable,nt=V.splice,ot=tt?tt.toStringTag:void 0,it=Object.getOwnPropertySymbols,at=Z?Z.isBuffer:void 0,ct=function(t,e){return function(r){return t(e(r))}}(Object.keys,Object),st=Kt(x,"DataView"),ut=Kt(x,"Map"),pt=Kt(x,"Promise"),ft=Kt(x,"Set"),lt=Kt(x,"WeakMap"),dt=Kt(Object,"create"),yt=Ut(st),_t=Ut(ut),ht=Ut(pt),vt=Ut(ft),bt=Ut(lt),gt=tt?tt.prototype:void 0,mt=gt?gt.valueOf:void 0;function jt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function wt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function St(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Et(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new St;++e<r;)this.add(t[e])}function Ot(t){var e=this.__data__=new wt(t);this.size=e.size}function kt(t,e){var r=Gt(t),n=!r&&Nt(t),o=!r&&!n&&Vt(t),i=!r&&!n&&!o&&Ht(t),a=r||n||o||i,c=a?function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}(t.length,String):[],s=c.length;for(var u in t)!e&&!H.call(t,u)||a&&("length"==u||o&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||zt(u,s))||c.push(u);return c}function Pt(t,e){for(var r=t.length;r--;)if(Wt(t[r][0],e))return r;return-1}function Rt(t){return null==t?void 0===t?O:b:ot&&ot in Object(t)?function(t){var e=H.call(t,ot),r=t[ot];try{t[ot]=void 0;var n=!0}catch(t){}var o=Q.call(t);n&&(e?t[ot]=r:delete t[ot]);return o}(t):function(t){return Q.call(t)}(t)}function At(t){return Yt(t)&&Rt(t)==s}function Lt(t,e,r,n,o){return t===e||(null==t||null==e||!Yt(t)&&!Yt(e)?t!=t&&e!=e:function(t,e,r,n,o,c){var p=Gt(t),y=Gt(e),_=p?u:Dt(t),b=y?u:Dt(e),m=(_=_==s?g:_)==g,O=(b=b==s?g:b)==g,R=_==b;if(R&&Vt(t)){if(!Vt(e))return!1;p=!0,m=!1}if(R&&!m)return c||(c=new Ot),p||Ht(t)?xt(t,e,r,n,o,c):function(t,e,r,n,o,c,s){switch(r){case P:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case k:return!(t.byteLength!=e.byteLength||!c(new et(t),new et(e)));case f:case l:case v:return Wt(+t,+e);case d:return t.name==e.name&&t.message==e.message;case j:case S:return t==e+"";case h:var u=N;case w:var p=n&i;if(u||(u=G),t.size!=e.size&&!p)return!1;var y=s.get(t);if(y)return y==e;n|=a,s.set(t,e);var _=xt(u(t),u(e),n,o,c,s);return s.delete(t),_;case E:if(mt)return mt.call(t)==mt.call(e)}return!1}(t,e,_,r,n,o,c);if(!(r&i)){var A=m&&H.call(t,"__wrapped__"),L=O&&H.call(e,"__wrapped__");if(A||L){var M=A?t.value():t,T=L?e.value():e;return c||(c=new Ot),o(M,T,r,n,c)}}if(!R)return!1;return c||(c=new Ot),function(t,e,r,n,o,a){var c=r&i,s=It(t),u=s.length,p=It(e).length;if(u!=p&&!c)return!1;for(var f=u;f--;){var l=s[f];if(!(c?l in e:H.call(e,l)))return!1}var d=a.get(t);if(d&&a.get(e))return d==e;var y=!0;a.set(t,e),a.set(e,t);for(var _=c;++f<u;){l=s[f];var h=t[l],v=e[l];if(n)var b=c?n(v,h,l,e,t,a):n(h,v,l,t,e,a);if(!(void 0===b?h===v||o(h,v,r,n,a):b)){y=!1;break}_||(_="constructor"==l)}if(y&&!_){var g=t.constructor,m=e.constructor;g!=m&&"constructor"in t&&"constructor"in e&&!("function"==typeof g&&g instanceof g&&"function"==typeof m&&m instanceof m)&&(y=!1)}return a.delete(t),a.delete(e),y}(t,e,r,n,o,c)}(t,e,r,n,Lt,o))}function Mt(t){return!(!qt(t)||function(t){return!!J&&J in t}(t))&&(Ft(t)?X:R).test(Ut(t))}function Tt(t){if(!function(t){var e=t&&t.constructor,r="function"==typeof e&&e.prototype||$;return t===r}(t))return ct(t);var e=[];for(var r in Object(t))H.call(t,r)&&"constructor"!=r&&e.push(r);return e}function xt(t,e,r,n,o,c){var s=r&i,u=t.length,p=e.length;if(u!=p&&!(s&&p>u))return!1;var f=c.get(t);if(f&&c.get(e))return f==e;var l=-1,d=!0,y=r&a?new Et:void 0;for(c.set(t,e),c.set(e,t);++l<u;){var _=t[l],h=e[l];if(n)var v=s?n(h,_,l,e,t,c):n(_,h,l,t,e,c);if(void 0!==v){if(v)continue;d=!1;break}if(y){if(!U(e,function(t,e){if(!W(y,e)&&(_===t||o(_,t,r,n,c)))return y.push(e)})){d=!1;break}}else if(_!==h&&!o(_,h,r,n,c)){d=!1;break}}return c.delete(t),c.delete(e),d}function It(t){return function(t,e,r){var n=e(t);return Gt(t)?n:function(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}(n,r(t))}(t,Jt,Bt)}function Ct(t,e){var r=t.__data__;return function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}(e)?r["string"==typeof e?"string":"hash"]:r.map}function Kt(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return Mt(r)?r:void 0}jt.prototype.clear=function(){this.__data__=dt?dt(null):{},this.size=0},jt.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},jt.prototype.get=function(t){var e=this.__data__;if(dt){var r=e[t];return r===o?void 0:r}return H.call(e,t)?e[t]:void 0},jt.prototype.has=function(t){var e=this.__data__;return dt?void 0!==e[t]:H.call(e,t)},jt.prototype.set=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=dt&&void 0===e?o:e,this},wt.prototype.clear=function(){this.__data__=[],this.size=0},wt.prototype.delete=function(t){var e=this.__data__,r=Pt(e,t);return!(r<0||(r==e.length-1?e.pop():nt.call(e,r,1),--this.size,0))},wt.prototype.get=function(t){var e=this.__data__,r=Pt(e,t);return r<0?void 0:e[r][1]},wt.prototype.has=function(t){return Pt(this.__data__,t)>-1},wt.prototype.set=function(t,e){var r=this.__data__,n=Pt(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this},St.prototype.clear=function(){this.size=0,this.__data__={hash:new jt,map:new(ut||wt),string:new jt}},St.prototype.delete=function(t){var e=Ct(this,t).delete(t);return this.size-=e?1:0,e},St.prototype.get=function(t){return Ct(this,t).get(t)},St.prototype.has=function(t){return Ct(this,t).has(t)},St.prototype.set=function(t,e){var r=Ct(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this},Et.prototype.add=Et.prototype.push=function(t){return this.__data__.set(t,o),this},Et.prototype.has=function(t){return this.__data__.has(t)},Ot.prototype.clear=function(){this.__data__=new wt,this.size=0},Ot.prototype.delete=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},Ot.prototype.get=function(t){return this.__data__.get(t)},Ot.prototype.has=function(t){return this.__data__.has(t)},Ot.prototype.set=function(t,e){var r=this.__data__;if(r instanceof wt){var o=r.__data__;if(!ut||o.length<n-1)return o.push([t,e]),this.size=++r.size,this;r=this.__data__=new St(o)}return r.set(t,e),this.size=r.size,this};var Bt=it?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var r=-1,n=null==t?0:t.length,o=0,i=[];++r<n;){var a=t[r];e(a,r,t)&&(i[o++]=a)}return i}(it(t),function(e){return rt.call(t,e)}))}:function(){return[]},Dt=Rt;function zt(t,e){return!!(e=null==e?c:e)&&("number"==typeof t||A.test(t))&&t>-1&&t%1==0&&t<e}function Ut(t){if(null!=t){try{return Y.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Wt(t,e){return t===e||t!=t&&e!=e}(st&&Dt(new st(new ArrayBuffer(1)))!=P||ut&&Dt(new ut)!=h||pt&&"[object Promise]"!=Dt(pt.resolve())||ft&&Dt(new ft)!=w||lt&&"[object WeakMap]"!=Dt(new lt))&&(Dt=function(t){var e=Rt(t),r=e==g?t.constructor:void 0,n=r?Ut(r):"";if(n)switch(n){case yt:return P;case _t:return h;case ht:return"[object Promise]";case vt:return w;case bt:return"[object WeakMap]"}return e});var Nt=At(function(){return arguments}())?At:function(t){return Yt(t)&&H.call(t,"callee")&&!rt.call(t,"callee")},Gt=Array.isArray;var Vt=at||function(){return!1};function Ft(t){if(!qt(t))return!1;var e=Rt(t);return e==y||e==_||e==p||e==m}function $t(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=c}function qt(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Yt(t){return null!=t&&"object"==typeof t}var Ht=z?function(t){return function(e){return t(e)}}(z):function(t){return Yt(t)&&$t(t.length)&&!!L[Rt(t)]};function Jt(t){return function(t){return null!=t&&$t(t.length)&&!Ft(t)}(t)?kt(t):Tt(t)}r.exports=function(t,e){return Lt(t,e)}}).call(this,r(8),r(9)(t))},function(t,e,r){t.exports=r(10)},function(t,e){var r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(r){var n=new Uint8Array(16);t.exports=function(){return r(n),n}}else{var o=new Array(16);t.exports=function(){for(var t,e=0;e<16;e++)0==(3&e)&&(t=4294967296*Math.random()),o[e]=t>>>((3&e)<<3)&255;return o}}},function(t,e){for(var r=[],n=0;n<256;++n)r[n]=(n+256).toString(16).substr(1);t.exports=function(t,e){var n=e||0,o=r;return[o[t[n++]],o[t[n++]],o[t[n++]],o[t[n++]],"-",o[t[n++]],o[t[n++]],"-",o[t[n++]],o[t[n++]],"-",o[t[n++]],o[t[n++]],"-",o[t[n++]],o[t[n++]],o[t[n++]],o[t[n++]],o[t[n++]],o[t[n++]]].join("")}},function(t,e){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,r){"use strict";r.r(e);var n=r(0),o=r.n(n),i=(r(2),r(3)),a=r.n(i),c=r(4),s=r.n(c),u=r(1),p=r.n(u),f=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};var l=function(t){function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r));n._isMounted=!1,n.createClickWrap=n.createClickWrap.bind(n),n.state={clickwrapGroupKey:null,dynamicGroup:!1},n.propsEventMap={onAll:"all",onSent:"sent",onRetrieved:"retrieved",onSet:"set",onSetSignerId:"set:signer_id",onValid:"valid",onInvalid:"invalid",onRendered:"rendered",onDisplayed:"displayed",onScrolledContract:"scrolled:contract",onScrolled:"scrolled",onError:"error"};var o=n.props,i=o.psScriptUrl,a=o.backupScriptURL,c=o.accessId,s=o.testMode,u=o.disableSending,f=o.dynamic,l=o.signerId,d=o.debug;return p.a.isSnippetLoaded(i,a)||p.a.injectSnippet(i,a),_ps("create",c,{test_mode:s,disable_sending:u,dynamic:f,signer_id:l}),d&&(_ps.debug=!0),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.componentDidMount=function(){this._isMounted=!0,this.createClickWrap()},e.prototype.componentDidUpdate=function(t){var e=this.props,r=e.clickWrapStyle,n=e.renderData,o=e.filter,i=e.groupKey,a=e.signerId,c=this.state,u=c.clickwrapGroupKey,p=c.dynamicGroup,f=_ps&&_ps.getByKey&&"function"==typeof _ps.getByKey&&u&&_ps.getByKey(u);r!==t.clickWrapStyle&&!p&&f&&(_ps.getByKey(u).site.set("style",r),_ps.getByKey(u).retrieveHTML()),s()(n,t.renderData)||(r&&f&&_ps.getByKey(u).site.set("style",r),_ps(u+":retrieveHTML",n)),a!==t.signerId&&(r&&f&&_ps.getByKey(u).site.set("style",r),_ps("set","signer_id",a)),r!==t.clickWrapStyle&&p&&this.createClickWrap(),o!==t.filter&&this.createClickWrap(),i===t.groupKey||p||(this.createClickWrap(),f&&_ps.getByKey(u).retrieveHTML())},e.prototype.componentWillUnmount=function(){this._isMounted=!1;var t=this.props.groupKey;_ps&&_ps.getByKey&&"function"==typeof _ps.getByKey&&_ps.getByKey(t)&&(_ps.getByKey(t).rendered&&(_ps.getByKey(t).rendered=!1),_ps.getByKey(t).resetData()),this.unregisterEventListeners()},e.prototype.registerEventListener=function(t,e){var r=this,n=function(){for(var n=arguments.length,o=Array(n),i=0;i<n;i++)o[i]=arguments[i];var a,c=!1;(o.forEach(function(t){t&&t.get&&t.get("key")&&t.get("key")===e?c=!0:t&&"[object Site]"===t.toString()&&(c=!0)}),c)&&(a=r.props)[t].apply(a,o)},o=a()();return n.toString=function(){return o},_ps.on(this.propsEventMap[t],n),n.toString()},e.prototype.registerEventListeners=function(t){var e=this,r={};Object.keys(this.propsEventMap).forEach(function(n){e.props[n]&&(r[e.propsEventMap[n]]=e.registerEventListener(n,t))}),this._isMounted&&this.setState({eventListeners:r})},e.prototype.unregisterEventListeners=function(){var t=this;this.state.eventListeners&&Object.keys(this.state.eventListeners).forEach(function(e){var r=t.state.eventListeners[e],n=function(){return r};n.toString=function(){return r},_ps.off(e,n)})},e.prototype.createClickWrap=function(){var t=this,e=this.props,r=e.filter,n=e.containerId,o=e.signerIdSelector,i=e.clickWrapStyle,a=e.displayAll,c=e.renderData,s=e.displayImmediately,u=e.forceScroll,p=e.groupKey,l={filter:r,container_selector:n,confirmation_email:e.confirmationEmail,signer_id_selector:o,style:i,display_all:a,render_data:c,auto_run:s,force_scroll:u};p&&this._isMounted&&this.setState({clickwrapGroupKey:p,dynamicGroup:!1});var d=!p,y=function(e,r){if(r){var n=p||r.get("key"),o={clickwrapGroupKey:n};d&&(o.dynamicGroup=!0),t._isMounted&&t.setState(o),d||r.render(),t.registerEventListeners(n)}};p?_ps("load",p,f({},l,{event_callback:y})):_ps("load",f({},l,{event_callback:y}))},e.prototype.render=function(){var t=this.props.containerId;return o.a.createElement("div",{id:t})},e}(o.a.Component);l.FILTER_OR_GROUPKEY_REQUIRED_ERROR_MESSAGE="PSClickWrap Error: You must provide either a groupKey or filter prop in order to use the PactSafe ClickWrap component!",l.MUST_PROVIDE_RENDER_DATA_ERROR_MESSAGE="PSClickWrap Error: You must provide a renderData prop when passing down the dynamic prop",l.MUST_PROVIDE_SIGNER_ID_OR_SIGNER_ID_SELECTOR="PSClickWrap Error: You must provide either a signer ID or a signer ID selector",l.defaultProps={psScriptUrl:"//vault.pactsafe.io/ps.min.js",backupScriptURL:"//d3l1mqnl5xpsuc.cloudfront.net/ps.min.js",containerId:"ps-clickwrap",displayImmediately:!0,disableSending:!1,displayAll:!0,dynamic:!1,testMode:!1};var d=l;var y=function(t){function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r)),o=n.props,i=o.psScriptUrl,a=o.groupKey,c=o.accessId;return p.a.isSnippetLoaded(i)||p.a.injectSnippet(i),n.targetSelector="psbw-"+a,_ps("create",c),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.componentDidMount=function(){var t=this.props,e=t.groupKey,r=t.position,n=t.badgeText,o=t.alwaysVisible,i=t.openLegalCenter;_ps("load",e,{target_selector:this.targetSelector,position:r,badge_text:n,always_visible:o,open_legal_center:i})},e.prototype.componentWillUnmount=function(){var t=this.props.groupKey;_ps.getByKey(t).rendered=!1},e.prototype.isSnippetLoaded=function(){for(var t=this.props.psScriptUrl,e=document.getElementsByTagName("script"),r=0;r<e.length;r+=1)if(-1!==e[r].src.indexOf(t))return!0;return!1},e.prototype.render=function(){var t=this.props,e=t.link,r=t.linkText;return o.a.createElement("a",{href:e,id:this.targetSelector},r)},e}(o.a.Component);y.MUST_PROVIDE_LINK_IF_OPEN_LEGAL_CENTER_FALSE="PSBrowseWrap Error: You must provide a link prop if openLegalCenter is passed false",y.defaultProps={psScriptUrl:"//vault.pactsafe.io/ps.min.js",position:"auto",link:"#",openLegalCenter:!0};var _=y;r.d(e,"PSClickWrap",function(){return d}),r.d(e,"PSBrowseWrap",function(){return _})}]).default});
//# sourceMappingURL=pactsafe-react-sdk.min.js.map

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

Sorry, the diff of this file is not supported yet

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