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ACtDxK,OAAekU,kBAAoBA,C","sources":["webpack://@vpay/VerifiedPay/./src/WebHelpers.ts","webpack://@vpay/VerifiedPay/./src/VerifiedPay.ts","webpack://@vpay/VerifiedPay/./src/AbstractModule.ts","webpack://@vpay/VerifiedPay/./src/structs/PaymentButtonID.ts","webpack://@vpay/VerifiedPay/./src/structs/PaymentMap.ts","webpack://@vpay/VerifiedPay/./src/admin/AdminControls.ts","webpack://@vpay/VerifiedPay/./src/Gateway.ts","webpack://@vpay/VerifiedPay/./src/admin/Tooltips.ts","webpack://@vpay/VerifiedPay/./src/Payment.ts","webpack://@vpay/VerifiedPay/./src/structs/PaymentResponse.ts","webpack://@vpay/VerifiedPay/webpack/bootstrap","webpack://@vpay/VerifiedPay/./index.ts"],"sourcesContent":["import {BrowserWindow} from \"./types\";\n\nexport interface WebHelpersConfig {\n cookieLifeDays: number;\n cookiePath: string;\n siteUrl: string;\n\n // DOM ids of elements of cookie consent message\n consentCookieName: string;\n confirmCookiesMsg: string;\n confirmCookiesBtn: string;\n}\n\nexport class WebHelpers {\n public readonly window: BrowserWindow;\n public readonly $: JQueryStatic;\n\n protected config: WebHelpersConfig;\n protected cssSelectors: string[] = [];\n\n constructor(window: BrowserWindow, $: JQueryStatic, config: WebHelpersConfig) {\n this.window = window;\n this.$ = $;\n this.config = config;\n }\n\n public getBrowserLang() {\n return this.window.navigator.language.substr(0, 2).toLowerCase();\n }\n\n public getCookie(c_name: string) {\n let i, x, y;\n let ARRcookies = this.window.document.cookie.split(\";\");\n for (i = 0; i < ARRcookies.length; i++)\n {\n x = ARRcookies[i].substr(0, ARRcookies[i].indexOf(\"=\"));\n y = ARRcookies[i].substr(ARRcookies[i].indexOf(\"=\") + 1);\n x = x.replace(/^\\s+|\\s+$/g,\"\");\n if (x == c_name)\n return decodeURI(y);\n }\n return null;\n }\n\n public setCookie(name: string, value: any, expireDays: number) {\n let date = new Date();\n date = new Date(date.getTime()+1000*60*60*24* (expireDays ? expireDays : this.config.cookieLifeDays));\n //document.cookie = name + \"=\" + value + \"; expires=\" + date.toGMTString() + \"; path=\" + pageData.cookiePath + \"; domain=.\" + location.host;\n this.window.document.cookie = name + \"=\" + value + \"; expires=\" + date.toUTCString() + \"; path=\" + this.config.cookiePath;\n }\n\n public removeCookie(name: string) {\n //document.cookie = name + \"=; expires=Thu, 02 Jan 1970 00:00:00 UTC; path=\" + pageData.cookiePath + \"; domain=.\" + location.host;\n this.window.document.cookie = name + \"=; expires=Thu, 02 Jan 1970 00:00:00 UTC; path=\" + this.config.cookiePath;\n }\n\n public checkCookieConsent() {\n this.$(this.config.confirmCookiesBtn).click(() => {\n this.confirmCookies();\n });\n if (this.getCookie(this.config.consentCookieName) !== null)\n this.$(this.config.confirmCookiesMsg).remove(); // we recently showed the cookie confirm message. some pages might still be in browser cache\n }\n\n public fromBase64(data: string) {\n if (typeof this.window.atob !== \"function\") {\n this.window.console.error(\"Base64 decoding is not supported in your browser\");\n return \"\";\n }\n return this.window.atob(data);\n }\n\n public toBase64(data: string) {\n if (typeof this.window.btoa !== \"function\") {\n this.window.console.error(\"Base64 encoding is not supported in your browser\");\n return \"\";\n }\n return this.window.btoa(data);\n }\n\n /**\n * Populate a html template\n * @param text {String}: The html template (or just normal text with variables)\n * @param variables {Object}: the key-value pairs with variables names and their content to be set in text\n * @param safeHtml {boolean, default false}: don't escape html characters if set to true\n * @returns {String} the translated html\n */\n public translate(text: string, variables: any, safeHtml: boolean = false) {\n if (typeof text !== \"string\") {\n try {\n // @ts-ignore\n text = text.toString();\n }\n catch (e) {\n this.log(\"Text to translate is not a string\");\n return text;\n }\n }\n let start = 0, end = 0;\n while ((start = text.indexOf(\"{\", start)) !== -1)\n {\n if (start > 0 && text.charAt(start-1) === \"\\\\\") { // escaped javascript code beginning\n start++;\n continue;\n }\n end = text.indexOf(\"}\", start);\n if (end === -1) {\n this.log(\"Can not find end position while translating HTML\");\n break;\n }\n let placeHolder = text.substring(start+1, end);\n let translation = null;\n if (placeHolder.substring(0, 3) === \"tr:\") {\n let key = placeHolder.substring(3);\n //translation = this.tr(key.toUpperCase());\n translation = this.tr(key);\n }\n else if (typeof variables === \"object\") {\n let textPiece = variables[placeHolder];\n if (typeof textPiece !== \"undefined\") {\n if (typeof safeHtml === \"boolean\" && safeHtml)\n translation = textPiece;\n else\n translation = this.escapeOutput(textPiece);\n }\n }\n if (translation !== null) {\n let reg = new RegExp(\"\\\\{\" + placeHolder + \"\\\\}\", \"g\");\n text = text.replace(reg, translation);\n }\n else if (placeHolder.match(\"^[A-Za-z0-9_]+$\") !== null) {\n this.log(\"No translation found for place holder: \" + placeHolder);\n let reg = new RegExp(\"\\\\{\" + placeHolder + \"\\\\}\", \"g\");\n text = text.replace(reg, \"MISSING: \" + this.escapeOutput(placeHolder));\n }\n else\n start += placeHolder.length;\n }\n text = text.replace(/\\\\\\\\\\\\{/, \"{\");\n return text;\n }\n\n public escapeOutput(text: string, convertNewlines: boolean = true) {\n if (typeof text !== \"string\")\n return text;\n text = text.replace(/&/g, \"&\").replace(//g, \">\").replace(/\"/g, \""\").replace(/'/g, \"'\");\n if (typeof convertNewlines === \"undefined\" || convertNewlines === true)\n text = text.replace(/\\r?\\n/g, \"
\");\n return text;\n }\n\n public escapeRegex(str: string) {\n return str.replace(/[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g, \"\\\\$&\");\n }\n\n public tr(key: string) {\n //if (typeof language[key] === \"undefined\")\n //return \"MISSING: \" + key;\n //return language[key];\n //return i18next.t(key) // will just print the key if it doesn't exist and debug is disabled\n return key; // we don't have client-side translation support on this WP plugin yet. just return the key // TODO do we need this if we make our plugin use more ajax?\n }\n\n public log(args) {\n if (//typeof pageData.debugLog !== \"boolean\" || pageData.debugLog === false || // TODO add in CashTipprConfig\n typeof this.window.console !== \"object\" || typeof this.window.console.log !== \"function\")\n return;\n this.window.console.log(arguments);\n }\n\n public isAppleIOS() {\n // https://stackoverflow.com/questions/9038625/detect-if-device-is-ios\n return /iPad|iPhone|iPod/.test(this.window.navigator.userAgent) && !(this.window as any).MSStream;\n }\n\n public getAllCssSelectors(cached = true): string[] {\n if (cached === true && this.cssSelectors.length !== 0)\n return this.cssSelectors;\n\n this.cssSelectors = [];\n try {\n const originRegex = new RegExp(\"^\" + this.escapeRegex(this.window.document.location.origin), \"i\");\n for (let i = 0; i < this.window.document.styleSheets.length; i++)\n {\n const sheet: any = this.window.document.styleSheets[i];\n if (sheet.href && originRegex.test(sheet.href) === false)\n continue; // can't access it\n if (sheet.rules) {\n for (let u = 0; u < sheet.rules.length; u++)\n {\n if (sheet.rules[u].selectorText)\n this.cssSelectors.push(sheet.rules[u].selectorText);\n }\n }\n if (sheet.imports) {\n for (let x = 0; x < sheet.imports.length; x++)\n {\n for (let u = 0; u < sheet.imports[x].rules.length; u++)\n {\n if (sheet.imports[x].rules[u].selectorText)\n this.cssSelectors.push(sheet.imports[x].rules[u].selectorText);\n }\n }\n }\n }\n }\n catch (err) {\n this.window.console.error(\"Error getting CSS selectors\", err);\n }\n return this.cssSelectors;\n }\n\n public isExistingCssSelector(selector: string): boolean {\n const selectors = this.getAllCssSelectors();\n for (let i = 0; i < selectors.length; i++)\n {\n if (selectors[i] === selector) // css props case insensitive, class names in HTML case sensitive\n return true;\n }\n return false;\n }\n\n // ################################################################\n // ###################### PRIVATE FUNCTIONS #######################\n\n protected confirmCookies() {\n /* // no data stored in session\n this.getApi('/json/cookies', function(data) {\n if (data.error)\n //Hlp.showMsg(i18next.t('errorSending'), 'danger');\n console.error(\"Error sending data\");\n else {\n }\n })\n */\n this.$(this.config.confirmCookiesMsg).remove();\n this.setCookie(this.config.consentCookieName, \"1\", this.config.cookieLifeDays);\n }\n\n public getApi(path: string, data?: any, callback?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any, dataType?: string) {\n if (typeof data === \"function\") {\n callback = data;\n data = null;\n }\n else if (data === undefined)\n data = null;\n let url = this.fixRelativeUrl(path);\n return this.$.get(url, data, (data, textStatus, jqXHR) => {\n callback(data, textStatus, jqXHR);\n }, dataType);\n }\n\n public postApi(path: string, data?: any, callback?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any, dataType?: string) {\n let url = this.fixRelativeUrl(path);\n return this.$.post(url, data, (data, textStatus, jqXHR) => {\n callback(data, textStatus, jqXHR);\n }, dataType);\n }\n\n protected fixRelativeUrl(url: string): string {\n if (url.toLowerCase().indexOf(\"http\") === 0)\n return url; // already a full url\n let fullUrl = this.config.siteUrl;\n if (url.length !== 0 && url[0] === \"/\" && fullUrl[fullUrl.length-1] === \"/\")\n fullUrl = fullUrl.substr(0, fullUrl.length-1); // avoid duplicate //\n fullUrl += url;\n return fullUrl;\n }\n}\n","import {Tooltips} from \"./admin/Tooltips\";\nimport {WebHelpers, WebHelpersConfig} from \"./WebHelpers\";\nimport {Payment} from \"./Payment\";\nimport {AdminControls} from \"./admin/AdminControls\";\nimport {BrowserWindow} from \"./types\";\n\nexport interface VerifiedPayConfig extends WebHelpersConfig {\n cookieLifeDays: number;\n cookiePath: string;\n siteUrl: string;\n gatewayOrigin: string;\n frameUrl: string;\n reloadAfterPay: boolean;\n\n woocommerce?: {\n amount: number;\n currency: string;\n orderID: number;\n paymentPage: boolean;\n }\n\n // localizations\n tr: {\n order: string;\n post: string;\n }\n}\n\nexport interface VerifiedPayApiRes {\n error: boolean;\n errorMsg: string;\n data: any[];\n}\n\nexport class VerifiedPay {\n protected static readonly CONSENT_COOKIE_NAME = \"vp-ck\";\n protected static readonly CONFIRM_COOKIES_MSG = \"#ct-cookieMsg\";\n protected static readonly CONFIRM_COOKIES_BTN = \"#ct-confirmCookies\";\n // TODO separate entryPoints + classes for admin + public code? but tooltips and other admin stuff can be used publicly too (and is quite small)\n\n public readonly window: BrowserWindow;\n public readonly $: JQueryStatic;\n\n protected config: VerifiedPayConfig;\n protected webHelpers: WebHelpers;\n protected adminControls: AdminControls;\n protected tooltips: Tooltips;\n protected payment: Payment;\n\n constructor(window: BrowserWindow, $: JQueryStatic) {\n this.window = window;\n this.$ = $;\n this.config = this.window['verifiedPayCfg'] || {};\n this.config.consentCookieName = VerifiedPay.CONSENT_COOKIE_NAME;\n this.config.confirmCookiesMsg = VerifiedPay.CONFIRM_COOKIES_MSG;\n this.config.confirmCookiesBtn = VerifiedPay.CONFIRM_COOKIES_BTN;\n\n this.webHelpers = new WebHelpers(this.window, this.$, this.config);\n this.tooltips = new Tooltips(this, this.webHelpers);\n this.adminControls = new AdminControls(this);\n this.payment = new Payment(this);\n this.$(this.window.document).ready(($) => {\n this.adminControls.init();\n this.webHelpers.checkCookieConsent();\n });\n }\n\n public getConfig() {\n return this.config;\n }\n\n public getTooltips() {\n return this.tooltips;\n }\n\n public getWebHelpers() {\n return this.webHelpers;\n }\n\n // ################################################################\n // ###################### PRIVATE FUNCTIONS #######################\n}\n","import {VerifiedPay} from \"./VerifiedPay\";\nimport {WebHelpers} from \"./WebHelpers\";\n\n\nexport class AbstractModule {\n protected plugin: VerifiedPay;\n protected webHelpers: WebHelpers;\n\n constructor(plugin: VerifiedPay, webHelpers: WebHelpers = null) {\n this.plugin = plugin;\n this.webHelpers = webHelpers ? webHelpers : this.plugin.getWebHelpers();\n }\n\n // ################################################################\n // ###################### PRIVATE FUNCTIONS #######################\n}\n","\nexport class PaymentButtonID {\n public readonly postID: number = 0;\n public readonly buttonNr: number = 0;\n\n constructor(combinedId: string) {\n const idParts = combinedId.split(\"-\");\n if (idParts.length !== 2)\n throw new Error(\"PaymentButtonID must have exactly 2 parts: postID-buttonNr\");\n this.postID = parseInt(idParts[0]);\n this.buttonNr = parseInt(idParts[1]);\n }\n\n public getButtonIdStr(): string {\n return `${this.postID}-${this.buttonNr}`;\n }\n}\n","import {PaymentResponse} from \"./PaymentResponse\";\n\nexport class PaymentMap extends Map { // (verified TX ID, pending payment)\n constructor() {\n super();\n }\n\n /**\n * Merge certain pre-defined properties from the existing payment onto newData and return it.\n * @param verifiedTxId\n * @param newData\n */\n public mergeWithExisting(verifiedTxId: string, newData: PaymentResponse): PaymentResponse {\n let payment = this.get(verifiedTxId);\n if (payment !== undefined) { // should always be defined in our current payment flow\n newData.is_restricted = payment.is_restricted;\n }\n this.set(verifiedTxId, newData);\n return newData;\n }\n}\n","import {AbstractModule} from \"../AbstractModule\";\nimport {VerifiedPay} from \"../VerifiedPay\";\n\nexport class AdminControls extends AbstractModule {\n constructor(plugin: VerifiedPay) {\n super(plugin);\n }\n\n public init() {\n if (this.plugin.$(\"body\").attr(\"class\").indexOf(\"verifiedpay\") === -1)\n return; // not our plugin settings page\n\n this.plugin.getTooltips().initToolTips();\n this.plugin.$(this.plugin.window.document).ready(($) => {\n\n });\n }\n\n // ################################################################\n // ###################### PRIVATE FUNCTIONS #######################\n\n}\n","import {VerifiedPayConfig} from \"./VerifiedPay\";\n\nexport class Gateway {\n protected lastVerifiedTxId: string = \"\";\n\n protected config: VerifiedPayConfig;\n\n constructor(config: VerifiedPayConfig) {\n this.config = config;\n }\n\n public generateRandomTxId(postID: number): string {\n const rand = this.getRandomString(4, false);\n const unixTimestamp = Math.floor(Date.now() / 1000);\n this.lastVerifiedTxId = `${postID}-${unixTimestamp}-${rand}`;\n return this.lastVerifiedTxId;\n }\n\n public getLastGeneratedTxId(): string {\n return this.lastVerifiedTxId;\n }\n\n public getPayFrameUrl(postID: number, amount: number, currency: string, type: string = \"Post\", description: string = \"\"): string {\n const verifiedTxId = this.generateRandomTxId(postID);\n currency = currency.toUpperCase(); // TODO undefined on tip button once. how?\n const desc = encodeURI(description.length !== 0 ? description : `Post ${postID} @ ${this.config.siteUrl}`.trim());\n const urlStr = this.config.frameUrl\n .replace(\"{verifiedTxId}\", verifiedTxId)\n .replace(\"{amount}\", amount.toFixed(8))\n .replace(\"{currency}\", currency)\n .replace(\"{desc}\", desc);\n return urlStr;\n }\n\n // ################################################################\n // ###################### PRIVATE FUNCTIONS #######################\n\n protected getRandomString(len: number, hex = false) {\n let chars = hex ? '1234567890ABCDEF' : '1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'\n let random = ''\n for (let i = 0; i < len; i++)\n random += chars.charAt(Math.floor(Math.random() * chars.length))\n return random\n }\n}\n","import {VerifiedPay} from \"../VerifiedPay\";\nimport {AbstractModule} from \"../AbstractModule\";\nimport {WebHelpers} from \"../WebHelpers\";\n\nexport class Tooltips extends AbstractModule {\n\n constructor(plugin: VerifiedPay, webHelpers: WebHelpers) {\n super(plugin, webHelpers);\n }\n\n /**\n * Initializes status bar hover entries.\n */\n public initToolTips() {\n const window = this.plugin.window;\n const jQuery = this.plugin.$;\n const that = this;\n const tsfL10n = { // TODO localization\n states: {\n debug: false\n }\n }\n\n let touchBuffer = 0,\n inTouchBuffer = false;\n\n const setTouchBuffer = function() {\n inTouchBuffer = true;\n clearTimeout( touchBuffer );\n touchBuffer = window.setTimeout( function() {\n inTouchBuffer = false;\n }, 250 );\n }\n\n const setEvents = function( target, unset = false ) {\n\n unset = unset || false;\n\n let touchEvents = 'pointerdown.tsfTT touchstart.tsfTT click.tsfTT',\n $target = jQuery( target );\n\n if ( unset ) {\n $target.off( 'mousemove mouseleave mouseout ct-tooltip-update' );\n jQuery( document.body ).off( touchEvents );\n } else {\n $target.on( {\n 'mousemove' : mouseMove,\n 'mouseleave' : mouseLeave,\n 'mouseout' : mouseLeave,\n } );\n jQuery( document.body ).off( touchEvents ).on( touchEvents, touchRemove );\n }\n\n $target.on( 'ct-tooltip-update', updateDesc );\n }\n const unsetEvents = function( target ) {\n setEvents( target, true );\n }\n const updateDesc = function( event ) {\n if ( event.target.classList.contains( 'ct-tooltip-item' ) ) {\n let tooltipText = event.target.querySelector( '.ct-tooltip-text' );\n if ( tooltipText instanceof Element )\n tooltipText.innerHTML = event.target.dataset.desc;\n }\n }\n const mouseEnter = function( event ) {\n let $hoverItem = jQuery( event.target ),\n desc = event.target.dataset.desc;\n\n if ( desc && 0 === $hoverItem.find( 'div' ).length ) {\n //= Remove any titles attached.\n event.target.title = \"\";\n\n let $tooltip = jQuery(\n '
'\n + desc +\n '
'\n );\n $hoverItem.append( $tooltip );\n\n let $boundary = $hoverItem.closest( '.ct-tooltip-boundary' );\n $boundary = $boundary.length && $boundary || jQuery( document.body );\n\n //= 9 = arrow (8) + shadow (1)\n let tooltipHeight = $hoverItem.outerHeight() + 9,\n tooltipTop = $tooltip.offset().top - tooltipHeight,\n boundaryTop = $boundary.offset().top - ( $boundary.prop( 'scrolltop' ) || 0 );\n\n if ( boundaryTop > tooltipTop ) {\n $tooltip.addClass( 'ct-tooltip-down' );\n $tooltip.css( 'top', tooltipHeight + 'px' );\n } else {\n $tooltip.css( 'bottom', tooltipHeight + 'px' );\n }\n\n let $hoverItemWrap = $hoverItem.closest( '.ct-tooltip-wrap' ),\n $textWrap = $tooltip.find( '.ct-tooltip-text-wrap' ),\n $innerText = $textWrap.find( '.ct-tooltip-text' ),\n hoverItemWrapWidth = $hoverItemWrap.width(),\n textWrapWidth = $textWrap.outerWidth( true ),\n textWidth = $innerText.outerWidth( true ),\n textLeft = $textWrap.offset().left,\n textRight = textLeft + textWidth,\n boundaryLeft = $boundary.offset().left - ( $boundary.prop( 'scrollLeft' ) || 0 ),\n boundaryRight = boundaryLeft + $boundary.outerWidth();\n\n //= RTL and LTR are normalized to abide to left.\n let direction = 'left';\n\n if ( textLeft < boundaryLeft ) {\n //= Overflown over left boundary (likely window)\n //= Add indent relative to boundary. 24px width of arrow / 2 = 12 middle\n let horIndent = boundaryLeft - textLeft + 12,\n basis = parseInt( $textWrap.css( 'flex-basis' ), 10 );\n\n /**\n * If the overflow is greater than the tooltip flex basis,\n * the tooltip was grown. Shrink it back to basis and use that.\n */\n if ( horIndent < -basis )\n horIndent = -basis;\n\n $tooltip.css( direction, horIndent + 'px' );\n $tooltip.data( 'overflow', horIndent );\n $tooltip.data( 'overflowDir', direction );\n } else if ( textRight > boundaryRight ) {\n //= Overflown over right boundary (likely window)\n //= Add indent relative to boundary. Add 12px for visual appeal.\n let horIndent = boundaryRight - textRight - hoverItemWrapWidth - 12,\n basis = parseInt( $textWrap.css( 'flex-basis' ), 10 );\n\n /**\n * If the overflow is greater than the tooltip flex basis,\n * the tooltip was grown. Shrink it back to basis and use that.\n */\n if ( horIndent < -basis )\n horIndent = -basis;\n\n $tooltip.css( direction, horIndent + 'px' );\n $tooltip.data( 'overflow', horIndent );\n $tooltip.data( 'overflowDir', direction );\n } else if ( hoverItemWrapWidth < 42 ) {\n //= Small tooltip container. Add indent to make it visually appealing.\n let indent = -15;\n $tooltip.css( direction, indent + 'px' );\n $tooltip.data( 'overflow', indent );\n $tooltip.data( 'overflowDir', direction );\n } else if ( hoverItemWrapWidth > textWrapWidth ) {\n //= Wrap is bigger than tooltip. Adjust accordingly.\n let pagex = event.originalEvent && event.originalEvent.pageX || event.pageX, // iOS touch support,\n hoverItemLeft = $hoverItemWrap.offset().left,\n center = pagex - hoverItemLeft,\n left = center - textWrapWidth / 2,\n right = left + textWrapWidth;\n\n if ( left < 0 ) {\n //= Don't overflow left.\n left = 0;\n } else if ( right > hoverItemWrapWidth ) {\n //= Don't overflow right.\n //* Use textWidth instead of textWrapWidth as it gets squashed in flex.\n left = hoverItemWrapWidth - textWidth;\n }\n\n $tooltip.css( direction, left + 'px' );\n $tooltip.data( 'adjust', left );\n $tooltip.data( 'adjustDir', direction );\n }\n }\n }\n const mouseMove = function( event ) {\n let $target = jQuery( event.target ),\n $tooltip = $target.find( '.ct-tooltip' ),\n $arrow = $tooltip.find( '.ct-tooltip-arrow' ),\n overflow = $tooltip.data( 'overflow' ),\n overflowDir = $tooltip.data( 'overflowDir' );\n\n overflow = parseInt( overflow, 10 );\n overflow = isNaN( overflow ) ? 0 : - Math.round( overflow );\n\n if ( overflow ) {\n //= Static arrow based on static overflow.\n $arrow.css( overflowDir, overflow + \"px\" );\n } else {\n let pagex = event.originalEvent && event.originalEvent.pageX || event.pageX, // iOS touch support\n arrowBoundary = 7,\n arrowWidth = 16,\n $hoverItemWrap = $target.closest( '.ct-tooltip-wrap' ),\n mousex = pagex - $hoverItemWrap.offset().left - arrowWidth / 2,\n originalMousex = mousex,\n $textWrap = $tooltip.find( '.ct-tooltip-text-wrap' ),\n textWrapWidth = $textWrap.outerWidth( true ),\n adjust = $tooltip.data( 'adjust' ),\n adjustDir = $tooltip.data( 'adjustDir' ),\n boundaryRight = textWrapWidth - arrowWidth - arrowBoundary;\n\n //= mousex is skewed, adjust.\n adjust = parseInt( adjust, 10 );\n adjust = isNaN( adjust ) ? 0 : Math.round( adjust );\n if ( adjust ) {\n adjust = 'left' === adjustDir ? -adjust : adjust;\n mousex = mousex + adjust;\n\n //= Use textWidth for right boundary if adjustment exceeds.\n if ( boundaryRight - adjust > $hoverItemWrap.outerWidth( true ) ) {\n let $innerText = $textWrap.find( '.ct-tooltip-text' ),\n textWidth = $innerText.outerWidth( true );\n boundaryRight = textWidth - arrowWidth - arrowBoundary;\n }\n }\n\n if ( mousex <= arrowBoundary ) {\n //* Overflown left.\n $arrow.css( 'left', arrowBoundary + \"px\" );\n } else if ( mousex >= boundaryRight ) {\n //* Overflown right.\n $arrow.css( 'left', boundaryRight + \"px\" );\n } else {\n //= Somewhere in the middle.\n $arrow.css( 'left', mousex + \"px\" );\n }\n }\n }\n const mouseLeave = function( event ) {\n\n //* @see touchMove\n if ( inTouchBuffer )\n return;\n\n jQuery( event.target ).find( '.ct-tooltip' ).remove();\n unsetEvents( event.target );\n }\n /**\n * ^^^\n * These two methods conflict eachother in EdgeHTML.\n * Thusly, touch buffer.\n * vvv\n */\n const touchRemove = function( event ) {\n\n //* @see mouseLeave\n setTouchBuffer();\n\n let itemSelector = '.ct-tooltip-item',\n balloonSelector = '.ct-tooltip';\n\n let $target = jQuery( event.target ),\n $keepBalloon;\n\n if ( $target.hasClass( 'ct-tooltip-item' ) ) {\n $keepBalloon = $target.find( balloonSelector );\n }\n if ( ! $keepBalloon ) {\n let $children = $target.children( itemSelector );\n if ( $children.length ) {\n $keepBalloon = $children.find( balloonSelector );\n }\n }\n\n if ( $keepBalloon && $keepBalloon.length ) {\n //= Remove all but this.\n jQuery( balloonSelector ).not( $keepBalloon ).remove();\n } else {\n //= Remove all.\n jQuery( balloonSelector ).remove();\n }\n }\n\n /**\n * Loads tooltips within wrapper.\n * @function\n */\n const loadToolTip = function( event ) {\n\n if ( inTouchBuffer )\n return;\n\n let isTouch = false;\n\n switch ( event.type ) {\n case 'mouseenter' :\n //= Most likely, thus placed first.\n break;\n\n case 'pointerdown' :\n case 'touchstart' :\n isTouch = true;\n break;\n\n default :\n break;\n }\n\n if ( event.target.classList.contains( 'ct-tooltip-item' ) ) {\n //= Removes previous items and sets buffer.\n isTouch && touchRemove( event );\n\n mouseEnter( event );\n //= Initiate placement directly for Windows Touch or when overflown.\n mouseMove( event );\n\n setEvents( event.target );\n } else {\n //= Delegate or bubble, and go back to this method with the correct item.\n let item = event.target.querySelector( '.ct-tooltip-item:hover' ),\n _event = new jQuery.Event( event.type );\n\n _event.pageX = event.originalEvent && event.originalEvent.pageX || event.pageX;\n\n if ( item ) {\n if ( tsfL10n.states.debug ) console.log( 'Tooltip event warning: delegation' );\n jQuery( item ).trigger( _event );\n } else {\n if ( tsfL10n.states.debug ) console.log( 'Tooltip event warning: bubbling' );\n jQuery( event.target ).closest( '.ct-tooltip-wrap' ).find( '.ct-tooltip-item:hover' ).trigger( _event );\n }\n }\n\n //* Stop further propagation.\n event.stopPropagation();\n }\n\n /**\n * Initializes tooltips.\n * @function\n */\n const initTooltips = function() {\n let $wrap = jQuery( '.ct-tooltip-wrap' );\n\n $wrap.off( 'mouseenter pointerdown touchstart' );\n $wrap.on( 'mouseenter pointerdown touchstart', '.ct-tooltip-item', loadToolTip );\n }\n initTooltips();\n jQuery( window ).on( 'ct-reset-tooltips', initTooltips );\n\n (function() {\n let e = jQuery( '#wpcontent' );\n that.addTooltipBoundary( e );\n })();\n }\n\n // ################################################################\n // ###################### PRIVATE FUNCTIONS #######################\n\n /**\n * Adds tooltip boundaries.\n */\n protected addTooltipBoundary( e ) {\n jQuery( e ).addClass( 'ct-tooltip-boundary' );\n }\n\n /**\n * Triggers tooltip reset.\n */\n protected _triggerTooltipReset() { // not used yet\n jQuery( window ).trigger( 'ct-reset-tooltips' );\n }\n\n /**\n * Triggers active tooltip update.\n */\n protected _triggerTooltipUpdate(item) { // not used yet\n jQuery( item ).trigger( 'ct-tooltip-update' );\n }\n}\n","import {AbstractModule} from \"./AbstractModule\";\nimport {VerifiedPay} from \"./VerifiedPay\";\nimport {PaymentResponse} from \"./structs/PaymentResponse\";\nimport {Gateway} from \"./Gateway\";\nimport {PaymentMap} from \"./structs/PaymentMap\";\nimport {PaymentType, RestPaymentParams} from \"./structs/RestPaymentParams\";\nimport {PaymentButtonID} from \"./structs/PaymentButtonID\";\n\ninterface FrameSizeMsg {\n height: number;\n}\n\nexport class Payment extends AbstractModule {\n protected gateway: Gateway;\n protected payments = new PaymentMap(); // pending payments to keep track\n protected paymentType: PaymentType = \"WP\";\n protected currentPayID: string = \"\"; // postID-counter\n\n constructor(plugin: VerifiedPay) {\n super(plugin);\n this.gateway = new Gateway(this.plugin.getConfig());\n const config = this.plugin.getConfig();\n\n this.addPayFrameListeners();\n this.plugin.$(this.plugin.window.document).ready(($) => {\n if (config.woocommerce !== undefined && config.woocommerce.paymentPage === true) {\n //this.isWoocommercePayment = this.plugin.$(\"body\").hasClass(\"woocommerce-order-received\") === true;\n this.paymentType = \"WC\";\n }\n else if (this.plugin.$(\"h3.rcp_header\").length !== 0)\n this.paymentType = \"RCP\";\n\n this.addCheckoutListeners();\n });\n }\n\n // ################################################################\n // ###################### PRIVATE FUNCTIONS #######################\n\n protected addCheckoutListeners() {\n this.plugin.$('.checkout #billing_email, .checkout #billing_phone').on('change', () => {\n this.plugin.$('body').trigger('update_checkout');\n });\n }\n\n protected addPayFrameListeners() {\n const config = this.plugin.getConfig();\n const onMessage = (event) => {\n if (event.origin !== config.gatewayOrigin) { // TODO use event.target === \"vpay-plugin\" ?\n //if (event.origin.indexOf(config.gatewayOrigin) === -1) {\n this.webHelpers.log([\"Skipped message from different origin:\", event.origin, config.gatewayOrigin]);\n return;\n }\n\n // TODO currently our security relies on origin property from browser event.\n // we should add another check such as SHA2 signature for larger amounts\n let data = event.data;\n //if (typeof(window[data.func]) == \"function\") {\n //window[data.func].call(null, data.message);\n if (typeof data.func === \"string\" && typeof(this[data.func]) === \"function\") {\n try {\n this[data.func].call(this, data.data);\n }\n catch (err) {\n console.error(\"Error calling trusted event callback function: \", err);\n }\n }\n }\n\n if (window.addEventListener) {\n window.addEventListener(\"message\", onMessage, false);\n }\n // @ts-ignore\n else if (window.attachEvent) {\n // @ts-ignore\n window.attachEvent(\"onmessage\", onMessage, false);\n }\n }\n\n protected onVpayPaid(data: PaymentResponse): Promise {\n return new Promise((resolve, reject) => {\n if (!data || data.status !== \"PAID\") {\n this.webHelpers.log([\"received payment with invalid state\", data.status]);\n return;\n }\n\n const config = this.plugin.getConfig();\n if (config.reloadAfterPay === true) {\n this.plugin.window.location.reload();\n return;\n }\n /*\n this.scheduleRemovePayFrame();\n\n const verifiedTxId = data.tx_id;\n let payment = this.payments.mergeWithExisting(verifiedTxId, data);\n const buttonWrapper = this.plugin.$(\".ct-btn-wrap-\" + this.currentPayID);\n const button = buttonWrapper.find(\".ct-button-tip\");\n\n const url = \"wp-json/verifiedpay/v1/register-payment\";\n let params = this.paymentType === \"WP\" ? RestPaymentParams.fromButton(config, button, data) : RestPaymentParams.fromWoocommerceOrder(config, data);\n this.webHelpers.getApi(url, params, (data) => {\n if (data.data === undefined || data.error === true) {\n reject({text: \"invalid payment response\", res: data});\n return;\n }\n\n resolve();\n\n if (this.paymentType === \"WC\") {\n // nothing to do currently. we show the frame a few seconds longer with confirmation icon\n }\n else if (this.paymentType === \"RCP\") {\n // nothing yet. done via full page payment and their webhook\n }\n });\n */\n })\n }\n\n protected onVpayReturnToMerchant(data: any) {\n this.plugin.window.location.reload(); // we come from vpay after card can not be charged\n }\n\n protected onVpayFrameSize(data: FrameSizeMsg) {\n this.plugin.$(\".ct-frame-pay iframe\").height(data.height).attr(\"height\", data.height);\n }\n\n protected showPaymentFrame(button: Element) {\n // there can only be 1 payment active\n // hide all other payment frames (and show there buttons)\n this.plugin.$(\".ct-button-frame\").fadeOut(\"slow\");\n this.plugin.$(\".ct-button-wrap\").fadeIn(\"slow\");\n\n const config = this.plugin.getConfig();\n const $btn = this.plugin.$(button);\n //const postID = parseInt($btn.attr(\"data-id\"));\n const buttonIdStr = $btn.attr(\"data-id\");\n this.currentPayID = buttonIdStr;\n const paymentButtonID = new PaymentButtonID(buttonIdStr);\n const amount = parseFloat($btn.attr(\"data-amount\"));\n const currency = $btn.attr(\"data-currency\");\n this.plugin.$(\".ct-btn-wrap-\" + buttonIdStr).fadeOut(\"slow\");\n\n // create an iframe and append it\n const frame = document.createElement(\"iframe\");\n const type = this.paymentType === \"WC\" ? config.tr.order : config.tr.post; // WC frame is currently added on server, not here\n frame.src = this.gateway.getPayFrameUrl(paymentButtonID.postID, amount, currency, type, \"WooCommerce Order\");\n frame.scrolling = \"no\";\n frame.style.overflow = \"hidden\";\n frame.width = \"400px\";\n frame.height = \"800px\";\n const frameHolder = this.plugin.$(\".ct-button-frame-\" + buttonIdStr);\n frameHolder.append(frame);\n frameHolder.fadeIn(\"slow\");\n\n const verifiedTxId = this.gateway.getLastGeneratedTxId();\n let paymentEmpty = new PaymentResponse();\n if ($btn.attr(\"data-restricted\") === \"1\")\n paymentEmpty.is_restricted = true;\n this.payments.set(verifiedTxId, paymentEmpty);\n }\n\n protected updateEditableButtonAmount(input: Element) {\n const config = this.plugin.getConfig();\n const $input = this.plugin.$(input);\n const amount = parseFloat($input.val());\n const $buttonWrap = this.plugin.$(\".ct-btn-wrap-\" + this.currentPayID);\n $buttonWrap.find(\".ct-button-tip\").attr(\"data-amount\", amount);\n $buttonWrap.find(\".ct-btn-display-amount\").text(amount);\n }\n\n protected scheduleRemovePayFrame() {\n const config = this.plugin.getConfig();\n const timeoutSec = this.paymentType === \"WC\" ? 5 : 0;\n const frameID = this.paymentType === \"WP\" ? 0 : config.woocommerce.orderID; // TODO RCP\n const selector = \".ct-button-frame-\" + frameID + \", .ct-button-frame-\" + this.currentPayID;\n setTimeout(() => {\n // TODO what if we want multiple buttons per post? storing a new DB entry per shortcode is overkill (as Cashtippr)\n this.plugin.$(selector).fadeOut(\"slow\");\n setTimeout(() => {\n this.plugin.$(selector).remove();\n }, 1000);\n }, timeoutSec * 1000);\n }\n}\n","\nexport type PaymentStatus = \"PENDING\" | \"PAID\" | \"CANCELLED\" | \"EXPIRED\" | \"HOLD\" | \"REFUNDED\";\n\nexport class PaymentResponse {\n public readonly id: number;\n public readonly tx_id: string; // the value the merchant supplied\n public readonly token: string;\n // TODO add more props\n public readonly status: PaymentStatus;\n public readonly paid_amount_crypto: number;\n public readonly remaining_amount_crypto: number;\n public readonly qr_url: string;\n public readonly payment_link: string;\n public readonly confirmations: number;\n\n // added by TS client\n public is_restricted: boolean = false;\n\n constructor() {\n }\n\n public static fromJson(json: any): PaymentResponse {\n return Object.assign(new PaymentResponse(), json); // copy properties\n }\n\n // ################################################################\n // ###################### PRIVATE FUNCTIONS #######################\n\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","import {VerifiedPay} from \"./src/VerifiedPay\";\n\nlet verifiedPayPlugin = new VerifiedPay(window as any, jQuery);\n(window as any).verifiedPayPlugin = verifiedPayPlugin;\n"],"names":["constructor","window","$","config","cssSelectors","this","getBrowserLang","navigator","language","substr","toLowerCase","getCookie","c_name","i","x","y","ARRcookies","document","cookie","split","length","indexOf","replace","decodeURI","setCookie","name","value","expireDays","date","Date","getTime","cookieLifeDays","toUTCString","cookiePath","removeCookie","checkCookieConsent","confirmCookiesBtn","click","confirmCookies","consentCookieName","confirmCookiesMsg","remove","fromBase64","data","atob","console","error","toBase64","btoa","translate","text","variables","safeHtml","toString","e","log","start","end","charAt","placeHolder","substring","translation","key","tr","textPiece","escapeOutput","reg","RegExp","match","convertNewlines","escapeRegex","str","args","arguments","isAppleIOS","test","userAgent","MSStream","getAllCssSelectors","cached","originRegex","location","origin","styleSheets","sheet","href","rules","u","selectorText","push","imports","err","isExistingCssSelector","selector","selectors","getApi","path","callback","dataType","undefined","url","fixRelativeUrl","get","textStatus","jqXHR","postApi","post","fullUrl","siteUrl","VerifiedPay","CONSENT_COOKIE_NAME","CONFIRM_COOKIES_MSG","CONFIRM_COOKIES_BTN","webHelpers","WebHelpers","tooltips","Tooltips","adminControls","AdminControls","payment","Payment","ready","init","getConfig","getTooltips","getWebHelpers","plugin","combinedId","postID","buttonNr","idParts","Error","parseInt","getButtonIdStr","PaymentMap","Map","super","mergeWithExisting","verifiedTxId","newData","is_restricted","set","AbstractModule","attr","initToolTips","lastVerifiedTxId","generateRandomTxId","rand","getRandomString","unixTimestamp","Math","floor","now","getLastGeneratedTxId","getPayFrameUrl","amount","currency","type","description","toUpperCase","desc","encodeURI","trim","frameUrl","toFixed","len","hex","chars","random","jQuery","that","tsfL10n","touchBuffer","inTouchBuffer","setEvents","target","unset","touchEvents","$target","off","body","on","mouseMove","mouseLeave","touchRemove","updateDesc","event","classList","contains","tooltipText","querySelector","Element","innerHTML","dataset","$tooltip","find","$arrow","overflow","overflowDir","isNaN","round","css","pagex","originalEvent","pageX","arrowBoundary","arrowWidth","$hoverItemWrap","closest","mousex","offset","left","$textWrap","textWrapWidth","outerWidth","adjust","adjustDir","boundaryRight","clearTimeout","setTimeout","$keepBalloon","balloonSelector","hasClass","$children","children","not","loadToolTip","isTouch","$hoverItem","title","append","$boundary","tooltipHeight","outerHeight","tooltipTop","top","prop","addClass","$innerText","hoverItemWrapWidth","width","textWidth","textLeft","textRight","boundaryLeft","direction","horIndent","basis","indent","right","mouseEnter","item","_event","Event","trigger","stopPropagation","initTooltips","$wrap","addTooltipBoundary","_triggerTooltipReset","_triggerTooltipUpdate","payments","paymentType","currentPayID","gateway","Gateway","addPayFrameListeners","woocommerce","paymentPage","addCheckoutListeners","onMessage","gatewayOrigin","func","call","addEventListener","attachEvent","onVpayPaid","Promise","resolve","reject","status","reloadAfterPay","reload","onVpayReturnToMerchant","onVpayFrameSize","height","showPaymentFrame","button","fadeOut","fadeIn","$btn","buttonIdStr","paymentButtonID","PaymentButtonID","parseFloat","frame","createElement","order","src","scrolling","style","frameHolder","paymentEmpty","PaymentResponse","updateEditableButtonAmount","input","$input","val","$buttonWrap","scheduleRemovePayFrame","timeoutSec","orderID","fromJson","json","Object","assign","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","module","__webpack_modules__","verifiedPayPlugin"],"sourceRoot":""}