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AO,KAER,KAAQ,CACP0iC,SAAU,CAAEC,GAAI,QAChBwC,KAAM,kCAEP,KAAQ,CAEPA,KAAM,gCAEP,IAAK,CAEJzC,SAAU,CAAEC,GAAI,SAChBwC,KAAM,0CAEP,IAAK,CAEJA,KAAM,KAKRzf,SAAU,SAAUvnB,GACnB6hC,EAAe,CAAC,CACjB,EAIA+E,WAAY,SAAqBlhC,EAAMihC,EAAWz8B,GAEjD,IAAIk5B,EAAiC,KAAvBuD,EAAU5B,SACvBpgC,EAAOoP,UAAU4yB,EAAU9C,YACJ,IAAvB8C,EAAU5B,SAAiB,CAAC4B,GAAa,GAG1Cz8B,EAAS5E,KAAMI,EAAMihC,GAGrBjD,EAAgBN,GAChBnB,GACD,GA6ND,CAheD,CAgeIt9B,+BCjgBJ3N,OAAOiwC,eAAiBjwC,OAAOO,eAAiBP,OAAOO,cAAcmhC,WACnE1hC,OAAOO,cAAcmhC,WAAa1hC,OAAOkB,SAASgvC,OAAS,mBAC7DC,EAAAA,EAA0BnwC,OAAOiwC","sources":["legacy-dep-bootstrap/shim/legacy-schema.js","legacy-dep-bootstrap/bootstrap.config.js","index.js","legacy-dep-bootstrap/legacy-accessibility-shim-layer.js","legacy-dep-bootstrap/shim/jquery.widget.flyoutMenu.js","legacy-dep-bootstrap/shim/jquery-migrate-patch.js","legacy-dep-bootstrap/shim/jquery.smartbanner.js","legacy-dep-bootstrap/shim/jquery.ui.widget.js","legacy-dep-bootstrap/shim/jquery.validate.js","legacy-dep-bootstrap/advertiser.common.vnext.js","legacy-dep-bootstrap/countdown.js","legacy-dep-bootstrap/override-legacy-jquery.js","legacy-dep-bootstrap/init-legacy-components.js","legacy-dep-bootstrap/kendo-bootstrap.js","legacy-dep-bootstrap/osd-bootstrap.js","legacy-dep-bootstrap/legacy-context.js","legacy-dep-bootstrap/shim/jquery.tmpl.js","public-path.js"],"sourcesContent":["import schemaVnext from '@bingads-webui-campaign/campaign-ui-schemas';\r\n\r\nwindow.globalLegacySchema = {\r\n get(schemaName) {\r\n return schemaVnext[schemaName];\r\n },\r\n};\r\n","import { initializeUiNextLegacyI18n } from '@bingads-webui-campaign/legacy-i18n/loader/ui-next/index';\r\nimport componentConfigImport from '@bingads-webui-component-legacy/config/index';\r\n/* eslint-enable */\r\n\r\nimport './shim/legacy-schema';\r\n\r\nconst config = componentConfigImport;\r\nconst { serverContext } = window;\r\nconst {\r\n CurrentAccount,\r\n CurrentCustomer,\r\n CurrentUser,\r\n CurrentLocale: Culture,\r\n} = serverContext;\r\ninitializeUiNextLegacyI18n();\r\n\r\nconfig.set({\r\n CurrentAccount,\r\n CurrentCustomer,\r\n CurrentUser,\r\n Culture,\r\n});\r\n","/* eslint-disable custom-import/dynamic-import-chunkname */\r\n/* eslint-disable no-console */\r\n\r\nimport queryString from 'query-string';\r\nimport { isSDK } from '@bingads-webui-campaign-react/sdk-utils';\r\nimport './legacy-dep-bootstrap/bootstrap.config';\r\nimport { checkQueryParams } from './global-init/query-param-checker';\r\n\r\n// if user put wrong values for known query params (uid, cid, aid), restores it per server context\r\ncheckQueryParams(window.serverContext);\r\n\r\n// remove skipcccache from URL, this should only be used once to refresh sever cache, then removed\r\nconst query = queryString.parse(window.location.search);\r\ndelete query.skipcccache;\r\nwindow.history.replaceState(\r\n {},\r\n document.title,\r\n `${window.location.pathname}?${queryString.stringify(query, { sort: false })}${window.location.hash}`\r\n);\r\n\r\nif (isSDK()) {\r\n import(/* webpackMode: 'eager' */'./sdk/sdk-bootstrap');\r\n} else {\r\n // eslint-disable-next-line no-unused-expressions\r\n import(/* webpackMode: 'eager' */'./bootstrap');\r\n}\r\n","import $ from 'jquery';\r\nimport _ from 'underscore.string';\r\nimport { defer, findIndex } from 'underscore';\r\n\r\n// getParent and dropdownMenuKeydownHandler have similar logic of bootstrap dropdown.js.\r\n// Inside dropdownMenuKeydownHandler we have an extra check to ensure arrow keys will not take\r\n// effect on react bootstrap dropdown menu.\r\nconst KEYS = {\r\n BACKSPACE: 8,\r\n TAB: 9,\r\n ENTER: 13,\r\n ESC: 27,\r\n SPACEBAR: 32,\r\n PAGEUP: 33,\r\n PAGEDOWN: 34,\r\n END: 35,\r\n HOME: 36,\r\n LEFT: 37,\r\n UP: 38,\r\n RIGHT: 39,\r\n DOWN: 40,\r\n INSERT: 45,\r\n DELETE: 46,\r\n F2: 113,\r\n F10: 121,\r\n F12: 123,\r\n};\r\n\r\nfunction bindFirst(name, fn) {\r\n // bind as you normally would\r\n // don't want to miss out on any jQuery magic\r\n this.on(name, fn);\r\n\r\n // eslint-disable-next-line func-names\r\n this.each(function () {\r\n // eslint-disable-next-line no-underscore-dangle\r\n const handlers = $._data(this, 'events')[name.split('.')[0]];\r\n const handler = handlers.pop();\r\n handlers.splice(0, 0, handler);\r\n });\r\n}\r\n// function attached to jquery to bind event at top of queue.\r\n$.fn.bindFirst = bindFirst;\r\n\r\n// http://slavik.meltser.info/the-efficient-way-to-create-guid-uuid-in-javascript-with-explanation/\r\nfunction createGuid() {\r\n const p8 = (s) => {\r\n const p = (`${Math.random().toString(16)}000000000`).substr(2, 8);\r\n\r\n return s ? `-${p.substr(0, 4)}-${p.substr(4, 4)}` : p;\r\n };\r\n\r\n return p8() + p8(true) + p8(true) + p8();\r\n}\r\n\r\nfunction getParent($this) {\r\n let selector = $this.attr('data-target');\r\n\r\n if (!selector) {\r\n selector = $this.attr('href');\r\n selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\\s]*$)/, '');\r\n }\r\n\r\n const $parent = selector && $(selector);\r\n\r\n return $parent && $parent.length ? $parent : $this.parent();\r\n}\r\n\r\nconst toggle = '[data-toggle=\"dropdown\"]';\r\n\r\nfunction dropdownMenuKeydownHandler(e) {\r\n const $this = $(this);\r\n if ($this.hasClass('react-dropdown-menu')) return;\r\n const acceptableKeysReg = new RegExp(`(${KEYS.UP}|${KEYS.DOWN}|${KEYS.ESC}|${KEYS.SPACEBAR}|${KEYS.ENTER})`);\r\n\r\n const $parent = getParent($this);\r\n if ($parent.hasClass('react-dropdown')) return;\r\n\r\n if (!acceptableKeysReg.test(e.which) || /input|textarea/i.test(e.target.tagName)) return;\r\n\r\n e.preventDefault();\r\n e.stopPropagation();\r\n\r\n if ($this.is('.disabled, :disabled')) return;\r\n\r\n const isActive = $parent.hasClass('open');\r\n\r\n if ((!isActive && e.which !== KEYS.ESC) || (isActive && e.which === KEYS.ESC)) {\r\n if (e.which === KEYS.ESC) $parent.find(toggle).trigger('focus');\r\n\r\n // eslint-disable-next-line consistent-return\r\n return $this.trigger('click');\r\n }\r\n\r\n const desc = ' li:not(.disabled):visible';\r\n let $items = $parent.find(`.dropdown-menu${desc}`);\r\n\r\n if (!$items.length) return;\r\n\r\n let index = $items.index(e.target);\r\n\r\n if (index === -1 && e.target && e.target.getAttribute('role') === 'menuitem') {\r\n $items = $parent.find('.dropdown-menu [role~=menuitem]');\r\n index = $items.index(e.target);\r\n }\r\n\r\n if ((e.which === KEYS.ENTER || e.which === KEYS.SPACEBAR) && index !== -1) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n e.target.click();\r\n\r\n return;\r\n }\r\n if (e.which === KEYS.UP && index > 0) index -= 1;\r\n if (e.which === KEYS.DOWN && index < $items.length - 1) index += 1;\r\n // eslint-disable-next-line no-bitwise\r\n if (!~index) index = 0;\r\n\r\n // add logic for divider\r\n let currentItem = $items.eq(index);\r\n const itemClass = currentItem.attr('class');\r\n if (itemClass && _.contains(itemClass, 'divider')) {\r\n currentItem.attr('tabindex', '-1');\r\n if (e.which === KEYS.UP && index > 0) index -= 1;\r\n if (e.which === KEYS.DOWN && index < $items.length - 1) index += 1;\r\n\r\n currentItem = $items.eq(index);\r\n }\r\n\r\n currentItem.trigger('focus');\r\n}\r\n\r\nfunction clickableKeydownHandler(e) {\r\n const triggerKey = e.keyCode || e.which;\r\n\r\n if (triggerKey === KEYS.ENTER || triggerKey === KEYS.SPACEBAR) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n e.target.click();\r\n }\r\n}\r\n\r\nfunction afterKeydownFocusHandler(e) {\r\n const triggerKey = e.keyCode || e.which;\r\n\r\n if (triggerKey === KEYS.ENTER || triggerKey === KEYS.SPACEBAR) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n e.target.focus();\r\n }\r\n}\r\n\r\nfunction addRoleButtonHandler(e) {\r\n if (!e.target.getAttribute('role')) {\r\n e.target.setAttribute('role', 'button');\r\n }\r\n}\r\n\r\nfunction buttonFocusHandler() {\r\n const $this = $(this);\r\n const $helpPopup = $(document).find('#_helpcontainer');\r\n\r\n $this.attr('aria-haspopup', 'true');\r\n $this.attr('aria-expanded', $helpPopup.is(':visible'));\r\n}\r\n\r\nfunction helpButtonKeydownHandler(e) {\r\n if (e.keyCode === KEYS.ENTER || e.keyCode === KEYS.SPACEBAR) {\r\n $(this).attr('aria-expanded', 'true');\r\n }\r\n}\r\n\r\nfunction addRolePresentationForPaginationRow() {\r\n const $this = $(this);\r\n const $footerRows = $this.find('> tfoot.footer > tr.noborder');\r\n\r\n if (!$footerRows.length) {\r\n return;\r\n }\r\n\r\n $footerRows.each((index, element) => {\r\n const $pagers = $(element).find('form.pagination-control');\r\n\r\n if ($pagers && $pagers.length > 0) {\r\n if (!element.getAttribute('role')) {\r\n element.setAttribute('role', 'presentation');\r\n }\r\n }\r\n });\r\n}\r\n\r\nfunction patchLegacyLabelSelectorCheckbox() {\r\n const $this = $(this);\r\n\r\n // patch aria-labelledby, there will always be a sibling of checkbox which contains label name.\r\n const $siblings = $this.siblings();\r\n if ($siblings.length === 1) {\r\n const uniqueId = createGuid();\r\n\r\n $siblings.get(0).setAttribute('id', uniqueId);\r\n this.setAttribute('aria-labelledby', uniqueId);\r\n }\r\n\r\n // patch aria-checked.\r\n let ariaChecked = false;\r\n if ($this.find('.glyphicon-ok').length !== 0) {\r\n ariaChecked = true;\r\n } else if ($this.find('.glyphicon-minus').length !== 0) {\r\n ariaChecked = 'mixed';\r\n }\r\n\r\n this.setAttribute('aria-checked', ariaChecked);\r\n}\r\n\r\nfunction findClosestMenuItemsOnSameLevel($item, menuitemLocator = '> li > [role~=menuitem]:visible') {\r\n return $item.closest('[role=menu]').find(menuitemLocator).not('.separator');\r\n}\r\n\r\nfunction menuMoveUp($item, menuitemLocator) {\r\n const $menuItems = findClosestMenuItemsOnSameLevel($item, menuitemLocator);\r\n const menuIndex = $menuItems.index($item);\r\n let $newItem = $item;\r\n\r\n if (menuIndex) {\r\n $newItem = $menuItems.eq(menuIndex - 1);\r\n }\r\n $newItem.focus();\r\n}\r\n\r\nfunction menuMoveDown($item, menuitemLocator) {\r\n const $menuItems = findClosestMenuItemsOnSameLevel($item, menuitemLocator);\r\n const menuNum = $menuItems.length;\r\n const menuIndex = $menuItems.index($item);\r\n let $newItem = $item;\r\n\r\n if (menuIndex < menuNum - 1) {\r\n $newItem = $menuItems.eq(menuIndex + 1);\r\n }\r\n $newItem.focus();\r\n}\r\n\r\nfunction showSubMenu($item) {\r\n const $subMenu = $item.nextAll('[role=menu]:first');\r\n\r\n if ($subMenu.length) {\r\n const $activeItem = $('[role~=menuitem]:first', $subMenu);\r\n\r\n if ($activeItem.length) {\r\n $item.attr('aria-expanded', 'true');\r\n $subMenu.css('display', 'block');\r\n $subMenu.css('opacity', 1);\r\n $subMenu.css('visibility', 'visible');\r\n\r\n // Transition will affect focus operations.\r\n $subMenu.css('transform', 'none');\r\n $subMenu.css('transition-delay', 'unset');\r\n\r\n $activeItem.trigger('focus');\r\n }\r\n }\r\n}\r\n\r\nfunction moveToContainer($item) {\r\n const $currentSubMenu = $item.closest('.dropdown-submenu > [role=menu]');\r\n\r\n if ($currentSubMenu.length) {\r\n $currentSubMenu.attr('style', '');\r\n\r\n const $parentMenuItem = $currentSubMenu.prev('.dropdown-submenu [role~=menuitem]');\r\n if ($parentMenuItem.length) {\r\n $parentMenuItem.focus();\r\n $parentMenuItem.attr('aria-expanded', 'false');\r\n }\r\n }\r\n}\r\n\r\nfunction closeMenu($item) {\r\n let handled = false;\r\n\r\n const $currentMenu = $item.closest('[role=menu]');\r\n\r\n // in bootstrap menu\r\n const $parent = $currentMenu.parent();\r\n if ($parent.hasClass('open')) {\r\n $parent.removeClass('open');\r\n $parent.find('[data-toggle=dropdown]').attr('aria-expanded', 'false');\r\n const $triggerButton = $parent.find('[role=button]');\r\n if ($triggerButton.length > 0) {\r\n $triggerButton.focus();\r\n } else {\r\n $parent.find('button').focus();\r\n }\r\n handled = true;\r\n }\r\n\r\n // in subMenu\r\n if (!handled) {\r\n moveToContainer($item);\r\n }\r\n}\r\n\r\nfunction menuItemKeydownHandler(e, menuitemLocator) {\r\n const acceptableKeysReg = new RegExp(`(${KEYS.UP}|${KEYS.DOWN})`);\r\n const triggerKey = e.keyCode || e.which;\r\n if (!acceptableKeysReg.test(triggerKey)) return;\r\n\r\n const $this = $(e.currentTarget);\r\n\r\n switch (triggerKey) {\r\n case KEYS.UP:\r\n menuMoveUp($this, menuitemLocator);\r\n break;\r\n case KEYS.DOWN:\r\n menuMoveDown($this, menuitemLocator);\r\n break;\r\n default:\r\n break;\r\n }\r\n\r\n e.preventDefault();\r\n e.stopPropagation();\r\n}\r\n\r\nfunction muiltiLevelMenuItemKeydownHandler(e) {\r\n const acceptableKeysReg = new RegExp(`(${KEYS.UP}|${KEYS.DOWN}|${KEYS.LEFT}|${KEYS.RIGHT}|${KEYS.ESC})`);\r\n const triggerKey = e.keyCode || e.which;\r\n if (!acceptableKeysReg.test(triggerKey)) return;\r\n\r\n const $this = $(this);\r\n\r\n switch (triggerKey) {\r\n case KEYS.RIGHT:\r\n showSubMenu($this);\r\n break;\r\n case KEYS.LEFT:\r\n moveToContainer($this);\r\n break;\r\n case KEYS.UP:\r\n menuMoveUp($this);\r\n break;\r\n case KEYS.DOWN:\r\n menuMoveDown($this);\r\n break;\r\n case KEYS.ESC:\r\n closeMenu($this);\r\n break;\r\n default: break;\r\n }\r\n\r\n e.preventDefault();\r\n e.stopPropagation();\r\n}\r\n\r\nfunction kendoListSetTabIndex(el) {\r\n const $el = $(el);\r\n const $selectedItem = $el.find('.k-state-selected');\r\n const $items = $el.find('[role=option]');\r\n $items.find('.a11y-k-listview-button').attr('tabindex', '-1');\r\n $selectedItem.find('.a11y-k-listview-button').attr('tabindex', '0');\r\n}\r\n\r\nfunction kendoListClearTabIndex(el) {\r\n const $el = $(el);\r\n const $items = $el.find('[role=option]');\r\n $items.find('.a11y-k-listview-button').attr('tabindex', '-1');\r\n}\r\n\r\nfunction kendoListKeydownHandler(e) {\r\n switch (e.keyCode) {\r\n case KEYS.SPACEBAR:\r\n // Set tab index of buttons in selected row to 0, others to -1\r\n kendoListSetTabIndex(this);\r\n break;\r\n case KEYS.DOWN:\r\n case KEYS.LEFT:\r\n case KEYS.RIGHT:\r\n case KEYS.UP:\r\n if (this === e.target) {\r\n // Set tab index of ALL buttons to -1 when navigate through rows\r\n kendoListClearTabIndex(this);\r\n } // else: no effect since it's not navigating through rows, e.g. focused on the button\r\n break;\r\n default:\r\n break;\r\n }\r\n}\r\n\r\nfunction menuToggleKeyup(e) {\r\n if (e.altKey || e.ctrlKey) {\r\n return;\r\n }\r\n if (e.keyCode !== KEYS.ESC && e.keyCode !== KEYS.DOWN && e.keyCode !== KEYS.ENTER && e.keyCode !== KEYS.SPACEBAR) {\r\n return;\r\n }\r\n\r\n const $this = $(this);\r\n const $menu = $this.next('[role=menu]');\r\n let $menuitems = $menu.find('[role~=menuitem]');\r\n if ($menuitems.length === 0) {\r\n $menuitems = $menu.find('> li:not(.disabled):visible');\r\n }\r\n\r\n switch (e.keyCode) {\r\n case KEYS.ESC:\r\n $menu.css('display', '');\r\n break;\r\n case KEYS.DOWN:\r\n case KEYS.ENTER:\r\n case KEYS.SPACEBAR:\r\n if ($menuitems.length) {\r\n const item = $menuitems.eq(0);\r\n item.focus();\r\n }\r\n break;\r\n default: break;\r\n }\r\n\r\n e.preventDefault();\r\n e.stopPropagation();\r\n}\r\n\r\n// Get the first and last elements that could have focus.\r\nfunction getFocusItemsAtBothEnds($root) {\r\n const $focusElements = $root.find('a[href], area[href], button, details, input, iframe, select, textarea, [tabindex]').not('[tabindex^=\"-\"]').not('[disabled]').filter(':visible');\r\n\r\n let $firstElement;\r\n let $lastElement;\r\n let lowestTabindex;\r\n let highestTabindex;\r\n let tabindex;\r\n\r\n $firstElement = $focusElements.eq(0);\r\n $lastElement = $focusElements.eq(0);\r\n\r\n if ($focusElements.length) {\r\n lowestTabindex = $firstElement.attr('tabindex') || '0';\r\n highestTabindex = lowestTabindex;\r\n\r\n $focusElements.each((index, element) => {\r\n tabindex = $(element).attr('tabindex') || '0';\r\n\r\n if (tabindex >= highestTabindex) {\r\n highestTabindex = tabindex;\r\n $lastElement = $(element);\r\n } else if (tabindex < lowestTabindex) {\r\n lowestTabindex = tabindex;\r\n $firstElement = $(element);\r\n }\r\n });\r\n }\r\n return { firstElement: $firstElement, lastElement: $lastElement };\r\n}\r\n\r\n// Trap the focus inside scope\r\nfunction handleFocusTrapping(e, $this) {\r\n if (e.keyCode !== KEYS.TAB) {\r\n return false;\r\n }\r\n\r\n const $activeElement = $(document.activeElement);\r\n const items = getFocusItemsAtBothEnds($this);\r\n\r\n if (items.firstElement.index($activeElement) === 0 && e.shiftKey) {\r\n items.lastElement.focus();\r\n } else if (items.lastElement.index($activeElement) === 0 && !e.shiftKey) {\r\n items.firstElement.focus();\r\n } else {\r\n e.stopPropagation();\r\n return true;\r\n }\r\n e.stopPropagation();\r\n return false;\r\n}\r\n\r\nfunction handleFocusTrappingDatepicker(e, items) {\r\n // console.log(document.activeElement);\r\n const focusedItemIdx = findIndex(items, item => $(item).is('.focused'));\r\n\r\n if (focusedItemIdx === -1) {\r\n items[0].focus();\r\n items[0].addClass('focused');\r\n } else {\r\n let needToFocusItem;\r\n if (focusedItemIdx === items.length - 1) {\r\n // if the last item is focused.\r\n if (e.shiftKey) {\r\n // go back one step.\r\n needToFocusItem = items[focusedItemIdx - 1];\r\n } else {\r\n // focus the first item.\r\n [needToFocusItem] = items;\r\n }\r\n } else if (focusedItemIdx === 0) {\r\n // if the first item is focused.\r\n if (e.shiftKey) {\r\n needToFocusItem = items[items.length - 1];\r\n } else {\r\n needToFocusItem = items[focusedItemIdx + 1];\r\n }\r\n } else if (e.shiftKey) {\r\n // other cases.\r\n needToFocusItem = items[focusedItemIdx - 1];\r\n } else {\r\n needToFocusItem = items[focusedItemIdx + 1];\r\n }\r\n items[focusedItemIdx].removeClass('focused');\r\n needToFocusItem.addClass('focused');\r\n needToFocusItem.focus();\r\n }\r\n e.stopPropagation();\r\n return false;\r\n}\r\n\r\nfunction kendoDialogKeydown(e) {\r\n if (e.altKey || e.ctrlKey) {\r\n return true;\r\n }\r\n\r\n if (e.keyCode !== KEYS.TAB && e.keyCode !== KEYS.ESC) {\r\n return true;\r\n }\r\n\r\n const $this = $(this);\r\n\r\n switch (e.keyCode) {\r\n case KEYS.TAB:\r\n return handleFocusTrapping(e, $this);\r\n case KEYS.ESC:\r\n $('a.k-window-action.k-link').click();\r\n break;\r\n default:\r\n break;\r\n }\r\n\r\n e.stopPropagation();\r\n return false;\r\n}\r\n\r\nfunction getKendoDatepickerKeys() {\r\n const firstItem = $('.k-nav-fast');\r\n const secondItem = $('.k-nav-prev');\r\n const thirdItem = $('.k-nav-next');\r\n const fourthItem = $('.k-content');\r\n\r\n const items = [firstItem, secondItem, thirdItem, fourthItem];\r\n return items;\r\n}\r\n\r\nconst findDatePickerAndInputFromCalendarDOMEvent = (datePickerInputsSelector, e) => {\r\n const $calendar = $(e.currentTarget).closest('.k-calendar');\r\n if ($calendar.length === 0) {\r\n return true;\r\n }\r\n\r\n const $datePickerInputs = $(datePickerInputsSelector);\r\n const $matchedPickerInputs = $datePickerInputs.filter((idx, item) => {\r\n const dp = $(item).data('kendoDatePicker');\r\n return dp && dp.dateView && dp.dateView.calendar && dp.dateView.calendar.element &&\r\n dp.dateView.calendar.element[0] === $calendar[0];\r\n });\r\n if ($matchedPickerInputs.length === 0) {\r\n return true;\r\n }\r\n const datePicker = $matchedPickerInputs.data('kendoDatePicker');\r\n return [datePicker, $matchedPickerInputs];\r\n};\r\n\r\nfunction kendoDatePickerKeydown(e) {\r\n if (e.altKey || e.ctrlKey) {\r\n return true;\r\n }\r\n\r\n if (e.keyCode !== KEYS.TAB && e.keyCode !== KEYS.ESC) {\r\n return true;\r\n }\r\n\r\n const $datePickerInput = $(e.currentTarget);\r\n const datePicker = $datePickerInput.data('kendoDatePicker');\r\n\r\n switch (e.keyCode) {\r\n case KEYS.TAB:\r\n if ($(e.currentTarget).attr('aria-expanded') === 'false') {\r\n // re enable next event.\r\n $(e.currentTarget).off('blur.disablePropogation');\r\n return true;\r\n }\r\n // disable event since the blur event closes the popup.\r\n $(e.currentTarget).bindFirst('blur.disablePropogation', (innerEvent) => {\r\n innerEvent.stopImmediatePropagation();\r\n });\r\n return handleFocusTrappingDatepicker(e, getKendoDatepickerKeys());\r\n case KEYS.ESC:\r\n datePicker.close();\r\n $datePickerInput.focus();\r\n break;\r\n default:\r\n break;\r\n }\r\n\r\n e.stopPropagation();\r\n return false;\r\n}\r\n\r\nconst kendoDatePickerCalendarKeydown = datePickerInputsSelector => (e) => {\r\n if (e.altKey || e.ctrlKey) {\r\n return true;\r\n }\r\n\r\n if (e.keyCode !== KEYS.TAB && e.keyCode !== KEYS.ESC) {\r\n return true;\r\n }\r\n\r\n const [datePicker, $datePickerInput] = findDatePickerAndInputFromCalendarDOMEvent(datePickerInputsSelector, e);\r\n\r\n switch (e.keyCode) {\r\n case KEYS.TAB:\r\n return handleFocusTrappingDatepicker(e, getKendoDatepickerKeys());\r\n case KEYS.ESC:\r\n datePicker.close();\r\n $datePickerInput.focus();\r\n break;\r\n default:\r\n break;\r\n }\r\n\r\n e.stopPropagation();\r\n return false;\r\n};\r\n\r\nfunction tablistKeydown(e) {\r\n if (e.keyCode !== KEYS.LEFT && e.keyCode !== KEYS.RIGHT && e.keyCode !== KEYS.UP && e.keyCode !== KEYS.DOWN) {\r\n return;\r\n }\r\n\r\n const $this = $(this);\r\n const $tabs = $this.closest('[role=tablist]').find('[role=tab]:not([aria-disabled=true]):visible');\r\n const index = $tabs.index($this);\r\n let $selectedTab = $this;\r\n\r\n switch (e.keyCode) {\r\n case KEYS.LEFT:\r\n case KEYS.UP:\r\n if (index > 0) {\r\n $selectedTab = $tabs.eq(index - 1);\r\n }\r\n break;\r\n case KEYS.DOWN:\r\n case KEYS.RIGHT:\r\n if (index < $tabs.length - 1) {\r\n $selectedTab = $tabs.eq(index + 1);\r\n }\r\n break;\r\n default:\r\n break;\r\n }\r\n\r\n $selectedTab.focus();\r\n e.stopPropagation();\r\n}\r\n\r\nfunction moveFocusTo($to, $from) {\r\n if ($from) {\r\n $from.attr('tabindex', '-1');\r\n }\r\n $to.attr('tabindex', '0');\r\n $to.focus();\r\n}\r\n\r\nfunction focusRowByDataKey($treeGrid, dataKey) {\r\n const $treeItem = $treeGrid.find(`.tree-item[data-key-hierarchy='${dataKey}']`);\r\n if ($treeItem.exists()) {\r\n const $row = $treeItem.closest('[role=row]');\r\n moveFocusTo($row);\r\n }\r\n}\r\n\r\nfunction clickRowAndFocus($row) {\r\n // click will trigger re-render, so re-focus after the node is re-rendered\r\n const $treeGrid = $row.closest('[role=treegrid]');\r\n const $treeItem = $row.find('.tree-item');\r\n const dataKey = $treeItem.attr('data-key-hierarchy');\r\n\r\n $treeItem.click();\r\n\r\n // defer twice since the re-render is also defered\r\n defer(() => defer(() => focusRowByDataKey($treeGrid, dataKey)));\r\n}\r\n\r\nfunction treeGridKeydown(e) {\r\n if (e.altKey || e.ctrlKey || (e.shiftKey && e.keyCode !== KEYS.TAB)) {\r\n return true;\r\n }\r\n\r\n const $this = $(this);\r\n\r\n switch (e.keyCode) {\r\n case KEYS.ENTER:\r\n case KEYS.SPACEBAR: {\r\n if (!$this.is(e.target)) {\r\n // return since focused on child buttons\r\n return true;\r\n }\r\n // toggle the group if it is not a leaf node\r\n if ($this.is('[aria-expanded]')) {\r\n clickRowAndFocus($this);\r\n }\r\n break;\r\n }\r\n case KEYS.LEFT: {\r\n if ($this.is('[aria-expanded=true]')) {\r\n // collapse the group\r\n clickRowAndFocus($this);\r\n } else {\r\n // set focus to the parent\r\n const level = $this.attr('aria-level');\r\n if (level > 1) {\r\n const $parentRow = $this.prev(`[aria-level=${level - 1}]`);\r\n moveFocusTo($parentRow, $this);\r\n }\r\n }\r\n break;\r\n }\r\n case KEYS.RIGHT: {\r\n if (!$this.is('[aria-expanded]')) {\r\n // do nothing for leaf node\r\n } else if ($this.is('[aria-expanded=false]')) {\r\n // expand the group\r\n clickRowAndFocus($this);\r\n } else {\r\n // move focus to the first item in the child group\r\n const $childRow = $this.next('[role=row]');\r\n if ($childRow.exists()) {\r\n moveFocusTo($childRow, $this);\r\n }\r\n }\r\n break;\r\n }\r\n case KEYS.UP: {\r\n // move focus to the nearest item above\r\n const $prevRow = $this.prev('[role=row]');\r\n if ($prevRow.exists()) {\r\n moveFocusTo($prevRow, $this);\r\n }\r\n break;\r\n }\r\n case KEYS.DOWN: {\r\n // move focus to the nearest item down\r\n const $nextRow = $this.next('[role=row]');\r\n if ($nextRow.exists()) {\r\n moveFocusTo($nextRow, $this);\r\n }\r\n break;\r\n }\r\n default:\r\n return true;\r\n }\r\n\r\n e.stopPropagation();\r\n return false;\r\n}\r\n\r\nfunction treeGridFocus(e) {\r\n const $this = $(this);\r\n // focus on the active row or the first row when focus to the tree grid\r\n if ($this.is(e.target) && !$(e.relatedTarget).is('[role=row]')) {\r\n let $activeRow = $this.find('[role=row][tabindex=0]').first();\r\n if (!$activeRow.exists()) {\r\n $activeRow = $this.find('[role=row]').first();\r\n }\r\n if ($activeRow.exists()) {\r\n moveFocusTo($activeRow);\r\n }\r\n }\r\n}\r\n\r\n// TODO: remove the temporary jquery fix after fluent v1 version upgrade\r\nfunction removeAllButtonOnLocationGridFocus() {\r\n const $firstCell = $('.bing-maps-location-targets-grid .ms-List-page > div:nth-child(1) > div');\r\n\r\n if ($firstCell) {\r\n $firstCell.attr('tabindex', '0');\r\n }\r\n}\r\n\r\nfunction overviewPageMenuToggleKeyUp(e) {\r\n if (e.keyCode !== KEYS.ENTER && e.keyCode !== KEYS.SPACEBAR) {\r\n return;\r\n }\r\n\r\n const $this = $(this);\r\n let $menu = $this.next('[role=menu]');\r\n if ($menu.length === 0) {\r\n $menu = $(this).parents(':has([role=menu])').first().find('[role=menu]');\r\n }\r\n\r\n let $menuitems = $menu.find('a[role~=menuitem]');\r\n if ($menuitems.length === 0) {\r\n $menuitems = $menu.find('> li:not(.disabled):visible');\r\n }\r\n\r\n switch (e.keyCode) {\r\n case KEYS.ENTER:\r\n case KEYS.SPACEBAR:\r\n if ($menuitems.length) {\r\n $this.attr('aria-expanded', 'true');\r\n $this.closest('.metric-picker').addClass('open');\r\n $this.closest('.multilevel-dropdown').addClass('open');\r\n const item = $menuitems.eq(0);\r\n item.focus();\r\n }\r\n break;\r\n default: break;\r\n }\r\n\r\n e.preventDefault();\r\n e.stopPropagation();\r\n}\r\n\r\nfunction overviewPageMenuItemKeyDown(e) {\r\n if (e.altKey || e.ctrlKey) {\r\n return true;\r\n }\r\n\r\n if (e.keyCode !== KEYS.TAB && e.keyCode !== KEYS.ESC) {\r\n return true;\r\n }\r\n\r\n const $this = $(this);\r\n\r\n switch (e.keyCode) {\r\n // PAGEUP and PAGEDOWN handled in function dropdownMenuKeydownHandler\r\n case KEYS.TAB:\r\n return handleFocusTrapping(e, $this);\r\n case KEYS.ESC: {\r\n const $openParent = $this.closest('.open');\r\n if ($openParent.length > 0) {\r\n $openParent.removeClass('open');\r\n const $toggleButton = $this.parents(':has(.dropdown-toggle)').first().find('.dropdown-toggle');\r\n $toggleButton.attr('aria-expanded', 'false');\r\n $toggleButton.focus();\r\n }\r\n break;\r\n }\r\n default:\r\n break;\r\n }\r\n\r\n e.stopPropagation();\r\n return false;\r\n}\r\n\r\nfunction scriptsQuickFiterFocusHandler(e) {\r\n const $dropdownToggle = $(e.target);\r\n const $dropdownMenu = $dropdownToggle.next();\r\n if ($dropdownToggle.length > 0) {\r\n $dropdownToggle.addClass('legacy-dropdown-toggle');\r\n $dropdownToggle.attr('aria-haspopup', 'true');\r\n }\r\n if ($dropdownMenu.length > 0) {\r\n const $items = $dropdownMenu.find('li');\r\n\r\n if (!$items.length) {\r\n return;\r\n }\r\n\r\n $items.each((index, element) => {\r\n const $link = $(element).find('a');\r\n\r\n if ($link && $link.length > 0) {\r\n if (!$link.attr('tabindex')) {\r\n $link.attr('tabindex', '-1');\r\n }\r\n }\r\n });\r\n }\r\n}\r\n\r\nexport function legacyAccessibilityHelper() {\r\n // Have a new keydown event handler on '.dropdown-menu' to ensure react bootstrap dropdown menu is not affected.\r\n $(document).off('keydown.bs.dropdown.data-api', '.dropdown-menu:not(.legacy-multi-level-dropdown-menu, .bypass-acccessibility-tweak)');\r\n $(document).on('keydown.bs.dropdown.data-api', '.dropdown-menu:not(.legacy-multi-level-dropdown-menu, .bypass-acccessibility-tweak)', dropdownMenuKeydownHandler);\r\n\r\n // Keydown event for multi-level dropdown.\r\n $(document).off('keydown', '.legacy-multi-level-dropdown-menu [role~=menuitem]');\r\n $(document).on('keydown', '.legacy-multi-level-dropdown-menu [role~=menuitem]', muiltiLevelMenuItemKeydownHandler);\r\n\r\n // Listen to keyup to let dropdown menu show up first which depeneds on keydown.\r\n $(document).off('keyup', '.react-dropdown-toggle, .legacy-dropdown-toggle[data-toggle=dropdown]');\r\n $(document).on('keyup', '.react-dropdown-toggle, .legacy-dropdown-toggle[data-toggle=dropdown]', menuToggleKeyup);\r\n\r\n // Have an enter press event handler on '.clickable' and 'input[type='checkbox']'\r\n $(document).off('keydown', '.clickable, input[type=\"checkbox\"], input[type=\"radio\"]');\r\n $(document).on('keydown', '.clickable, input[type=\"checkbox\"], input[type=\"radio\"]', clickableKeydownHandler);\r\n\r\n // Have key event handler for status column\r\n $(document).off('keydown', '.statuschangelink.clickable');\r\n $(document).on('keydown', '.statuschangelink.clickable', menuItemKeydownHandler);\r\n\r\n // Add key event handler for kendo list\r\n $(document).off('keydown', '.k-listview[role=listbox]');\r\n $(document).on('keydown', '.k-listview[role=listbox]', kendoListKeydownHandler);\r\n\r\n // Add accessibility role to helper icon\r\n $(document).off('focus', 'a.helpbutton, a[aria-expanded], a[href=\"javascript:void(0);\"]');\r\n $(document).on('focus', 'a.helpbutton, a[aria-expanded], a[href=\"javascript:void(0);\"]', addRoleButtonHandler);\r\n\r\n // Add focus state handler to help button\r\n $(document).on('focus', 'a.helpbutton', buttonFocusHandler);\r\n\r\n // Add focus state handler to help button\r\n $(document).on('focus', 'a.manage-labels-button', buttonFocusHandler);\r\n\r\n // Add key event handler for help button\r\n $(document).off('keydown', 'a.helpbutton');\r\n $(document).on('keydown', 'a.helpbutton', helpButtonKeydownHandler);\r\n\r\n // Add key event handler for manage labels button\r\n $(document).off('keydown', 'a.manage-labels-button');\r\n $(document).on('keydown', 'a.manage-labels-button', clickableKeydownHandler);\r\n\r\n // Add key event handler for labels selector checkbox\r\n $(document).off('keydown', 'td.legacy-label-selector-checkbox');\r\n $(document).on('keydown', 'td.legacy-label-selector-checkbox', afterKeydownFocusHandler);\r\n\r\n // Give tr with pagination control in footer a role presentation.\r\n $(document).off('focus', 'table');\r\n $(document).on('focus', 'table', addRolePresentationForPaginationRow);\r\n\r\n // Patch aria-checked and aria-labelledby for checkbox of legacy label selector.\r\n $(document).off('focus', 'td.legacy-label-selector-checkbox, .legacy-competitor-selector-checkbox');\r\n $(document).on('focus', 'td.legacy-label-selector-checkbox, .legacy-competitor-selector-checkbox', patchLegacyLabelSelectorCheckbox);\r\n\r\n // Handle keydown event and trap focus inside the KendoUI dialog.\r\n $(document).off('keydown', '.legacy-kendo-ui-dialog[role=dialog]');\r\n $(document).on('keydown', '.legacy-kendo-ui-dialog[role=dialog]', kendoDialogKeydown);\r\n\r\n // Handle keydown event in legacy tab list, e.g., ad preview tabs.\r\n $(document).off('keydown', '.ui-tabs.preview-nav-pills [role=tablist] [role=tab], .authoring-container .nav-pills[role=tablist] [role=tab]');\r\n $(document).on('keydown', '.ui-tabs.preview-nav-pills [role=tablist] [role=tab], .authoring-container .nav-pills[role=tablist] [role=tab]', tablistKeydown);\r\n\r\n // Have key event handler for app selector\r\n $(document).off('keydown', 'tr.appselector.applookup-results-row.clickable');\r\n $(document).on('keydown', 'tr.appselector.applookup-results-row.clickable', (e) => { menuItemKeydownHandler(e, '> tr[role~=menuitem]:visible'); });\r\n\r\n $(document).off('keyup', '.overview-page .dropdown-toggle');\r\n $(document).on('keyup', '.overview-page .dropdown-toggle', overviewPageMenuToggleKeyUp);\r\n\r\n $(document).off('keydown', '.overview-page .dropdown-menu');\r\n $(document).on('keydown', '.overview-page .dropdown-menu', overviewPageMenuItemKeyDown);\r\n // TODO: add other legacy accessibility tweaks.\r\n\r\n // Handle focus event on dropdown button and the items on scripts page.\r\n $(document).off('focus', '.scripts-home-page .toolbar .dropdown-selector .dropdown-toggle, .logs-page .toolbar .dropdown-selector .dropdown-toggle');\r\n $(document).on('focus', '.scripts-home-page .toolbar .dropdown-selector .dropdown-toggle, .logs-page .toolbar .dropdown-selector .dropdown-toggle', scriptsQuickFiterFocusHandler);\r\n\r\n // Handle keydown and focus event in legacy selectable-treeview and virtualized-treeview\r\n $(document).off('keydown', '.selectable-treeview[role=treegrid] [role=row]');\r\n $(document).on('keydown', '.selectable-treeview[role=treegrid] [role=row]', treeGridKeydown);\r\n $(document).off('focus', '.selectable-treeview[role=treegrid]');\r\n $(document).on('focus', '.selectable-treeview[role=treegrid]', treeGridFocus);\r\n\r\n $(document).off('keydown', '.k-datepicker .k-input.form-control');\r\n $(document).on('keydown', '.k-datepicker .k-input.form-control', kendoDatePickerKeydown);\r\n $(document).off('keydown', '.k-calendar-container[aria-hidden=false] .k-calendar');\r\n $(document).on('keydown', '.k-calendar-container[aria-hidden=false] .k-calendar', kendoDatePickerCalendarKeydown('.k-datepicker .k-input.form-control'));\r\n\r\n // Have key event handler for ad strength suggestions picker\r\n $(document).off('keydown', '.ad-strength-suggestion-picker-item');\r\n $(document).on('keydown', '.ad-strength-suggestion-picker-item', (e) => { menuItemKeydownHandler(e, 'ul > li > [role~=menuitem]:visible'); });\r\n\r\n // TODO: remove the temporary jquery fix after fluent v1 version upgrade\r\n $(document).off('focus', '.bing-maps-location-targets-grid .remove-all-location-targets');\r\n $(document).on('focus', '.bing-maps-location-targets-grid .remove-all-location-targets', removeAllButtonOnLocationGridFocus);\r\n}\r\n","import jQuery from 'jquery';\r\n/* eslint-disable */\r\n/* copied original from advertiser.common.js */\r\n\r\n(function ($) {\r\n\t//// begin flyoutMenu jquery widget\r\n\r\n\t$.widget && $.widget(\"ui.flyoutMenu\", {\r\n\t\t_menuContainer: null,\r\n\t\t_isRtl: false,\r\n\t\t_global: {\r\n\t\t\tnumberOfInstances: 0,\r\n\t\t\tactiveElement: null,\r\n\t\t},\r\n\r\n\t\toptions: {\r\n\t\t\tmenuTemplateId: \"flyoutMenuTemplate\",\r\n\t\t\tmenuTemplate: null,\r\n\t\t\tmenuData: {},\r\n\t\t\tmenuHtml: \"\",\r\n\t\t\tflyoutBeforeShow: null,\r\n\t\t\ttop: null,\r\n\t\t\tleft: 2,\r\n\t\t\ttopFn: null,\r\n\t\t\tshouldShowFlyout: null\r\n\t\t},\r\n\r\n\t\t_create: function () {\r\n\t\t\tthis._staticConstructor();\r\n\r\n\t\t\tthis.element.bind(\"click\", $.proxy(this._onElementClick, this));\r\n\t\t},\r\n\r\n\t\tdestroy: function () {\r\n\t\t\tthis._staticDestructor();\r\n\r\n\t\t\tthis.element.unbind(\"click\", $.proxy(this._onElementClick, this));\r\n\r\n\t\t\tthis.hide();\r\n\r\n\t\t\t// call base widget to clean up\r\n\t\t\t$.Widget.prototype.destroy.call(this);\r\n\t\t},\r\n\r\n\t\t_staticConstructor: function () {\r\n\t\t\tthis._isRtl = $('body').css(\"direction\") == \"rtl\";\r\n\t\t\tthis._global.numberOfInstances++;\r\n\t\t\tif (this._global.numberOfInstances > 1)\r\n\t\t\t\treturn;\r\n\r\n\t\t\t$('body').bind(\"click\", $.proxy(this._onBodyClick, this));\r\n\t\t},\r\n\r\n\t\t_staticDestructor: function () {\r\n\t\t\tthis._global.numberOfInstances--;\r\n\t\t\tif (this._global.numberOfInstances > 0)\r\n\t\t\t\treturn;\r\n\r\n\t\t\t$('body').unbind(\"click\", $.proxy(this._onBodyClick, this));\r\n\t\t},\r\n\r\n\t\tshow: function () {\r\n\t\t\tif ($.isFunction(this.options.shouldShowFlyout) && this.options.shouldShowFlyout(this.element) === false){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tthis.hideAll();\r\n\r\n\t\t\tvar menuBlock;\r\n\t\t\tif (!!this.options.menuHtml) {\r\n\t\t\t\tmenuBlock = $(this.options.menuHtml);\r\n\t\t\t} else {\r\n\t\t\t\tvar menuTemplate = this.options.menuTemplate || $(\"#\" + this.options.menuTemplateId);\r\n\t\t\t\tmenuBlock = $.tmpl(menuTemplate, this.options.menuData);\r\n\t\t\t}\r\n\t\t\tvar elementWrapper = this.element;\r\n\r\n\t\t\tvar top = this.options.top;\r\n\t\t\tif (this.options.topFn == null && top == null) {\r\n\t\t\t\ttop = this.element.height;\r\n\t\t\t}\r\n\t\t\tvar left = this.options.left;\r\n\r\n\t\t\tthis._menuContainer = menuBlock\r\n\t\t\t\t.css(\"position\", \"absolute\")\r\n\t\t\t\t.css(\"display\", \"none\")\r\n\t\t\t\t.css(\"top\", top)\r\n\t\t\t\t.css(\"left\", left)\r\n\t\t\t\t.css(\"z-index\", 50)\r\n\t\t\t\t.appendTo(elementWrapper);\r\n\t\t\tthis._global.activeElement = this;\r\n\r\n\t\t\tif ($.isFunction(this.options.flyoutBeforeShow))\r\n\t\t\t\tthis.options.flyoutBeforeShow({ currentElement: this.element, menuBlock: menuBlock });\r\n\t\t\tthis._menuContainer.show();\r\n\t\t\tif (this._isRtl) {\r\n\t\t\t\tleft = left + this.element.width() - menuBlock.width() - 20;\r\n\t\t\t\tthis._menuContainer.css(\"left\", left);\r\n\t\t\t}\r\n\r\n\t\t\tif (this.options.topFn != null) {\r\n\t\t\t\tvar height = this._menuContainer.height();\r\n\t\t\t\ttop = this.options.topFn(height);\r\n\t\t\t\tthis._menuContainer.css(\"top\", top);\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\thide: function () {\r\n\t\t\tif (this._menuContainer != null) {\r\n\t\t\t\tthis._menuContainer.remove();\r\n\t\t\t\tthis._menuContainer = null;\r\n\t\t\t}\r\n\t\t\tif (this._global.activeElement === this)\r\n\t\t\t\tthis._global.activeElement = null;\r\n\t\t},\r\n\r\n\t\thideAll: function () {\r\n\t\t\tif (this._global.activeElement != null)\r\n\t\t\t\tthis._global.activeElement.hide();\r\n\t\t},\r\n\r\n\t\t_onElementClick: function (e) {\r\n\t\t\tthis.show();\r\n\t\t},\r\n\r\n\t\t_onBodyClick: function (e) {\r\n\t\t\tif (this._global.activeElement == null ||\r\n\t\t\t\tthis._global.activeElement._menuContainer == null)\r\n\t\t\t\treturn true;\r\n\r\n\t\t\tvar target = $(e.target);\r\n\t\t\tif (this._isDescendant(target, this._global.activeElement._menuContainer) ||\r\n\t\t\t\tthis._isDescendant(target, this._global.activeElement.element))\r\n\t\t\t\treturn true;\r\n\r\n\t\t\tthis.hideAll();\r\n\t\t},\r\n\r\n\t\t_isDescendant: function (child, parent) {\r\n\t\t\tif (parent.length == 0)\r\n\t\t\t\treturn false;\r\n\r\n\t\t\twhile (child.length > 0 && !child.is('html') && child[0] !== parent[0])\r\n\t\t\t\tchild = child.parent();\r\n\t\t\treturn child.length == 0 || !child.is('html');\r\n\t\t}\r\n\t});\r\n\r\n\t//// end flyoutMenu jquery widget\r\n})(jQuery);\r\n","/* eslint-disable */\r\nimport jQuery from 'jquery';\r\n\r\n/*!\r\n * jQuery 3.3.1\r\n * jQuery Migrate v3.0.1\r\n * We have some breaking scenarios during the update to 3.3.1 from 1.9.4.\r\n * To be back compatible, define some patch here.\r\n * We can replace old usage with these patches when the update is finally completed and stable.\r\n */\r\n( function( factory ) {\r\n // Browser globals\r\n factory( jQuery, window );\r\n} )( function( jQuery, window ) {\r\n\"use strict\";\r\n\r\nvar jQueryVersionParts = jQuery.fn.jquery.split('.');\r\nif (jQueryVersionParts[0] > 3 || (jQueryVersionParts[0] == 3 &&\r\n (jQueryVersionParts[1] > 3 || (jQueryVersionParts[1] == 3 && jQueryVersionParts[2] > 0)))) {\r\n\r\n // this is a work around .live/.die for apex.embed.v1.min not supporting jQuery 3\r\n var oldInit = jQuery.fn.init;\r\n\r\n jQuery.fn.init = function(arg1) {\r\n var ret = oldInit.apply(this, Array.prototype.slice.call( arguments ));\r\n if (typeof arg1 === 'string') {\r\n ret.selector = ret.selector || arg1;\r\n ret.context = ret.context || document;\r\n }\r\n return ret;\r\n }\r\n jQuery.fn.init.prototype = jQuery.fn;\r\n\r\n // package automatic-positioning-popover uses position to decide pop up over location.\r\n // workaround for elements in a td, in new jquery, position respects table, td, or th now.\r\n var oldPosition = jQuery.fn.position;\r\n jQuery.fn.position = function() {\r\n var elem = this[0];\r\n\r\n var offsetParent = elem.offsetParent;\r\n var customized = false;\r\n while(offsetParent && (offsetParent.nodeName === 'TD' || offsetParent.nodeName === 'TABLE')) {\r\n offsetParent = offsetParent.offsetParent;\r\n customized = true;\r\n }\r\n if (customized) {\r\n offsetParent = offsetParent || document.documentElement;\r\n var parentOffset = jQuery(offsetParent).offset();\r\n parentOffset.top += jQuery.css(offsetParent, \"borderTopWidth\", true);\r\n parentOffset.left += jQuery.css(offsetParent, \"borderLeftWidth\", true);\r\n var currentOffset = this.offset();\r\n return {\r\n top: currentOffset.top - parentOffset.top - jQuery.css(elem, \"marginTop\", true),\r\n left: currentOffset.left - parentOffset.left - jQuery.css(elem, \"marginTop\", true)\r\n };\r\n }\r\n return oldPosition.apply(this, Array.prototype.slice.call( arguments ));\r\n }\r\n\r\n jQuery.each(['height', 'outerHeight'], function(_, name) {\r\n var old = jQuery.fn[name];\r\n jQuery.fn[name] = function() {\r\n if (this.length) {\r\n return old.apply(this, Array.prototype.slice.call( arguments ));\r\n }\r\n return null;\r\n }\r\n });\r\n}\r\n\r\nreturn jQuery;\r\n} );\r\n","import jQuery from 'jquery';\r\n\r\n/* eslint-disable */\r\n/*!\r\n * jQuery Smart Banner\r\n * Copyright (c) 2012 Arnold Daniels \r\n * Based on 'jQuery Smart Web App Banner' by Kurt Zenisek @ kzeni.com\r\n */\r\n(function($) {\r\n var UA = navigator.userAgent;\r\n var isEdge = /Edge/i.test(UA);\r\n\r\n var SmartBanner = function(options) {\r\n // Get the original margin-top of the HTML element so we can take that into account.\r\n this.origHtmlMargin = parseFloat($('html').css('margin-top'));\r\n this.options = $.extend({}, $.smartbanner.defaults, options);\r\n\r\n // Check if it's already a standalone web app or running within a webui view of an app (not mobile safari).\r\n var standalone = navigator.standalone;\r\n\r\n // Detect banner type (iOS or Android).\r\n if (this.options.force) {\r\n this.type = this.options.force;\r\n }\r\n else if (UA.match(/Windows Phone/i) !== null && UA.match(/Edge|Touch/i) !== null) {\r\n this.type = 'windows';\r\n }\r\n else if (UA.match(/iPhone|iPod/i) !== null || (UA.match(/iPad/) && this.options.iOSUniversalApp)) {\r\n this.type = 'ios';\r\n }\r\n else if (UA.match(/\\bSilk\\/(.*\\bMobile Safari\\b)?/) || UA.match(/\\bKF\\w/) || UA.match('Kindle Fire')) {\r\n this.type = 'kindle';\r\n }\r\n else if (UA.match(/Android/i) !== null) {\r\n this.type = 'android';\r\n }\r\n // For non-modern browsers that don't support HTML5 local storage, ignore and return.\r\n if (!('localStorage' in window) || window['localStorage'] === null) {\r\n return;\r\n }\r\n // Don't show banner if device isn't iOS or Android, website is loaded in app or user dismissed banner.\r\n if (!this.type || standalone || window.localStorage.getItem('sb-closed') === 'true' || this.getCookie('sb-installed')) {\r\n return;\r\n }\r\n // Calculate scale.\r\n this.scale = this.options.scale == 'auto' ? $(window).width() / window.screen.width : this.options.scale;\r\n if (this.scale < 1) {\r\n this.scale = 1;\r\n }\r\n // Get info from meta data.\r\n var meta = $(\r\n this.type == 'android'\r\n ? 'meta[name=\"google-play-app-bingads\"]'\r\n : (this.type == 'ios'\r\n ? 'meta[name=\"apple-itunes-app-bingads\"]'\r\n : (this.type == 'kindle'\r\n ? 'meta[name=\"kindle-fire-app\"]'\r\n : 'meta[name=\"msApplication-ID\"]'\r\n )\r\n )\r\n );\r\n\r\n if (!meta.length) {\r\n return;\r\n }\r\n // For Windows Store apps, get the PackageFamilyName for protocol launch.\r\n if (this.type == 'windows') {\r\n if (isEdge) {\r\n this.appId = $('meta[name=\"msApplication-PackageEdgeName\"]').attr('content');\r\n }\r\n if (!this.appId) {\r\n this.appId = $('meta[name=\"msApplication-PackageFamilyName\"]').attr('content');\r\n }\r\n }\r\n else {\r\n // Try to pull the appId out of the meta tag and store the result.\r\n var parsedMetaContent = /app-id=([^\\s,]+)/.exec(meta.attr('content'));\r\n if (parsedMetaContent) {\r\n this.appId = parsedMetaContent[1];\r\n } else {\r\n return;\r\n }\r\n }\r\n this.title = this.options.title\r\n ? this.options.title\r\n : (meta.data('title') || $('title').text().replace(/\\s*[|\\-·].*$/, ''));\r\n\r\n this.author = this.options.author\r\n ? this.options.author\r\n : (meta.data('author') || ($('meta[name=\"author\"]').length ? $('meta[name=\"author\"]').attr('content') : window.location.hostname));\r\n\r\n this.iconUrl = meta.data('icon-url');\r\n this.price = meta.data('price');\r\n\r\n // Set default onInstall callback if not set in options.\r\n if (typeof this.options.onInstall == 'function') {\r\n this.options.onInstall = this.options.onInstall;\r\n } else {\r\n this.options.onInstall = function() {};\r\n }\r\n // Set default onClose callback if not set in options.\r\n if (typeof this.options.onClose == 'function') {\r\n this.options.onClose = this.options.onClose;\r\n } else {\r\n this.options.onClose = function() {};\r\n }\r\n // Set default onShow callback if not set in options.\r\n if (typeof this.options.onShow == 'function') {\r\n this.options.onShow = this.options.onShow;\r\n } else {\r\n this.options.onShow = function() {};\r\n }\r\n // Create banner.\r\n this.create();\r\n this.show();\r\n this.listen();\r\n };\r\n\r\n SmartBanner.prototype = {\r\n\r\n constructor: SmartBanner,\r\n\r\n create: function() {\r\n var iconURL;\r\n var price = this.price || this.options.price;\r\n\r\n var link = this.options.url || (function() {\r\n switch (this.type) {\r\n case 'android':\r\n return 'market://details?id=';\r\n case 'kindle':\r\n return 'amzn://apps/android?asin=';\r\n case 'windows':\r\n return isEdge\r\n ? 'ms-windows-store://pdp/?productid='\r\n : 'ms-windows-store:navigate?appid=';\r\n }\r\n return 'https://itunes.apple.com/' + this.options.appStoreLanguage + '/app/id';\r\n }.call(this) + this.appId);\r\n\r\n var gloss = this.options.iconGloss == null\r\n ? (this.type=='ios')\r\n : this.options.iconGloss;\r\n\r\n if (this.type == 'android' && this.options.GooglePlayParams) {\r\n link += '&referrer=' + this.options.GooglePlayParams;\r\n }\r\n var banner = (\r\n '
' + // class=\"' + this.type + '\">' +\r\n '
' +\r\n '' +\r\n '' +\r\n '
' +\r\n '' + this.options.title + '' +\r\n '' + this.options.author + '' +\r\n '' + this.options.description + '' +\r\n '
' +\r\n '' +\r\n '
' +\r\n '
'\r\n );\r\n if (this.options.layer) {\r\n $(this.options.appendToSelector).append(banner);\r\n } else {\r\n $(this.options.appendToSelector).prepend(banner);\r\n }\r\n if (this.options.icon) {\r\n iconURL = this.options.icon;\r\n } else if(this.iconUrl) {\r\n iconURL = this.iconUrl;\r\n } else if ($('link[rel=\"apple-touch-icon-precomposed\"]').length > 0) {\r\n iconURL = $('link[rel=\"apple-touch-icon-precomposed\"]').attr('href');\r\n if (this.options.iconGloss == null) {\r\n gloss = false;\r\n }\r\n } else if ($('link[rel=\"apple-touch-icon\"]').length > 0) {\r\n iconURL = $('link[rel=\"apple-touch-icon\"]').attr('href');\r\n } else if ($('meta[name=\"msApplication-TileImage\"]').length > 0) {\r\n iconURL = $('meta[name=\"msApplication-TileImage\"]').attr('content');\r\n } else if ($('meta[name=\"msapplication-TileImage\"]').length > 0) {\r\n // Redundant because ms docs show two case usages.\r\n iconURL = $('meta[name=\"msapplication-TileImage\"]').attr('content');\r\n }\r\n if (iconURL) {\r\n $('#smartbanner .sb-icon').css('background-image', 'url(' + iconURL + ')');\r\n if (gloss) {\r\n $('#smartbanner .sb-icon').addClass('gloss');\r\n }\r\n } else{\r\n $('#smartbanner').addClass('no-icon');\r\n }\r\n this.bannerHeight = $('#smartbanner').outerHeight() + 2;\r\n\r\n if (this.scale > 1) {\r\n $('#smartbanner')\r\n .css('top', parseFloat($('#smartbanner').css('top')) * this.scale)\r\n .css('height', parseFloat($('#smartbanner').css('height')) * this.scale)\r\n .hide();\r\n $('#smartbanner .sb-container')\r\n .css('-webkit-transform', 'scale(' + this.scale + ')')\r\n .css('-msie-transform', 'scale(' + this.scale + ')')\r\n .css('-moz-transform', 'scale(' + this.scale + ')')\r\n .css('width', $(window).width() / this.scale);\r\n }\r\n $('#smartbanner')\r\n .css('position', this.options.layer ? 'fixed' : 'static');\r\n },\r\n\r\n listen: function() {\r\n $('#smartbanner .sb-close').on('click', $.proxy(this.close, this));\r\n $('#smartbanner .sb-button').on('click', $.proxy(this.install, this));\r\n if (this.options.contentSelector !== undefined) {\r\n $(document).on('DOMNodeInserted', $.proxy(this.adjustOuterContent, this));\r\n }\r\n },\r\n\r\n show: function(callback) {\r\n var banner = $('#smartbanner');\r\n banner.stop();\r\n\r\n if (this.options.layer) {\r\n banner\r\n .animate({ top: 0, display: 'block' }, this.options.speedIn)\r\n .addClass('shown')\r\n .show();\r\n $(this.pushSelector)\r\n .animate({\r\n paddingTop: this.origHtmlMargin + (this.bannerHeight * this.scale)\r\n }, this.options.speedIn, 'swing', callback);\r\n if (this.options.contentSelector !== undefined) {\r\n $(this.options.contentSelector)\r\n .animate({\r\n paddingTop: this.bannerHeight * this.scale\r\n }, this.options.speedIn, 'swing');\r\n }\r\n }\r\n else {\r\n if ($.support.transition) {\r\n banner.animate({ top: 0 }, this.options.speedIn).addClass('shown');\r\n var transitionCallback = function() {\r\n $('html').removeClass('sb-animation');\r\n if (callback) {\r\n callback();\r\n }\r\n };\r\n $(this.pushSelector)\r\n .addClass('sb-animation')\r\n .one($.support.transition.end, transitionCallback)\r\n .emulateTransitionEnd(this.options.speedIn)\r\n .css('margin-top', this.origHtmlMargin + (this.bannerHeight * this.scale));\r\n }\r\n else {\r\n banner\r\n .slideDown(this.options.speedIn)\r\n .addClass('shown');\r\n }\r\n }\r\n if (this.type && UA.match(/AppleWebKit/i)) {\r\n $(window).resize(this.adjustButton);\r\n $(window).scroll(this.adjustButton);\r\n $(window).resize();\r\n }\r\n this.options.onShow();\r\n },\r\n\r\n hide: function(callback) {\r\n var banner = $('#smartbanner');\r\n banner.stop();\r\n\r\n if (this.options.layer) {\r\n banner.animate({\r\n top: -1 * this.bannerHeight * this.scale,\r\n display: 'block'\r\n }, this.options.speedIn)\r\n .removeClass('shown');\r\n\r\n $(this.pushSelector)\r\n .animate({\r\n paddingTop: this.origHtmlMargin\r\n }, this.options.speedIn, 'swing', callback);\r\n\r\n if (this.options.contentSelector !== undefined) {\r\n $(this.options.contentSelector)\r\n .animate({\r\n paddingTop: 0\r\n }, this.options.speedIn, 'swing');\r\n }\r\n }\r\n else {\r\n if ($.support.transition) {\r\n if (this.type !== 'android') {\r\n banner\r\n .css('top', -1 * this.bannerHeight * this.scale)\r\n .removeClass('shown');\r\n }\r\n else {\r\n banner\r\n .css({display:'none'})\r\n .removeClass('shown');\r\n }\r\n var transitionCallback = function() {\r\n $('html').removeClass('sb-animation');\r\n if (callback) {\r\n callback();\r\n }\r\n };\r\n $(this.pushSelector)\r\n .addClass('sb-animation')\r\n .one($.support.transition.end, transitionCallback)\r\n .emulateTransitionEnd(this.options.speedOut)\r\n .css('margin-top', this.origHtmlMargin);\r\n }\r\n else {\r\n banner.slideUp(this.options.speedOut).removeClass('shown');\r\n }\r\n }\r\n if (this.type && UA.match(/AppleWebKit/i)) {\r\n $(window).off('resize', this.adjustButton);\r\n $(window).off('scroll', this.adjustButton);\r\n }\r\n if (this.options.contentSelector !== undefined) {\r\n $(document).off('DOMNodeInserted', $.proxy(this.adjustOuterContent, this));\r\n }\r\n },\r\n\r\n close: function(e) {\r\n e.preventDefault();\r\n this.hide();\r\n // this.setCookie('sb-closed', 'true', this.options.daysHidden);\r\n try {\r\n this.window.localStorage.setItem('sb-closed', true);\r\n } catch (e) {\r\n // Private browsing mode in Safari doesn't support writing to localStorage, ignore.\r\n }\r\n this.options.onClose(e);\r\n },\r\n\r\n install: function(e) {\r\n if (this.options.hideOnInstall) {\r\n this.hide();\r\n }\r\n this.setCookie('sb-installed', 'true', this.options.daysReminder);\r\n this.options.onInstall(e);\r\n },\r\n\r\n setCookie: function(name, value, exdays) {\r\n var exdate = new Date();\r\n exdate.setDate(exdate.getDate() + exdays);\r\n value = encodeURI(value) + ((exdays == null) ? '' : '; expires=' + exdate.toUTCString());\r\n document.cookie = name + '=' + value + '; path=/;';\r\n },\r\n\r\n getCookie: function(name) {\r\n var i, x, y, ARRcookies = document.cookie.split(';');\r\n for (i = 0; i < ARRcookies.length; i++) {\r\n x = ARRcookies[i].substr(0, ARRcookies[i].indexOf('='));\r\n y = ARRcookies[i].substr(ARRcookies[i].indexOf('=') + 1);\r\n x = x.replace(/^\\s+|\\s+$/g, '');\r\n if (x == name) {\r\n return decodeURI(y);\r\n }\r\n }\r\n return null;\r\n },\r\n\r\n adjustButton: function() {\r\n if ($('article').width() > window.innerWidth) {\r\n $('.sb-button').css({\r\n right: (1 - window.scrollX / ($('article').width() - window.innerWidth)) * ($('#smartbanner').width() - window.innerWidth)\r\n });\r\n }\r\n },\r\n\r\n adjustOuterContent: function(e) {\r\n if (this.options.contentSelector !== undefined\r\n && $(this.options.contentSelector).filter(e.target || e.srcElement).length > 0) {\r\n $(this.options.contentSelector)\r\n .animate({\r\n paddingTop: this.bannerHeight * this.scale\r\n }, this.options.speedIn, 'swing');\r\n }\r\n },\r\n\r\n // Demo only.\r\n switchType: function() {\r\n var that = this;\r\n\r\n this.hide(function() {\r\n that.type = that.type == 'android' ? 'ios' : 'android';\r\n var meta = $(that.type == 'android' ? 'meta[name=\"google-play-app-bingads\"]' : 'meta[name=\"apple-itunes-app-bingads\"]').attr('content');\r\n that.appId = /app-id=([^\\s,]+)/.exec(meta)[1];\r\n\r\n $('#smartbanner').detach();\r\n that.create();\r\n that.show();\r\n });\r\n }\r\n };\r\n\r\n $.smartbanner = function(option) {\r\n var $window = $(window);\r\n var data = $window.data('smartbanner');\r\n var options = typeof option == 'object' && option;\r\n if (!data) {\r\n $window.data('smartbanner', (data = new SmartBanner(options)));\r\n }\r\n if (typeof option == 'string') {\r\n data[option]();\r\n }\r\n };\r\n\r\n // override these globally if you like (they are all optional)\r\n $.smartbanner.defaults = {\r\n title: 'SmartBanner_AppName', // What the title of the app should be in the banner (defaults to )\r\n author: 'SmartBanner_Developer', // What the author of the app should be in the banner (defaults to <meta name=\"author\"> or hostname)\r\n appStoreLanguage: '', // Language code for App Store, use default here\r\n description: 'SmartBanner_Description', // Text for the app description\r\n GooglePlayParams: null, // Aditional parameters for the market\r\n icon: null, // The URL of the icon (defaults to <meta name=\"apple-touch-icon\">)\r\n iconGloss: null, // Force gloss effect for iOS even for precomposed\r\n button: 'SmartBanner_View', // Text for the install button\r\n url: null, // The URL for the button. Keep null if you want the button to link to the app store.\r\n scale: 1, // 'auto', // Scale based on viewport size (set to 1 to disable)\r\n speedIn: 300, // Show animation speed of the banner\r\n speedOut: 400, // Close animation speed of the banner\r\n daysHidden: 0, // Duration to hide the banner after being closed (0 = always show banner)\r\n daysReminder: 10, // Duration to hide the banner after \"VIEW\" is clicked *separate from when the close button is clicked* (0 = always show banner)\r\n force: null, // Choose 'ios', 'android' or 'windows'. Don't do a browser check, just always show this banner\r\n hideOnInstall: true, // Hide the banner after \"VIEW\" is clicked.\r\n layer: true, // Display as overlay layer or slide down the page\r\n iOSUniversalApp: true, // If the iOS App is a universal app for both iPad and iPhone, display Smart Banner to iPad users, too.\r\n appendToSelector: 'body', //Append the banner to a specific selector\r\n pushSelector: 'html' // What element is going to push the site content down; this is where the banner append animation will start.\r\n };\r\n\r\n $.smartbanner.Constructor = SmartBanner;\r\n\r\n // ============================================================\r\n // Bootstrap transition\r\n // Copyright 2011-2014 Twitter, Inc.\r\n // Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\r\n\r\n function transitionEnd () {\r\n var el = document.createElement('smartbanner');\r\n\r\n var transEndEventNames = {\r\n WebkitTransition: 'webkitTransitionEnd',\r\n MozTransition: 'transitionend',\r\n OTransition: 'oTransitionEnd otransitionend',\r\n transition: 'transitionend'\r\n };\r\n\r\n for (var name in transEndEventNames) {\r\n if (el.style[name] !== undefined) {\r\n return {end: transEndEventNames[name]};\r\n }\r\n }\r\n // Explicit for ie8.\r\n return false;\r\n }\r\n if ($.support.transition !== undefined) {\r\n // Prevent conflict with Twitter Bootstrap.\r\n return;\r\n }\r\n\r\n // http://blog.alexmaccaw.com/css-transitions\r\n $.fn.emulateTransitionEnd = function(duration) {\r\n var called = false, $el = this;\r\n $(this).one($.support.transition.end, function() {\r\n called = true;\r\n });\r\n var callback = function() {\r\n if (!called) {\r\n $($el).trigger($.support.transition.end);\r\n }\r\n };\r\n setTimeout(callback, duration);\r\n return this;\r\n };\r\n\r\n $(function() {\r\n $.support.transition = transitionEnd();\r\n });\r\n // ============================================================\r\n})(jQuery);\r\n","import jQuery from 'jquery';\r\n/* eslint-disable */\r\n/*!\r\n * jQuery UI Widget 1.8.22\r\n *\r\n * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)\r\n * Dual licensed under the MIT or GPL Version 2 licenses.\r\n * http://jquery.org/license\r\n *\r\n * http://docs.jquery.com/UI/Widget\r\n */\r\n(function( $, undefined ) {\r\n\r\n// jQuery 1.4+\r\nif ( $.cleanData ) {\r\n\tvar _cleanData = $.cleanData;\r\n\t$.cleanData = function( elems ) {\r\n\t\tfor ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {\r\n\t\t\ttry {\r\n\t\t\t\t$( elem ).triggerHandler( \"remove\" );\r\n\t\t\t// http://bugs.jquery.com/ticket/8235\r\n\t\t\t} catch( e ) {}\r\n\t\t}\r\n\t\t_cleanData( elems );\r\n\t};\r\n} else {\r\n\tvar _remove = $.fn.remove;\r\n\t$.fn.remove = function( selector, keepData ) {\r\n\t\treturn this.each(function() {\r\n\t\t\tif ( !keepData ) {\r\n\t\t\t\tif ( !selector || $.filter( selector, [ this ] ).length ) {\r\n\t\t\t\t\t$( \"*\", this ).add( [ this ] ).each(function() {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t$( this ).triggerHandler( \"remove\" );\r\n\t\t\t\t\t\t// http://bugs.jquery.com/ticket/8235\r\n\t\t\t\t\t\t} catch( e ) {}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn _remove.call( $(this), selector, keepData );\r\n\t\t});\r\n\t};\r\n}\r\n\r\n$.widget = function( name, base, prototype ) {\r\n\tvar namespace = name.split( \".\" )[ 0 ],\r\n\t\tfullName;\r\n\tname = name.split( \".\" )[ 1 ];\r\n\tfullName = namespace + \"-\" + name;\r\n\r\n\tif ( !prototype ) {\r\n\t\tprototype = base;\r\n\t\tbase = $.Widget;\r\n\t}\r\n\r\n\t// create selector for plugin\r\n\t$.expr[ \":\" ][ fullName ] = function( elem ) {\r\n\t\treturn !!$.data( elem, name );\r\n\t};\r\n\r\n\t$[ namespace ] = $[ namespace ] || {};\r\n\t$[ namespace ][ name ] = function( options, element ) {\r\n\t\t// allow instantiation without initializing for simple inheritance\r\n\t\tif ( arguments.length ) {\r\n\t\t\tthis._createWidget( options, element );\r\n\t\t}\r\n\t};\r\n\r\n\tvar basePrototype = new base();\r\n\t// we need to make the options hash a property directly on the new instance\r\n\t// otherwise we'll modify the options hash on the prototype that we're\r\n\t// inheriting from\r\n//\t$.each( basePrototype, function( key, val ) {\r\n//\t\tif ( $.isPlainObject(val) ) {\r\n//\t\t\tbasePrototype[ key ] = $.extend( {}, val );\r\n//\t\t}\r\n//\t});\r\n\tbasePrototype.options = $.extend( true, {}, basePrototype.options );\r\n\t$[ namespace ][ name ].prototype = $.extend( true, basePrototype, {\r\n\t\tnamespace: namespace,\r\n\t\twidgetName: name,\r\n\t\twidgetEventPrefix: $[ namespace ][ name ].prototype.widgetEventPrefix || name,\r\n\t\twidgetBaseClass: fullName\r\n\t}, prototype );\r\n\r\n\t$.widget.bridge( name, $[ namespace ][ name ] );\r\n};\r\n\r\n$.widget.bridge = function( name, object ) {\r\n\t$.fn[ name ] = function( options ) {\r\n\t\tvar isMethodCall = typeof options === \"string\",\r\n\t\t\targs = Array.prototype.slice.call( arguments, 1 ),\r\n\t\t\treturnValue = this;\r\n\r\n\t\t// allow multiple hashes to be passed on init\r\n\t\toptions = !isMethodCall && args.length ?\r\n\t\t\t$.extend.apply( null, [ true, options ].concat(args) ) :\r\n\t\t\toptions;\r\n\r\n\t\t// prevent calls to internal methods\r\n\t\tif ( isMethodCall && options.charAt( 0 ) === \"_\" ) {\r\n\t\t\treturn returnValue;\r\n\t\t}\r\n\r\n\t\tif ( isMethodCall ) {\r\n\t\t\tthis.each(function() {\r\n\t\t\t\tvar instance = $.data( this, name ),\r\n\t\t\t\t\tmethodValue = instance && $.isFunction( instance[options] ) ?\r\n\t\t\t\t\t\tinstance[ options ].apply( instance, args ) :\r\n\t\t\t\t\t\tinstance;\r\n\t\t\t\t// TODO: add this back in 1.9 and use $.error() (see #5972)\r\n//\t\t\t\tif ( !instance ) {\r\n//\t\t\t\t\tthrow \"cannot call methods on \" + name + \" prior to initialization; \" +\r\n//\t\t\t\t\t\t\"attempted to call method '\" + options + \"'\";\r\n//\t\t\t\t}\r\n//\t\t\t\tif ( !$.isFunction( instance[options] ) ) {\r\n//\t\t\t\t\tthrow \"no such method '\" + options + \"' for \" + name + \" widget instance\";\r\n//\t\t\t\t}\r\n//\t\t\t\tvar methodValue = instance[ options ].apply( instance, args );\r\n\t\t\t\tif ( methodValue !== instance && methodValue !== undefined ) {\r\n\t\t\t\t\treturnValue = methodValue;\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tthis.each(function() {\r\n\t\t\t\tvar instance = $.data( this, name );\r\n\t\t\t\tif ( instance ) {\r\n\t\t\t\t\tinstance.option( options || {} )._init();\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$.data( this, name, new object( options, this ) );\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn returnValue;\r\n\t};\r\n};\r\n\r\n$.Widget = function( options, element ) {\r\n\t// allow instantiation without initializing for simple inheritance\r\n\tif ( arguments.length ) {\r\n\t\tthis._createWidget( options, element );\r\n\t}\r\n};\r\n\r\n$.Widget.prototype = {\r\n\twidgetName: \"widget\",\r\n\twidgetEventPrefix: \"\",\r\n\toptions: {\r\n\t\tdisabled: false\r\n\t},\r\n\t_createWidget: function( options, element ) {\r\n\t\t// $.widget.bridge stores the plugin instance, but we do it anyway\r\n\t\t// so that it's stored even before the _create function runs\r\n\t\t$.data( element, this.widgetName, this );\r\n\t\tthis.element = $( element );\r\n\t\tthis.options = $.extend( true, {},\r\n\t\t\tthis.options,\r\n\t\t\tthis._getCreateOptions(),\r\n\t\t\toptions );\r\n\r\n\t\tvar self = this;\r\n\t\tthis.element.bind( \"remove.\" + this.widgetName, function() {\r\n\t\t\tself.destroy();\r\n\t\t});\r\n\r\n\t\tthis._create();\r\n\t\tthis._trigger( \"create\" );\r\n\t\tthis._init();\r\n\t},\r\n\t_getCreateOptions: function() {\r\n\t\treturn $.metadata && $.metadata.get( this.element[0] )[ this.widgetName ];\r\n\t},\r\n\t_create: function() {},\r\n\t_init: function() {},\r\n\r\n\tdestroy: function() {\r\n\t\tthis.element\r\n\t\t\t.unbind( \".\" + this.widgetName )\r\n\t\t\t.removeData( this.widgetName );\r\n\t\tthis.widget()\r\n\t\t\t.unbind( \".\" + this.widgetName )\r\n\t\t\t.removeAttr( \"aria-disabled\" )\r\n\t\t\t.removeClass(\r\n\t\t\t\tthis.widgetBaseClass + \"-disabled \" +\r\n\t\t\t\t\"ui-state-disabled\" );\r\n\t},\r\n\r\n\twidget: function() {\r\n\t\treturn this.element;\r\n\t},\r\n\r\n\toption: function( key, value ) {\r\n\t\tvar options = key;\r\n\r\n\t\tif ( arguments.length === 0 ) {\r\n\t\t\t// don't return a reference to the internal hash\r\n\t\t\treturn $.extend( {}, this.options );\r\n\t\t}\r\n\r\n\t\tif (typeof key === \"string\" ) {\r\n\t\t\tif ( value === undefined ) {\r\n\t\t\t\treturn this.options[ key ];\r\n\t\t\t}\r\n\t\t\toptions = {};\r\n\t\t\toptions[ key ] = value;\r\n\t\t}\r\n\r\n\t\tthis._setOptions( options );\r\n\r\n\t\treturn this;\r\n\t},\r\n\t_setOptions: function( options ) {\r\n\t\tvar self = this;\r\n\t\t$.each( options, function( key, value ) {\r\n\t\t\tself._setOption( key, value );\r\n\t\t});\r\n\r\n\t\treturn this;\r\n\t},\r\n\t_setOption: function( key, value ) {\r\n\t\tthis.options[ key ] = value;\r\n\r\n\t\tif ( key === \"disabled\" ) {\r\n\t\t\tthis.widget()\r\n\t\t\t\t[ value ? \"addClass\" : \"removeClass\"](\r\n\t\t\t\t\tthis.widgetBaseClass + \"-disabled\" + \" \" +\r\n\t\t\t\t\t\"ui-state-disabled\" )\r\n\t\t\t\t.attr( \"aria-disabled\", value );\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\tenable: function() {\r\n\t\treturn this._setOption( \"disabled\", false );\r\n\t},\r\n\tdisable: function() {\r\n\t\treturn this._setOption( \"disabled\", true );\r\n\t},\r\n\r\n\t_trigger: function( type, event, data ) {\r\n\t\tvar prop, orig,\r\n\t\t\tcallback = this.options[ type ];\r\n\r\n\t\tdata = data || {};\r\n\t\tevent = $.Event( event );\r\n\t\tevent.type = ( type === this.widgetEventPrefix ?\r\n\t\t\ttype :\r\n\t\t\tthis.widgetEventPrefix + type ).toLowerCase();\r\n\t\t// the original event may come from any element\r\n\t\t// so we need to reset the target on the new event\r\n\t\tevent.target = this.element[ 0 ];\r\n\r\n\t\t// copy original event properties over to the new event\r\n\t\torig = event.originalEvent;\r\n\t\tif ( orig ) {\r\n\t\t\tfor ( prop in orig ) {\r\n\t\t\t\tif ( !( prop in event ) ) {\r\n\t\t\t\t\tevent[ prop ] = orig[ prop ];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.element.trigger( event, data );\r\n\r\n\t\treturn !( $.isFunction(callback) &&\r\n\t\t\tcallback.call( this.element[0], event, data ) === false ||\r\n\t\t\tevent.isDefaultPrevented() );\r\n\t}\r\n};\r\n\r\n})( jQuery );\r\n","import jQuery from 'jquery';\r\n\r\n/* eslint-disable */\r\n/*!\r\n * jQuery Validation Plugin v1.16.0\r\n *\r\n * http://jqueryvalidation.org/\r\n *\r\n * Copyright (c) 2016 Jörn Zaefferer\r\n * Released under the MIT license\r\n */\r\n(function( $ ) {\r\n\r\n$.extend( $.fn, {\r\n\r\n\t// http://jqueryvalidation.org/validate/\r\n\tvalidate: function( options ) {\r\n\r\n\t\t// If nothing is selected, return nothing; can't chain anyway\r\n\t\tif ( !this.length ) {\r\n\t\t\tif ( options && options.debug && window.console ) {\r\n\t\t\t\tconsole.warn( \"Nothing selected, can't validate, returning nothing.\" );\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Check if a validator for this form was already created\r\n\t\tvar validator = $.data( this[ 0 ], \"validator\" );\r\n\t\tif ( validator ) {\r\n\t\t\treturn validator;\r\n\t\t}\r\n\r\n\t\t// Add novalidate tag if HTML5.\r\n\t\tthis.attr( \"novalidate\", \"novalidate\" );\r\n\r\n\t\tvalidator = new $.validator( options, this[ 0 ] );\r\n\t\t$.data( this[ 0 ], \"validator\", validator );\r\n\r\n\t\tif ( validator.settings.onsubmit ) {\r\n\r\n\t\t\tthis.on( \"click.validate\", \":submit\", function( event ) {\r\n\t\t\t\tif ( validator.settings.submitHandler ) {\r\n\t\t\t\t\tvalidator.submitButton = event.target;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Allow suppressing validation by adding a cancel class to the submit button\r\n\t\t\t\tif ( $( this ).hasClass( \"cancel\" ) ) {\r\n\t\t\t\t\tvalidator.cancelSubmit = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Allow suppressing validation by adding the html5 formnovalidate attribute to the submit button\r\n\t\t\t\tif ( $( this ).attr( \"formnovalidate\" ) !== undefined ) {\r\n\t\t\t\t\tvalidator.cancelSubmit = true;\r\n\t\t\t\t}\r\n\t\t\t} );\r\n\r\n\t\t\t// Validate the form on submit\r\n\t\t\tthis.on( \"submit.validate\", function( event ) {\r\n\t\t\t\tif ( validator.settings.debug ) {\r\n\r\n\t\t\t\t\t// Prevent form submit to be able to see console output\r\n\t\t\t\t\tevent.preventDefault();\r\n\t\t\t\t}\r\n\t\t\t\tfunction handle() {\r\n\t\t\t\t\tvar hidden, result;\r\n\t\t\t\t\tif ( validator.settings.submitHandler ) {\r\n\t\t\t\t\t\tif ( validator.submitButton ) {\r\n\r\n\t\t\t\t\t\t\t// Insert a hidden input as a replacement for the missing submit button\r\n\t\t\t\t\t\t\thidden = $( \"<input type='hidden'/>\" )\r\n\t\t\t\t\t\t\t\t.attr( \"name\", validator.submitButton.name )\r\n\t\t\t\t\t\t\t\t.val( $( validator.submitButton ).val() )\r\n\t\t\t\t\t\t\t\t.appendTo( validator.currentForm );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tresult = validator.settings.submitHandler.call( validator, validator.currentForm, event );\r\n\t\t\t\t\t\tif ( validator.submitButton ) {\r\n\r\n\t\t\t\t\t\t\t// And clean up afterwards; thanks to no-block-scope, hidden can be referenced\r\n\t\t\t\t\t\t\thidden.remove();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif ( result !== undefined ) {\r\n\t\t\t\t\t\t\treturn result;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Prevent submit for invalid forms or custom submit handlers\r\n\t\t\t\tif ( validator.cancelSubmit ) {\r\n\t\t\t\t\tvalidator.cancelSubmit = false;\r\n\t\t\t\t\treturn handle();\r\n\t\t\t\t}\r\n\t\t\t\tif ( validator.form() ) {\r\n\t\t\t\t\tif ( validator.pendingRequest ) {\r\n\t\t\t\t\t\tvalidator.formSubmitted = true;\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn handle();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvalidator.focusInvalid();\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t} );\r\n\t\t}\r\n\r\n\t\treturn validator;\r\n\t},\r\n\r\n\t// http://jqueryvalidation.org/valid/\r\n\tvalid: function() {\r\n\t\tvar valid, validator, errorList;\r\n\r\n\t\tif ( $( this[ 0 ] ).is( \"form\" ) ) {\r\n\t\t\tvalid = this.validate().form();\r\n\t\t} else {\r\n\t\t\terrorList = [];\r\n\t\t\tvalid = true;\r\n\t\t\tvalidator = $( this[ 0 ].form ).validate();\r\n\t\t\tthis.each( function() {\r\n\t\t\t\tvalid = validator.element( this ) && valid;\r\n\t\t\t\tif ( !valid ) {\r\n\t\t\t\t\terrorList = errorList.concat( validator.errorList );\r\n\t\t\t\t}\r\n\t\t\t} );\r\n\t\t\tvalidator.errorList = errorList;\r\n\t\t}\r\n\t\treturn valid;\r\n\t},\r\n\r\n\t// http://jqueryvalidation.org/rules/\r\n\trules: function( command, argument ) {\r\n\t\tvar element = this[ 0 ],\r\n\t\t\tsettings, staticRules, existingRules, data, param, filtered;\r\n\r\n\t\t// If nothing is selected, return empty object; can't chain anyway\r\n\t\tif ( element == null || element.form == null ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif ( command ) {\r\n\t\t\tsettings = $.data( element.form, \"validator\" ).settings;\r\n\t\t\tstaticRules = settings.rules;\r\n\t\t\texistingRules = $.validator.staticRules( element );\r\n\t\t\tswitch ( command ) {\r\n\t\t\tcase \"add\":\r\n\t\t\t\t$.extend( existingRules, $.validator.normalizeRule( argument ) );\r\n\r\n\t\t\t\t// Remove messages from rules, but allow them to be set separately\r\n\t\t\t\tdelete existingRules.messages;\r\n\t\t\t\tstaticRules[ element.name ] = existingRules;\r\n\t\t\t\tif ( argument.messages ) {\r\n\t\t\t\t\tsettings.messages[ element.name ] = $.extend( settings.messages[ element.name ], argument.messages );\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"remove\":\r\n\t\t\t\tif ( !argument ) {\r\n\t\t\t\t\tdelete staticRules[ element.name ];\r\n\t\t\t\t\treturn existingRules;\r\n\t\t\t\t}\r\n\t\t\t\tfiltered = {};\r\n\t\t\t\t$.each( argument.split( /\\s/ ), function( index, method ) {\r\n\t\t\t\t\tfiltered[ method ] = existingRules[ method ];\r\n\t\t\t\t\tdelete existingRules[ method ];\r\n\t\t\t\t\tif ( method === \"required\" ) {\r\n\t\t\t\t\t\t$( element ).removeAttr( \"aria-required\" );\r\n\t\t\t\t\t}\r\n\t\t\t\t} );\r\n\t\t\t\treturn filtered;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tdata = $.validator.normalizeRules(\r\n\t\t$.extend(\r\n\t\t\t{},\r\n\t\t\t$.validator.classRules( element ),\r\n\t\t\t$.validator.attributeRules( element ),\r\n\t\t\t$.validator.dataRules( element ),\r\n\t\t\t$.validator.staticRules( element )\r\n\t\t), element );\r\n\r\n\t\t// Make sure required is at front\r\n\t\tif ( data.required ) {\r\n\t\t\tparam = data.required;\r\n\t\t\tdelete data.required;\r\n\t\t\tdata = $.extend( { required: param }, data );\r\n\t\t\t$( element ).attr( \"aria-required\", \"true\" );\r\n\t\t}\r\n\r\n\t\t// Make sure remote is at back\r\n\t\tif ( data.remote ) {\r\n\t\t\tparam = data.remote;\r\n\t\t\tdelete data.remote;\r\n\t\t\tdata = $.extend( data, { remote: param } );\r\n\t\t}\r\n\r\n\t\treturn data;\r\n\t}\r\n} );\r\n\r\n// Custom selectors\r\n$.extend( $.expr.pseudos || $.expr[ \":\" ], {\t\t// '|| $.expr[ \":\" ]' here enables backwards compatibility to jQuery 1.7. Can be removed when dropping jQ 1.7.x support\r\n\r\n\t// http://jqueryvalidation.org/blank-selector/\r\n\tblank: function( a ) {\r\n\t\treturn !$.trim( \"\" + $( a ).val() );\r\n\t},\r\n\r\n\t// http://jqueryvalidation.org/filled-selector/\r\n\tfilled: function( a ) {\r\n\t\tvar val = $( a ).val();\r\n\t\treturn val !== null && !!$.trim( \"\" + val );\r\n\t},\r\n\r\n\t// http://jqueryvalidation.org/unchecked-selector/\r\n\tunchecked: function( a ) {\r\n\t\treturn !$( a ).prop( \"checked\" );\r\n\t}\r\n} );\r\n\r\n// Constructor for validator\r\n$.validator = function( options, form ) {\r\n\tthis.settings = $.extend( true, {}, $.validator.defaults, options );\r\n\tthis.currentForm = form;\r\n\tthis.init();\r\n};\r\n\r\n// http://jqueryvalidation.org/jQuery.validator.format/\r\n$.validator.format = function( source, params ) {\r\n\tif ( arguments.length === 1 ) {\r\n\t\treturn function() {\r\n\t\t\tvar args = $.makeArray( arguments );\r\n\t\t\targs.unshift( source );\r\n\t\t\treturn $.validator.format.apply( this, args );\r\n\t\t};\r\n\t}\r\n\tif ( params === undefined ) {\r\n\t\treturn source;\r\n\t}\r\n\tif ( arguments.length > 2 && params.constructor !== Array ) {\r\n\t\tparams = $.makeArray( arguments ).slice( 1 );\r\n\t}\r\n\tif ( params.constructor !== Array ) {\r\n\t\tparams = [ params ];\r\n\t}\r\n\t$.each( params, function( i, n ) {\r\n\t\tsource = source.replace( new RegExp( \"\\\\{\" + i + \"\\\\}\", \"g\" ), function() {\r\n\t\t\treturn n;\r\n\t\t} );\r\n\t} );\r\n\treturn source;\r\n};\r\n\r\n$.extend( $.validator, {\r\n\r\n\tdefaults: {\r\n\t\tmessages: {},\r\n\t\tgroups: {},\r\n\t\trules: {},\r\n\t\terrorClass: \"error\",\r\n\t\tpendingClass: \"pending\",\r\n\t\tvalidClass: \"valid\",\r\n\t\terrorElement: \"label\",\r\n\t\tfocusCleanup: false,\r\n\t\tfocusInvalid: true,\r\n\t\terrorContainer: $( [] ),\r\n\t\terrorLabelContainer: $( [] ),\r\n\t\tonsubmit: true,\r\n\t\tignore: \":hidden\",\r\n\t\tignoreTitle: false,\r\n\t\tonfocusin: function( element ) {\r\n\t\t\tthis.lastActive = element;\r\n\r\n\t\t\t// Hide error label and remove error class on focus if enabled\r\n\t\t\tif ( this.settings.focusCleanup ) {\r\n\t\t\t\tif ( this.settings.unhighlight ) {\r\n\t\t\t\t\tthis.settings.unhighlight.call( this, element, this.settings.errorClass, this.settings.validClass );\r\n\t\t\t\t}\r\n\t\t\t\tthis.hideThese( this.errorsFor( element ) );\r\n\t\t\t}\r\n\t\t},\r\n\t\tonfocusout: function( element ) {\r\n\t\t\tif ( !this.checkable( element ) && ( element.name in this.submitted || !this.optional( element ) ) ) {\r\n\t\t\t\tthis.element( element );\r\n\t\t\t}\r\n\t\t},\r\n\t\tonkeyup: function( element, event ) {\r\n\r\n\t\t\t// Avoid revalidate the field when pressing one of the following keys\r\n\t\t\t// Shift => 16\r\n\t\t\t// Ctrl => 17\r\n\t\t\t// Alt => 18\r\n\t\t\t// Caps lock => 20\r\n\t\t\t// End => 35\r\n\t\t\t// Home => 36\r\n\t\t\t// Left arrow => 37\r\n\t\t\t// Up arrow => 38\r\n\t\t\t// Right arrow => 39\r\n\t\t\t// Down arrow => 40\r\n\t\t\t// Insert => 45\r\n\t\t\t// Num lock => 144\r\n\t\t\t// AltGr key => 225\r\n\t\t\tvar excludedKeys = [\r\n\t\t\t\t16, 17, 18, 20, 35, 36, 37,\r\n\t\t\t\t38, 39, 40, 45, 144, 225\r\n\t\t\t];\r\n\r\n\t\t\tif ( event.which === 9 && this.elementValue( element ) === \"\" || $.inArray( event.keyCode, excludedKeys ) !== -1 ) {\r\n\t\t\t\treturn;\r\n\t\t\t} else if ( element.name in this.submitted || element.name in this.invalid ) {\r\n\t\t\t\tthis.element( element );\r\n\t\t\t}\r\n\t\t},\r\n\t\tonclick: function( element ) {\r\n\r\n\t\t\t// Click on selects, radiobuttons and checkboxes\r\n\t\t\tif ( element.name in this.submitted ) {\r\n\t\t\t\tthis.element( element );\r\n\r\n\t\t\t// Or option elements, check parent select in that case\r\n\t\t\t} else if ( element.parentNode.name in this.submitted ) {\r\n\t\t\t\tthis.element( element.parentNode );\r\n\t\t\t}\r\n\t\t},\r\n\t\thighlight: function( element, errorClass, validClass ) {\r\n\t\t\tif ( element.type === \"radio\" ) {\r\n\t\t\t\tthis.findByName( element.name ).addClass( errorClass ).removeClass( validClass );\r\n\t\t\t} else {\r\n\t\t\t\t$( element ).addClass( errorClass ).removeClass( validClass );\r\n\t\t\t}\r\n\t\t},\r\n\t\tunhighlight: function( element, errorClass, validClass ) {\r\n\t\t\tif ( element.type === \"radio\" ) {\r\n\t\t\t\tthis.findByName( element.name ).removeClass( errorClass ).addClass( validClass );\r\n\t\t\t} else {\r\n\t\t\t\t$( element ).removeClass( errorClass ).addClass( validClass );\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t// http://jqueryvalidation.org/jQuery.validator.setDefaults/\r\n\tsetDefaults: function( settings ) {\r\n\t\t$.extend( $.validator.defaults, settings );\r\n\t},\r\n\r\n\tmessages: {\r\n\t\trequired: \"This field is required.\",\r\n\t\tremote: \"Please fix this field.\",\r\n\t\temail: \"Please enter a valid email address.\",\r\n\t\turl: \"Please enter a valid URL.\",\r\n\t\tdate: \"Please enter a valid date.\",\r\n\t\tdateISO: \"Please enter a valid date (ISO).\",\r\n\t\tnumber: \"Please enter a valid number.\",\r\n\t\tdigits: \"Please enter only digits.\",\r\n\t\tequalTo: \"Please enter the same value again.\",\r\n\t\tmaxlength: $.validator.format( \"Please enter no more than {0} characters.\" ),\r\n\t\tminlength: $.validator.format( \"Please enter at least {0} characters.\" ),\r\n\t\trangelength: $.validator.format( \"Please enter a value between {0} and {1} characters long.\" ),\r\n\t\trange: $.validator.format( \"Please enter a value between {0} and {1}.\" ),\r\n\t\tmax: $.validator.format( \"Please enter a value less than or equal to {0}.\" ),\r\n\t\tmin: $.validator.format( \"Please enter a value greater than or equal to {0}.\" ),\r\n\t\tstep: $.validator.format( \"Please enter a multiple of {0}.\" )\r\n\t},\r\n\r\n\tautoCreateRanges: false,\r\n\r\n\tprototype: {\r\n\r\n\t\tinit: function() {\r\n\t\t\tthis.labelContainer = $( this.settings.errorLabelContainer );\r\n\t\t\tthis.errorContext = this.labelContainer.length && this.labelContainer || $( this.currentForm );\r\n\t\t\tthis.containers = $( this.settings.errorContainer ).add( this.settings.errorLabelContainer );\r\n\t\t\tthis.submitted = {};\r\n\t\t\tthis.valueCache = {};\r\n\t\t\tthis.pendingRequest = 0;\r\n\t\t\tthis.pending = {};\r\n\t\t\tthis.invalid = {};\r\n\t\t\tthis.reset();\r\n\r\n\t\t\tvar groups = ( this.groups = {} ),\r\n\t\t\t\trules;\r\n\t\t\t$.each( this.settings.groups, function( key, value ) {\r\n\t\t\t\tif ( typeof value === \"string\" ) {\r\n\t\t\t\t\tvalue = value.split( /\\s/ );\r\n\t\t\t\t}\r\n\t\t\t\t$.each( value, function( index, name ) {\r\n\t\t\t\t\tgroups[ name ] = key;\r\n\t\t\t\t} );\r\n\t\t\t} );\r\n\t\t\trules = this.settings.rules;\r\n\t\t\t$.each( rules, function( key, value ) {\r\n\t\t\t\trules[ key ] = $.validator.normalizeRule( value );\r\n\t\t\t} );\r\n\r\n\t\t\tfunction delegate( event ) {\r\n\r\n\t\t\t\t// Set form expando on contenteditable\r\n\t\t\t\tif ( !this.form && this.hasAttribute( \"contenteditable\" ) ) {\r\n\t\t\t\t\tthis.form = $( this ).closest( \"form\" )[ 0 ];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar validator = $.data( this.form, \"validator\" ),\r\n\t\t\t\t\teventType = \"on\" + event.type.replace( /^validate/, \"\" ),\r\n\t\t\t\t\tsettings = validator.settings;\r\n\t\t\t\tif ( settings[ eventType ] && !$( this ).is( settings.ignore ) ) {\r\n\t\t\t\t\tsettings[ eventType ].call( validator, this, event );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t$( this.currentForm )\r\n\t\t\t\t.on( \"focusin.validate focusout.validate keyup.validate\",\r\n\t\t\t\t\t\":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], \" +\r\n\t\t\t\t\t\"[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], \" +\r\n\t\t\t\t\t\"[type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], \" +\r\n\t\t\t\t\t\"[type='radio'], [type='checkbox'], [contenteditable], [type='button']\", delegate )\r\n\r\n\t\t\t\t// Support: Chrome, oldIE\r\n\t\t\t\t// \"select\" is provided as event.target when clicking a option\r\n\t\t\t\t.on( \"click.validate\", \"select, option, [type='radio'], [type='checkbox']\", delegate );\r\n\r\n\t\t\tif ( this.settings.invalidHandler ) {\r\n\t\t\t\t$( this.currentForm ).on( \"invalid-form.validate\", this.settings.invalidHandler );\r\n\t\t\t}\r\n\r\n\t\t\t// Add aria-required to any Static/Data/Class required fields before first validation\r\n\t\t\t// Screen readers require this attribute to be present before the initial submission http://www.w3.org/TR/WCAG-TECHS/ARIA2.html\r\n\t\t\t$( this.currentForm ).find( \"[required], [data-rule-required], .required\" ).attr( \"aria-required\", \"true\" );\r\n\t\t},\r\n\r\n\t\t// http://jqueryvalidation.org/Validator.form/\r\n\t\tform: function() {\r\n\t\t\tthis.checkForm();\r\n\t\t\t$.extend( this.submitted, this.errorMap );\r\n\t\t\tthis.invalid = $.extend( {}, this.errorMap );\r\n\t\t\tif ( !this.valid() ) {\r\n\t\t\t\t$( this.currentForm ).triggerHandler( \"invalid-form\", [ this ] );\r\n\t\t\t}\r\n\t\t\tthis.showErrors();\r\n\t\t\treturn this.valid();\r\n\t\t},\r\n\r\n\t\tcheckForm: function() {\r\n\t\t\tthis.prepareForm();\r\n\t\t\tfor ( var i = 0, elements = ( this.currentElements = this.elements() ); elements[ i ]; i++ ) {\r\n\t\t\t\tthis.check( elements[ i ] );\r\n\t\t\t}\r\n\t\t\treturn this.valid();\r\n\t\t},\r\n\r\n\t\t// http://jqueryvalidation.org/Validator.element/\r\n\t\telement: function( element ) {\r\n\t\t\tvar cleanElement = this.clean( element ),\r\n\t\t\t\tcheckElement = this.validationTargetFor( cleanElement ),\r\n\t\t\t\tv = this,\r\n\t\t\t\tresult = true,\r\n\t\t\t\trs, group;\r\n\r\n\t\t\tif ( checkElement === undefined ) {\r\n\t\t\t\tdelete this.invalid[ cleanElement.name ];\r\n\t\t\t} else {\r\n\t\t\t\tthis.prepareElement( checkElement );\r\n\t\t\t\tthis.currentElements = $( checkElement );\r\n\r\n\t\t\t\t// If this element is grouped, then validate all group elements already\r\n\t\t\t\t// containing a value\r\n\t\t\t\tgroup = this.groups[ checkElement.name ];\r\n\t\t\t\tif ( group ) {\r\n\t\t\t\t\t$.each( this.groups, function( name, testgroup ) {\r\n\t\t\t\t\t\tif ( testgroup === group && name !== checkElement.name ) {\r\n\t\t\t\t\t\t\tcleanElement = v.validationTargetFor( v.clean( v.findByName( name ) ) );\r\n\t\t\t\t\t\t\tif ( cleanElement && cleanElement.name in v.invalid ) {\r\n\t\t\t\t\t\t\t\tv.currentElements.push( cleanElement );\r\n\t\t\t\t\t\t\t\tresult = v.check( cleanElement ) && result;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} );\r\n\t\t\t\t}\r\n\r\n\t\t\t\trs = this.check( checkElement ) !== false;\r\n\t\t\t\tresult = result && rs;\r\n\t\t\t\tif ( rs ) {\r\n\t\t\t\t\tthis.invalid[ checkElement.name ] = false;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.invalid[ checkElement.name ] = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ( !this.numberOfInvalids() ) {\r\n\r\n\t\t\t\t\t// Hide error containers on last error\r\n\t\t\t\t\tthis.toHide = this.toHide.add( this.containers );\r\n\t\t\t\t}\r\n\t\t\t\tthis.showErrors();\r\n\r\n\t\t\t\t// Add aria-invalid status for screen readers\r\n\t\t\t\t$( element ).attr( \"aria-invalid\", !rs );\r\n\t\t\t}\r\n\r\n\t\t\treturn result;\r\n\t\t},\r\n\r\n\t\t// http://jqueryvalidation.org/Validator.showErrors/\r\n\t\tshowErrors: function( errors ) {\r\n\t\t\tif ( errors ) {\r\n\t\t\t\tvar validator = this;\r\n\r\n\t\t\t\t// Add items to error list and map\r\n\t\t\t\t$.extend( this.errorMap, errors );\r\n\t\t\t\tthis.errorList = $.map( this.errorMap, function( message, name ) {\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\tmessage: message,\r\n\t\t\t\t\t\telement: validator.findByName( name )[ 0 ]\r\n\t\t\t\t\t};\r\n\t\t\t\t} );\r\n\r\n\t\t\t\t// Remove items from success list\r\n\t\t\t\tthis.successList = $.grep( this.successList, function( element ) {\r\n\t\t\t\t\treturn !( element.name in errors );\r\n\t\t\t\t} );\r\n\t\t\t}\r\n\t\t\tif ( this.settings.showErrors ) {\r\n\t\t\t\tthis.settings.showErrors.call( this, this.errorMap, this.errorList );\r\n\t\t\t} else {\r\n\t\t\t\tthis.defaultShowErrors();\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\t// http://jqueryvalidation.org/Validator.resetForm/\r\n\t\tresetForm: function() {\r\n\t\t\tif ( $.fn.resetForm ) {\r\n\t\t\t\t$( this.currentForm ).resetForm();\r\n\t\t\t}\r\n\t\t\tthis.invalid = {};\r\n\t\t\tthis.submitted = {};\r\n\t\t\tthis.prepareForm();\r\n\t\t\tthis.hideErrors();\r\n\t\t\tvar elements = this.elements()\r\n\t\t\t\t.removeData( \"previousValue\" )\r\n\t\t\t\t.removeAttr( \"aria-invalid\" );\r\n\r\n\t\t\tthis.resetElements( elements );\r\n\t\t},\r\n\r\n\t\tresetElements: function( elements ) {\r\n\t\t\tvar i;\r\n\r\n\t\t\tif ( this.settings.unhighlight ) {\r\n\t\t\t\tfor ( i = 0; elements[ i ]; i++ ) {\r\n\t\t\t\t\tthis.settings.unhighlight.call( this, elements[ i ],\r\n\t\t\t\t\t\tthis.settings.errorClass, \"\" );\r\n\t\t\t\t\tthis.findByName( elements[ i ].name ).removeClass( this.settings.validClass );\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\telements\r\n\t\t\t\t\t.removeClass( this.settings.errorClass )\r\n\t\t\t\t\t.removeClass( this.settings.validClass );\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tnumberOfInvalids: function() {\r\n\t\t\treturn this.objectLength( this.invalid );\r\n\t\t},\r\n\r\n\t\tobjectLength: function( obj ) {\r\n\t\t\t/* jshint unused: false */\r\n\t\t\tvar count = 0,\r\n\t\t\t\ti;\r\n\t\t\tfor ( i in obj ) {\r\n\t\t\t\tif ( obj[ i ] ) {\r\n\t\t\t\t\tcount++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn count;\r\n\t\t},\r\n\r\n\t\thideErrors: function() {\r\n\t\t\tthis.hideThese( this.toHide );\r\n\t\t},\r\n\r\n\t\thideThese: function( errors ) {\r\n\t\t\terrors.not( this.containers ).text( \"\" );\r\n\t\t\tthis.addWrapper( errors ).hide();\r\n\t\t},\r\n\r\n\t\tvalid: function() {\r\n\t\t\treturn this.size() === 0;\r\n\t\t},\r\n\r\n\t\tsize: function() {\r\n\t\t\treturn this.errorList.length;\r\n\t\t},\r\n\r\n\t\tfocusInvalid: function() {\r\n\t\t\tif ( this.settings.focusInvalid ) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\t$( this.findLastActive() || this.errorList.length && this.errorList[ 0 ].element || [] )\r\n\t\t\t\t\t.filter( \":visible\" )\r\n\t\t\t\t\t.focus()\r\n\r\n\t\t\t\t\t// Manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find\r\n\t\t\t\t\t.trigger( \"focusin\" );\r\n\t\t\t\t} catch ( e ) {\r\n\r\n\t\t\t\t\t// Ignore IE throwing errors when focusing hidden elements\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tfindLastActive: function() {\r\n\t\t\tvar lastActive = this.lastActive;\r\n\t\t\treturn lastActive && $.grep( this.errorList, function( n ) {\r\n\t\t\t\treturn n.element.name === lastActive.name;\r\n\t\t\t} ).length === 1 && lastActive;\r\n\t\t},\r\n\r\n\t\telements: function() {\r\n\t\t\tvar validator = this,\r\n\t\t\t\trulesCache = {};\r\n\r\n\t\t\t// Select all valid inputs inside the form (no submit or reset buttons)\r\n\t\t\treturn $( this.currentForm )\r\n\t\t\t.find( \"input, select, textarea, [contenteditable]\" )\r\n\t\t\t.not( \":submit, :reset, :image, :disabled\" )\r\n\t\t\t.not( this.settings.ignore )\r\n\t\t\t.filter( function() {\r\n\t\t\t\tvar name = this.name || $( this ).attr( \"name\" ); // For contenteditable\r\n\t\t\t\tif ( !name && validator.settings.debug && window.console ) {\r\n\t\t\t\t\tconsole.error( \"%o has no name assigned\", this );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Set form expando on contenteditable\r\n\t\t\t\tif ( this.hasAttribute( \"contenteditable\" ) ) {\r\n\t\t\t\t\tthis.form = $( this ).closest( \"form\" )[ 0 ];\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Select only the first element for each name, and only those with rules specified\r\n\t\t\t\tif ( name in rulesCache || !validator.objectLength( $( this ).rules() ) ) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\r\n\t\t\t\trulesCache[ name ] = true;\r\n\t\t\t\treturn true;\r\n\t\t\t} );\r\n\t\t},\r\n\r\n\t\tclean: function( selector ) {\r\n\t\t\treturn $( selector )[ 0 ];\r\n\t\t},\r\n\r\n\t\terrors: function() {\r\n\t\t\tvar errorClass = this.settings.errorClass.split( \" \" ).join( \".\" );\r\n\t\t\treturn $( this.settings.errorElement + \".\" + errorClass, this.errorContext );\r\n\t\t},\r\n\r\n\t\tresetInternals: function() {\r\n\t\t\tthis.successList = [];\r\n\t\t\tthis.errorList = [];\r\n\t\t\tthis.errorMap = {};\r\n\t\t\tthis.toShow = $( [] );\r\n\t\t\tthis.toHide = $( [] );\r\n\t\t},\r\n\r\n\t\treset: function() {\r\n\t\t\tthis.resetInternals();\r\n\t\t\tthis.currentElements = $( [] );\r\n\t\t},\r\n\r\n\t\tprepareForm: function() {\r\n\t\t\tthis.reset();\r\n\t\t\tthis.toHide = this.errors().add( this.containers );\r\n\t\t},\r\n\r\n\t\tprepareElement: function( element ) {\r\n\t\t\tthis.reset();\r\n\t\t\tthis.toHide = this.errorsFor( element );\r\n\t\t},\r\n\r\n\t\telementValue: function( element ) {\r\n\t\t\tvar $element = $( element ),\r\n\t\t\t\ttype = element.type,\r\n\t\t\t\tval, idx;\r\n\r\n\t\t\tif ( type === \"radio\" || type === \"checkbox\" ) {\r\n\t\t\t\treturn this.findByName( element.name ).filter( \":checked\" ).val();\r\n\t\t\t} else if ( type === \"number\" && typeof element.validity !== \"undefined\" ) {\r\n\t\t\t\treturn element.validity.badInput ? \"NaN\" : $element.val();\r\n\t\t\t}\r\n\r\n\t\t\tif ( element.hasAttribute( \"contenteditable\" ) ) {\r\n\t\t\t\tval = $element.text();\r\n\t\t\t} else {\r\n\t\t\t\tval = $element.val();\r\n\t\t\t}\r\n\r\n\t\t\tif ( type === \"file\" ) {\r\n\r\n\t\t\t\t// Modern browser (chrome & safari)\r\n\t\t\t\tif ( val.substr( 0, 12 ) === \"C:\\\\fakepath\\\\\" ) {\r\n\t\t\t\t\treturn val.substr( 12 );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Legacy browsers\r\n\t\t\t\t// Unix-based path\r\n\t\t\t\tidx = val.lastIndexOf( \"/\" );\r\n\t\t\t\tif ( idx >= 0 ) {\r\n\t\t\t\t\treturn val.substr( idx + 1 );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Windows-based path\r\n\t\t\t\tidx = val.lastIndexOf( \"\\\\\" );\r\n\t\t\t\tif ( idx >= 0 ) {\r\n\t\t\t\t\treturn val.substr( idx + 1 );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Just the file name\r\n\t\t\t\treturn val;\r\n\t\t\t}\r\n\r\n\t\t\tif ( typeof val === \"string\" ) {\r\n\t\t\t\treturn val.replace( /\\r/g, \"\" );\r\n\t\t\t}\r\n\t\t\treturn val;\r\n\t\t},\r\n\r\n\t\tcheck: function( element ) {\r\n\t\t\telement = this.validationTargetFor( this.clean( element ) );\r\n\r\n\t\t\tvar rules = $( element ).rules(),\r\n\t\t\t\trulesCount = $.map( rules, function( n, i ) {\r\n\t\t\t\t\treturn i;\r\n\t\t\t\t} ).length,\r\n\t\t\t\tdependencyMismatch = false,\r\n\t\t\t\tval = this.elementValue( element ),\r\n\t\t\t\tresult, method, rule;\r\n\r\n\t\t\t// If a normalizer is defined for this element, then\r\n\t\t\t// call it to retreive the changed value instead\r\n\t\t\t// of using the real one.\r\n\t\t\t// Note that `this` in the normalizer is `element`.\r\n\t\t\tif ( typeof rules.normalizer === \"function\" ) {\r\n\t\t\t\tval = rules.normalizer.call( element, val );\r\n\r\n\t\t\t\tif ( typeof val !== \"string\" ) {\r\n\t\t\t\t\tthrow new TypeError( \"The normalizer should return a string value.\" );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Delete the normalizer from rules to avoid treating\r\n\t\t\t\t// it as a pre-defined method.\r\n\t\t\t\tdelete rules.normalizer;\r\n\t\t\t}\r\n\r\n\t\t\tfor ( method in rules ) {\r\n\t\t\t\trule = { method: method, parameters: rules[ method ] };\r\n\t\t\t\ttry {\r\n\t\t\t\t\tresult = $.validator.methods[ method ].call( this, val, element, rule.parameters );\r\n\r\n\t\t\t\t\t// If a method indicates that the field is optional and therefore valid,\r\n\t\t\t\t\t// don't mark it as valid when there are no other rules\r\n\t\t\t\t\tif ( result === \"dependency-mismatch\" && rulesCount === 1 ) {\r\n\t\t\t\t\t\tdependencyMismatch = true;\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdependencyMismatch = false;\r\n\r\n\t\t\t\t\tif ( result === \"pending\" ) {\r\n\t\t\t\t\t\tthis.toHide = this.toHide.not( this.errorsFor( element ) );\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif ( !result ) {\r\n\t\t\t\t\t\tthis.formatAndAdd( element, rule );\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch ( e ) {\r\n\t\t\t\t\tif ( this.settings.debug && window.console ) {\r\n\t\t\t\t\t\tconsole.log( \"Exception occurred when checking element \" + element.id + \", check the '\" + rule.method + \"' method.\", e );\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ( e instanceof TypeError ) {\r\n\t\t\t\t\t\te.message += \". Exception occurred when checking element \" + element.id + \", check the '\" + rule.method + \"' method.\";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthrow e;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif ( dependencyMismatch ) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif ( this.objectLength( rules ) ) {\r\n\t\t\t\tthis.successList.push( element );\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t},\r\n\r\n\t\t// Return the custom message for the given element and validation method\r\n\t\t// specified in the element's HTML5 data attribute\r\n\t\t// return the generic message if present and no method specific message is present\r\n\t\tcustomDataMessage: function( element, method ) {\r\n\t\t\treturn $( element ).data( \"msg\" + method.charAt( 0 ).toUpperCase() +\r\n\t\t\t\tmethod.substring( 1 ).toLowerCase() ) || $( element ).data( \"msg\" );\r\n\t\t},\r\n\r\n\t\t// Return the custom message for the given element name and validation method\r\n\t\tcustomMessage: function( name, method ) {\r\n\t\t\tvar m = this.settings.messages[ name ];\r\n\t\t\treturn m && ( m.constructor === String ? m : m[ method ] );\r\n\t\t},\r\n\r\n\t\t// Return the first defined argument, allowing empty strings\r\n\t\tfindDefined: function() {\r\n\t\t\tfor ( var i = 0; i < arguments.length; i++ ) {\r\n\t\t\t\tif ( arguments[ i ] !== undefined ) {\r\n\t\t\t\t\treturn arguments[ i ];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn undefined;\r\n\t\t},\r\n\r\n\t\t// The second parameter 'rule' used to be a string, and extended to an object literal\r\n\t\t// of the following form:\r\n\t\t// rule = {\r\n\t\t// method: \"method name\",\r\n\t\t// parameters: \"the given method parameters\"\r\n\t\t// }\r\n\t\t//\r\n\t\t// The old behavior still supported, kept to maintain backward compatibility with\r\n\t\t// old code, and will be removed in the next major release.\r\n\t\tdefaultMessage: function( element, rule ) {\r\n\t\t\tif ( typeof rule === \"string\" ) {\r\n\t\t\t\trule = { method: rule };\r\n\t\t\t}\r\n\r\n\t\t\tvar message = this.findDefined(\r\n\t\t\t\t\tthis.customMessage( element.name, rule.method ),\r\n\t\t\t\t\tthis.customDataMessage( element, rule.method ),\r\n\r\n\t\t\t\t\t// 'title' is never undefined, so handle empty string as undefined\r\n\t\t\t\t\t!this.settings.ignoreTitle && element.title || undefined,\r\n\t\t\t\t\t$.validator.messages[ rule.method ],\r\n\t\t\t\t\t\"<strong>Warning: No message defined for \" + element.name + \"</strong>\"\r\n\t\t\t\t),\r\n\t\t\t\ttheregex = /\\$?\\{(\\d+)\\}/g;\r\n\t\t\tif ( typeof message === \"function\" ) {\r\n\t\t\t\tmessage = message.call( this, rule.parameters, element );\r\n\t\t\t} else if ( theregex.test( message ) ) {\r\n\t\t\t\tmessage = $.validator.format( message.replace( theregex, \"{$1}\" ), rule.parameters );\r\n\t\t\t}\r\n\r\n\t\t\treturn message;\r\n\t\t},\r\n\r\n\t\tformatAndAdd: function( element, rule ) {\r\n\t\t\tvar message = this.defaultMessage( element, rule );\r\n\r\n\t\t\tthis.errorList.push( {\r\n\t\t\t\tmessage: message,\r\n\t\t\t\telement: element,\r\n\t\t\t\tmethod: rule.method\r\n\t\t\t} );\r\n\r\n\t\t\tthis.errorMap[ element.name ] = message;\r\n\t\t\tthis.submitted[ element.name ] = message;\r\n\t\t},\r\n\r\n\t\taddWrapper: function( toToggle ) {\r\n\t\t\tif ( this.settings.wrapper ) {\r\n\t\t\t\ttoToggle = toToggle.add( toToggle.parent( this.settings.wrapper ) );\r\n\t\t\t}\r\n\t\t\treturn toToggle;\r\n\t\t},\r\n\r\n\t\tdefaultShowErrors: function() {\r\n\t\t\tvar i, elements, error;\r\n\t\t\tfor ( i = 0; this.errorList[ i ]; i++ ) {\r\n\t\t\t\terror = this.errorList[ i ];\r\n\t\t\t\tif ( this.settings.highlight ) {\r\n\t\t\t\t\tthis.settings.highlight.call( this, error.element, this.settings.errorClass, this.settings.validClass );\r\n\t\t\t\t}\r\n\t\t\t\tthis.showLabel( error.element, error.message );\r\n\t\t\t}\r\n\t\t\tif ( this.errorList.length ) {\r\n\t\t\t\tthis.toShow = this.toShow.add( this.containers );\r\n\t\t\t}\r\n\t\t\tif ( this.settings.success ) {\r\n\t\t\t\tfor ( i = 0; this.successList[ i ]; i++ ) {\r\n\t\t\t\t\tthis.showLabel( this.successList[ i ] );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif ( this.settings.unhighlight ) {\r\n\t\t\t\tfor ( i = 0, elements = this.validElements(); elements[ i ]; i++ ) {\r\n\t\t\t\t\tthis.settings.unhighlight.call( this, elements[ i ], this.settings.errorClass, this.settings.validClass );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tthis.toHide = this.toHide.not( this.toShow );\r\n\t\t\tthis.hideErrors();\r\n\t\t\tthis.addWrapper( this.toShow ).show();\r\n\t\t},\r\n\r\n\t\tvalidElements: function() {\r\n\t\t\treturn this.currentElements.not( this.invalidElements() );\r\n\t\t},\r\n\r\n\t\tinvalidElements: function() {\r\n\t\t\treturn $( this.errorList ).map( function() {\r\n\t\t\t\treturn this.element;\r\n\t\t\t} );\r\n\t\t},\r\n\r\n\t\tshowLabel: function( element, message ) {\r\n\t\t\tvar place, group, errorID, v,\r\n\t\t\t\terror = this.errorsFor( element ),\r\n\t\t\t\telementID = this.idOrName( element ),\r\n\t\t\t\tdescribedBy = $( element ).attr( \"aria-describedby\" );\r\n\r\n\t\t\tif ( error.length ) {\r\n\r\n\t\t\t\t// Refresh error/success class\r\n\t\t\t\terror.removeClass( this.settings.validClass ).addClass( this.settings.errorClass );\r\n\r\n\t\t\t\t// Replace message on existing label\r\n\t\t\t\terror.html( message );\r\n\t\t\t} else {\r\n\r\n\t\t\t\t// Create error element\r\n\t\t\t\terror = $( \"<\" + this.settings.errorElement + \">\" )\r\n\t\t\t\t\t.attr( \"id\", elementID + \"-error\" )\r\n\t\t\t\t\t.addClass( this.settings.errorClass )\r\n\t\t\t\t\t.html( message || \"\" );\r\n\r\n\t\t\t\t// Maintain reference to the element to be placed into the DOM\r\n\t\t\t\tplace = error;\r\n\t\t\t\tif ( this.settings.wrapper ) {\r\n\r\n\t\t\t\t\t// Make sure the element is visible, even in IE\r\n\t\t\t\t\t// actually showing the wrapped element is handled elsewhere\r\n\t\t\t\t\tplace = error.hide().show().wrap( \"<\" + this.settings.wrapper + \"/>\" ).parent();\r\n\t\t\t\t}\r\n\t\t\t\tif ( this.labelContainer.length ) {\r\n\t\t\t\t\tthis.labelContainer.append( place );\r\n\t\t\t\t} else if ( this.settings.errorPlacement ) {\r\n\t\t\t\t\tthis.settings.errorPlacement.call( this, place, $( element ) );\r\n\t\t\t\t} else {\r\n\t\t\t\t\tplace.insertAfter( element );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Link error back to the element\r\n\t\t\t\tif ( error.is( \"label\" ) ) {\r\n\r\n\t\t\t\t\t// If the error is a label, then associate using 'for'\r\n\t\t\t\t\terror.attr( \"for\", elementID );\r\n\r\n\t\t\t\t\t// If the element is not a child of an associated label, then it's necessary\r\n\t\t\t\t\t// to explicitly apply aria-describedby\r\n\t\t\t\t} else if ( error.parents( \"label[for='\" + this.escapeCssMeta( elementID ) + \"']\" ).length === 0 ) {\r\n\t\t\t\t\terrorID = error.attr( \"id\" );\r\n\r\n\t\t\t\t\t// Respect existing non-error aria-describedby\r\n\t\t\t\t\tif ( !describedBy ) {\r\n\t\t\t\t\t\tdescribedBy = errorID;\r\n\t\t\t\t\t} else if ( !describedBy.match( new RegExp( \"\\\\b\" + this.escapeCssMeta( errorID ) + \"\\\\b\" ) ) ) {\r\n\r\n\t\t\t\t\t\t// Add to end of list if not already present\r\n\t\t\t\t\t\tdescribedBy += \" \" + errorID;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$( element ).attr( \"aria-describedby\", describedBy );\r\n\r\n\t\t\t\t\t// If this element is grouped, then assign to all elements in the same group\r\n\t\t\t\t\tgroup = this.groups[ element.name ];\r\n\t\t\t\t\tif ( group ) {\r\n\t\t\t\t\t\tv = this;\r\n\t\t\t\t\t\t$.each( v.groups, function( name, testgroup ) {\r\n\t\t\t\t\t\t\tif ( testgroup === group ) {\r\n\t\t\t\t\t\t\t\t$( \"[name='\" + v.escapeCssMeta( name ) + \"']\", v.currentForm )\r\n\t\t\t\t\t\t\t\t\t.attr( \"aria-describedby\", error.attr( \"id\" ) );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif ( !message && this.settings.success ) {\r\n\t\t\t\terror.text( \"\" );\r\n\t\t\t\tif ( typeof this.settings.success === \"string\" ) {\r\n\t\t\t\t\terror.addClass( this.settings.success );\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.settings.success( error, element );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tthis.toShow = this.toShow.add( error );\r\n\t\t},\r\n\r\n\t\terrorsFor: function( element ) {\r\n\t\t\tvar name = this.escapeCssMeta( this.idOrName( element ) ),\r\n\t\t\t\tdescriber = $( element ).attr( \"aria-describedby\" ),\r\n\t\t\t\tselector = \"label[for='\" + name + \"'], label[for='\" + name + \"'] *\";\r\n\r\n\t\t\t// 'aria-describedby' should directly reference the error element\r\n\t\t\tif ( describer ) {\r\n\t\t\t\tselector = selector + \", #\" + this.escapeCssMeta( describer )\r\n\t\t\t\t\t.replace( /\\s+/g, \", #\" );\r\n\t\t\t}\r\n\r\n\t\t\treturn this\r\n\t\t\t\t.errors()\r\n\t\t\t\t.filter( selector );\r\n\t\t},\r\n\r\n\t\t// See https://api.jquery.com/category/selectors/, for CSS\r\n\t\t// meta-characters that should be escaped in order to be used with JQuery\r\n\t\t// as a literal part of a name/id or any selector.\r\n\t\tescapeCssMeta: function( string ) {\r\n\t\t\treturn string.replace( /([\\\\!\"#$%&'()*+,./:;<=>?@\\[\\]^`{|}~])/g, \"\\\\$1\" );\r\n\t\t},\r\n\r\n\t\tidOrName: function( element ) {\r\n\t\t\treturn this.groups[ element.name ] || ( this.checkable( element ) ? element.name : element.id || element.name );\r\n\t\t},\r\n\r\n\t\tvalidationTargetFor: function( element ) {\r\n\r\n\t\t\t// If radio/checkbox, validate first element in group instead\r\n\t\t\tif ( this.checkable( element ) ) {\r\n\t\t\t\telement = this.findByName( element.name );\r\n\t\t\t}\r\n\r\n\t\t\t// Always apply ignore filter\r\n\t\t\treturn $( element ).not( this.settings.ignore )[ 0 ];\r\n\t\t},\r\n\r\n\t\tcheckable: function( element ) {\r\n\t\t\treturn ( /radio|checkbox/i ).test( element.type );\r\n\t\t},\r\n\r\n\t\tfindByName: function( name ) {\r\n\t\t\treturn $( this.currentForm ).find( \"[name='\" + this.escapeCssMeta( name ) + \"']\" );\r\n\t\t},\r\n\r\n\t\tgetLength: function( value, element ) {\r\n\t\t\tswitch ( element.nodeName.toLowerCase() ) {\r\n\t\t\tcase \"select\":\r\n\t\t\t\treturn $( \"option:selected\", element ).length;\r\n\t\t\tcase \"input\":\r\n\t\t\t\tif ( this.checkable( element ) ) {\r\n\t\t\t\t\treturn this.findByName( element.name ).filter( \":checked\" ).length;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn value.length;\r\n\t\t},\r\n\r\n\t\tdepend: function( param, element ) {\r\n\t\t\treturn this.dependTypes[ typeof param ] ? this.dependTypes[ typeof param ]( param, element ) : true;\r\n\t\t},\r\n\r\n\t\tdependTypes: {\r\n\t\t\t\"boolean\": function( param ) {\r\n\t\t\t\treturn param;\r\n\t\t\t},\r\n\t\t\t\"string\": function( param, element ) {\r\n\t\t\t\treturn !!$( param, element.form ).length;\r\n\t\t\t},\r\n\t\t\t\"function\": function( param, element ) {\r\n\t\t\t\treturn param( element );\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\toptional: function( element ) {\r\n\t\t\tvar val = this.elementValue( element );\r\n\t\t\treturn !$.validator.methods.required.call( this, val, element ) && \"dependency-mismatch\";\r\n\t\t},\r\n\r\n\t\tstartRequest: function( element ) {\r\n\t\t\tif ( !this.pending[ element.name ] ) {\r\n\t\t\t\tthis.pendingRequest++;\r\n\t\t\t\t$( element ).addClass( this.settings.pendingClass );\r\n\t\t\t\tthis.pending[ element.name ] = true;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tstopRequest: function( element, valid ) {\r\n\t\t\tthis.pendingRequest--;\r\n\r\n\t\t\t// Sometimes synchronization fails, make sure pendingRequest is never < 0\r\n\t\t\tif ( this.pendingRequest < 0 ) {\r\n\t\t\t\tthis.pendingRequest = 0;\r\n\t\t\t}\r\n\t\t\tdelete this.pending[ element.name ];\r\n\t\t\t$( element ).removeClass( this.settings.pendingClass );\r\n\t\t\tif ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() ) {\r\n\t\t\t\t$( this.currentForm ).submit();\r\n\t\t\t\tthis.formSubmitted = false;\r\n\t\t\t} else if ( !valid && this.pendingRequest === 0 && this.formSubmitted ) {\r\n\t\t\t\t$( this.currentForm ).triggerHandler( \"invalid-form\", [ this ] );\r\n\t\t\t\tthis.formSubmitted = false;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tpreviousValue: function( element, method ) {\r\n\t\t\tmethod = typeof method === \"string\" && method || \"remote\";\r\n\r\n\t\t\treturn $.data( element, \"previousValue\" ) || $.data( element, \"previousValue\", {\r\n\t\t\t\told: null,\r\n\t\t\t\tvalid: true,\r\n\t\t\t\tmessage: this.defaultMessage( element, { method: method } )\r\n\t\t\t} );\r\n\t\t},\r\n\r\n\t\t// Cleans up all forms and elements, removes validator-specific events\r\n\t\tdestroy: function() {\r\n\t\t\tthis.resetForm();\r\n\r\n\t\t\t$( this.currentForm )\r\n\t\t\t\t.off( \".validate\" )\r\n\t\t\t\t.removeData( \"validator\" )\r\n\t\t\t\t.find( \".validate-equalTo-blur\" )\r\n\t\t\t\t\t.off( \".validate-equalTo\" )\r\n\t\t\t\t\t.removeClass( \"validate-equalTo-blur\" );\r\n\t\t}\r\n\r\n\t},\r\n\r\n\tclassRuleSettings: {\r\n\t\trequired: { required: true },\r\n\t\temail: { email: true },\r\n\t\turl: { url: true },\r\n\t\tdate: { date: true },\r\n\t\tdateISO: { dateISO: true },\r\n\t\tnumber: { number: true },\r\n\t\tdigits: { digits: true },\r\n\t\tcreditcard: { creditcard: true }\r\n\t},\r\n\r\n\taddClassRules: function( className, rules ) {\r\n\t\tif ( className.constructor === String ) {\r\n\t\t\tthis.classRuleSettings[ className ] = rules;\r\n\t\t} else {\r\n\t\t\t$.extend( this.classRuleSettings, className );\r\n\t\t}\r\n\t},\r\n\r\n\tclassRules: function( element ) {\r\n\t\tvar rules = {},\r\n\t\t\tclasses = $( element ).attr( \"class\" );\r\n\r\n\t\tif ( classes ) {\r\n\t\t\t$.each( classes.split( \" \" ), function() {\r\n\t\t\t\tif ( this in $.validator.classRuleSettings ) {\r\n\t\t\t\t\t$.extend( rules, $.validator.classRuleSettings[ this ] );\r\n\t\t\t\t}\r\n\t\t\t} );\r\n\t\t}\r\n\t\treturn rules;\r\n\t},\r\n\r\n\tnormalizeAttributeRule: function( rules, type, method, value ) {\r\n\r\n\t\t// Convert the value to a number for number inputs, and for text for backwards compability\r\n\t\t// allows type=\"date\" and others to be compared as strings\r\n\t\tif ( /min|max|step/.test( method ) && ( type === null || /number|range|text/.test( type ) ) ) {\r\n\t\t\tvalue = Number( value );\r\n\r\n\t\t\t// Support Opera Mini, which returns NaN for undefined minlength\r\n\t\t\tif ( isNaN( value ) ) {\r\n\t\t\t\tvalue = undefined;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ( value || value === 0 ) {\r\n\t\t\trules[ method ] = value;\r\n\t\t} else if ( type === method && type !== \"range\" ) {\r\n\r\n\t\t\t// Exception: the jquery validate 'range' method\r\n\t\t\t// does not test for the html5 'range' type\r\n\t\t\trules[ method ] = true;\r\n\t\t}\r\n\t},\r\n\r\n\tattributeRules: function( element ) {\r\n\t\tvar rules = {},\r\n\t\t\t$element = $( element ),\r\n\t\t\ttype = element.getAttribute( \"type\" ),\r\n\t\t\tmethod, value;\r\n\r\n\t\tfor ( method in $.validator.methods ) {\r\n\r\n\t\t\t// Support for <input required> in both html5 and older browsers\r\n\t\t\tif ( method === \"required\" ) {\r\n\t\t\t\tvalue = element.getAttribute( method );\r\n\r\n\t\t\t\t// Some browsers return an empty string for the required attribute\r\n\t\t\t\t// and non-HTML5 browsers might have required=\"\" markup\r\n\t\t\t\tif ( value === \"\" ) {\r\n\t\t\t\t\tvalue = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Force non-HTML5 browsers to return bool\r\n\t\t\t\tvalue = !!value;\r\n\t\t\t} else {\r\n\t\t\t\tvalue = $element.attr( method );\r\n\t\t\t}\r\n\r\n\t\t\tthis.normalizeAttributeRule( rules, type, method, value );\r\n\t\t}\r\n\r\n\t\t// 'maxlength' may be returned as -1, 2147483647 ( IE ) and 524288 ( safari ) for text inputs\r\n\t\tif ( rules.maxlength && /-1|2147483647|524288/.test( rules.maxlength ) ) {\r\n\t\t\tdelete rules.maxlength;\r\n\t\t}\r\n\r\n\t\treturn rules;\r\n\t},\r\n\r\n\tdataRules: function( element ) {\r\n\t\tvar rules = {},\r\n\t\t\t$element = $( element ),\r\n\t\t\ttype = element.getAttribute( \"type\" ),\r\n\t\t\tmethod, value;\r\n\r\n\t\tfor ( method in $.validator.methods ) {\r\n\t\t\tvalue = $element.data( \"rule\" + method.charAt( 0 ).toUpperCase() + method.substring( 1 ).toLowerCase() );\r\n\t\t\tthis.normalizeAttributeRule( rules, type, method, value );\r\n\t\t}\r\n\t\treturn rules;\r\n\t},\r\n\r\n\tstaticRules: function( element ) {\r\n\t\tvar rules = {},\r\n\t\t\tvalidator = $.data( element.form, \"validator\" );\r\n\r\n\t\tif ( validator.settings.rules ) {\r\n\t\t\trules = $.validator.normalizeRule( validator.settings.rules[ element.name ] ) || {};\r\n\t\t}\r\n\t\treturn rules;\r\n\t},\r\n\r\n\tnormalizeRules: function( rules, element ) {\r\n\r\n\t\t// Handle dependency check\r\n\t\t$.each( rules, function( prop, val ) {\r\n\r\n\t\t\t// Ignore rule when param is explicitly false, eg. required:false\r\n\t\t\tif ( val === false ) {\r\n\t\t\t\tdelete rules[ prop ];\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif ( val.param || val.depends ) {\r\n\t\t\t\tvar keepRule = true;\r\n\t\t\t\tswitch ( typeof val.depends ) {\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\t\tkeepRule = !!$( val.depends, element.form ).length;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\t\tkeepRule = val.depends.call( element, element );\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif ( keepRule ) {\r\n\t\t\t\t\trules[ prop ] = val.param !== undefined ? val.param : true;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$.data( element.form, \"validator\" ).resetElements( $( element ) );\r\n\t\t\t\t\tdelete rules[ prop ];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} );\r\n\r\n\t\t// Evaluate parameters\r\n\t\t$.each( rules, function( rule, parameter ) {\r\n\t\t\trules[ rule ] = $.isFunction( parameter ) && rule !== \"normalizer\" ? parameter( element ) : parameter;\r\n\t\t} );\r\n\r\n\t\t// Clean number parameters\r\n\t\t$.each( [ \"minlength\", \"maxlength\" ], function() {\r\n\t\t\tif ( rules[ this ] ) {\r\n\t\t\t\trules[ this ] = Number( rules[ this ] );\r\n\t\t\t}\r\n\t\t} );\r\n\t\t$.each( [ \"rangelength\", \"range\" ], function() {\r\n\t\t\tvar parts;\r\n\t\t\tif ( rules[ this ] ) {\r\n\t\t\t\tif ( $.isArray( rules[ this ] ) ) {\r\n\t\t\t\t\trules[ this ] = [ Number( rules[ this ][ 0 ] ), Number( rules[ this ][ 1 ] ) ];\r\n\t\t\t\t} else if ( typeof rules[ this ] === \"string\" ) {\r\n\t\t\t\t\tparts = rules[ this ].replace( /[\\[\\]]/g, \"\" ).split( /[\\s,]+/ );\r\n\t\t\t\t\trules[ this ] = [ Number( parts[ 0 ] ), Number( parts[ 1 ] ) ];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} );\r\n\r\n\t\tif ( $.validator.autoCreateRanges ) {\r\n\r\n\t\t\t// Auto-create ranges\r\n\t\t\tif ( rules.min != null && rules.max != null ) {\r\n\t\t\t\trules.range = [ rules.min, rules.max ];\r\n\t\t\t\tdelete rules.min;\r\n\t\t\t\tdelete rules.max;\r\n\t\t\t}\r\n\t\t\tif ( rules.minlength != null && rules.maxlength != null ) {\r\n\t\t\t\trules.rangelength = [ rules.minlength, rules.maxlength ];\r\n\t\t\t\tdelete rules.minlength;\r\n\t\t\t\tdelete rules.maxlength;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn rules;\r\n\t},\r\n\r\n\t// Converts a simple string to a {string: true} rule, e.g., \"required\" to {required:true}\r\n\tnormalizeRule: function( data ) {\r\n\t\tif ( typeof data === \"string\" ) {\r\n\t\t\tvar transformed = {};\r\n\t\t\t$.each( data.split( /\\s/ ), function() {\r\n\t\t\t\ttransformed[ this ] = true;\r\n\t\t\t} );\r\n\t\t\tdata = transformed;\r\n\t\t}\r\n\t\treturn data;\r\n\t},\r\n\r\n\t// http://jqueryvalidation.org/jQuery.validator.addMethod/\r\n\taddMethod: function( name, method, message ) {\r\n\t\t$.validator.methods[ name ] = method;\r\n\t\t$.validator.messages[ name ] = message !== undefined ? message : $.validator.messages[ name ];\r\n\t\tif ( method.length < 3 ) {\r\n\t\t\t$.validator.addClassRules( name, $.validator.normalizeRule( name ) );\r\n\t\t}\r\n\t},\r\n\r\n\t// http://jqueryvalidation.org/jQuery.validator.methods/\r\n\tmethods: {\r\n\r\n\t\t// http://jqueryvalidation.org/required-method/\r\n\t\trequired: function( value, element, param ) {\r\n\r\n\t\t\t// Check if dependency is met\r\n\t\t\tif ( !this.depend( param, element ) ) {\r\n\t\t\t\treturn \"dependency-mismatch\";\r\n\t\t\t}\r\n\t\t\tif ( element.nodeName.toLowerCase() === \"select\" ) {\r\n\r\n\t\t\t\t// Could be an array for select-multiple or a string, both are fine this way\r\n\t\t\t\tvar val = $( element ).val();\r\n\t\t\t\treturn val && val.length > 0;\r\n\t\t\t}\r\n\t\t\tif ( this.checkable( element ) ) {\r\n\t\t\t\treturn this.getLength( value, element ) > 0;\r\n\t\t\t}\r\n\t\t\treturn value.length > 0;\r\n\t\t},\r\n\r\n\t\t// http://jqueryvalidation.org/email-method/\r\n\t\temail: function( value, element ) {\r\n\r\n\t\t\t// From https://html.spec.whatwg.org/multipage/forms.html#valid-e-mail-address\r\n\t\t\t// Retrieved 2014-01-14\r\n\t\t\t// If you have a problem with this implementation, report a bug against the above spec\r\n\t\t\t// Or use custom methods to implement your own email validation\r\n\t\t\treturn this.optional( element ) || /^[a-zA-Z0-9.!#$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test( value );\r\n\t\t},\r\n\r\n\t\t// http://jqueryvalidation.org/url-method/\r\n\t\turl: function( value, element ) {\r\n\r\n\t\t\t// Copyright (c) 2010-2013 Diego Perini, MIT licensed\r\n\t\t\t// https://gist.github.com/dperini/729294\r\n\t\t\t// see also https://mathiasbynens.be/demo/url-regex\r\n\t\t\t// modified to allow protocol-relative URLs\r\n\t\t\treturn this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})).?)(?::\\d{2,5})?(?:[/?#]\\S*)?$/i.test( value );\r\n\t\t},\r\n\r\n\t\t// http://jqueryvalidation.org/date-method/\r\n\t\tdate: function( value, element ) {\r\n\t\t\treturn this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() );\r\n\t\t},\r\n\r\n\t\t// http://jqueryvalidation.org/dateISO-method/\r\n\t\tdateISO: function( value, element ) {\r\n\t\t\treturn this.optional( element ) || /^\\d{4}[\\/\\-](0?[1-9]|1[012])[\\/\\-](0?[1-9]|[12][0-9]|3[01])$/.test( value );\r\n\t\t},\r\n\r\n\t\t// http://jqueryvalidation.org/number-method/\r\n\t\tnumber: function( value, element ) {\r\n\t\t\treturn this.optional( element ) || /^(?:-?\\d+|-?\\d{1,3}(?:,\\d{3})+)?(?:\\.\\d+)?$/.test( value );\r\n\t\t},\r\n\r\n\t\t// http://jqueryvalidation.org/digits-method/\r\n\t\tdigits: function( value, element ) {\r\n\t\t\treturn this.optional( element ) || /^\\d+$/.test( value );\r\n\t\t},\r\n\r\n\t\t// http://jqueryvalidation.org/minlength-method/\r\n\t\tminlength: function( value, element, param ) {\r\n\t\t\tvar length = $.isArray( value ) ? value.length : this.getLength( value, element );\r\n\t\t\treturn this.optional( element ) || length >= param;\r\n\t\t},\r\n\r\n\t\t// http://jqueryvalidation.org/maxlength-method/\r\n\t\tmaxlength: function( value, element, param ) {\r\n\t\t\tvar length = $.isArray( value ) ? value.length : this.getLength( value, element );\r\n\t\t\treturn this.optional( element ) || length <= param;\r\n\t\t},\r\n\r\n\t\t// http://jqueryvalidation.org/rangelength-method/\r\n\t\trangelength: function( value, element, param ) {\r\n\t\t\tvar length = $.isArray( value ) ? value.length : this.getLength( value, element );\r\n\t\t\treturn this.optional( element ) || ( length >= param[ 0 ] && length <= param[ 1 ] );\r\n\t\t},\r\n\r\n\t\t// http://jqueryvalidation.org/min-method/\r\n\t\tmin: function( value, element, param ) {\r\n\t\t\treturn this.optional( element ) || value >= param;\r\n\t\t},\r\n\r\n\t\t// http://jqueryvalidation.org/max-method/\r\n\t\tmax: function( value, element, param ) {\r\n\t\t\treturn this.optional( element ) || value <= param;\r\n\t\t},\r\n\r\n\t\t// http://jqueryvalidation.org/range-method/\r\n\t\trange: function( value, element, param ) {\r\n\t\t\treturn this.optional( element ) || ( value >= param[ 0 ] && value <= param[ 1 ] );\r\n\t\t},\r\n\r\n\t\t// http://jqueryvalidation.org/step-method/\r\n\t\tstep: function( value, element, param ) {\r\n\t\t\tvar type = $( element ).attr( \"type\" ),\r\n\t\t\t\terrorMessage = \"Step attribute on input type \" + type + \" is not supported.\",\r\n\t\t\t\tsupportedTypes = [ \"text\", \"number\", \"range\" ],\r\n\t\t\t\tre = new RegExp( \"\\\\b\" + type + \"\\\\b\" ),\r\n\t\t\t\tnotSupported = type && !re.test( supportedTypes.join() ),\r\n\t\t\t\tdecimalPlaces = function( num ) {\r\n\t\t\t\t\tvar match = ( \"\" + num ).match( /(?:\\.(\\d+))?$/ );\r\n\t\t\t\t\tif ( !match ) {\r\n\t\t\t\t\t\treturn 0;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Number of digits right of decimal point.\r\n\t\t\t\t\treturn match[ 1 ] ? match[ 1 ].length : 0;\r\n\t\t\t\t},\r\n\t\t\t\ttoInt = function( num ) {\r\n\t\t\t\t\treturn Math.round( num * Math.pow( 10, decimals ) );\r\n\t\t\t\t},\r\n\t\t\t\tvalid = true,\r\n\t\t\t\tdecimals;\r\n\r\n\t\t\t// Works only for text, number and range input types\r\n\t\t\t// TODO find a way to support input types date, datetime, datetime-local, month, time and week\r\n\t\t\tif ( notSupported ) {\r\n\t\t\t\tthrow new Error( errorMessage );\r\n\t\t\t}\r\n\r\n\t\t\tdecimals = decimalPlaces( param );\r\n\r\n\t\t\t// Value can't have too many decimals\r\n\t\t\tif ( decimalPlaces( value ) > decimals || toInt( value ) % toInt( param ) !== 0 ) {\r\n\t\t\t\tvalid = false;\r\n\t\t\t}\r\n\r\n\t\t\treturn this.optional( element ) || valid;\r\n\t\t},\r\n\r\n\t\t// http://jqueryvalidation.org/equalTo-method/\r\n\t\tequalTo: function( value, element, param ) {\r\n\r\n\t\t\t// Bind to the blur event of the target in order to revalidate whenever the target field is updated\r\n\t\t\tvar target = $( param );\r\n\t\t\tif ( this.settings.onfocusout && target.not( \".validate-equalTo-blur\" ).length ) {\r\n\t\t\t\ttarget.addClass( \"validate-equalTo-blur\" ).on( \"blur.validate-equalTo\", function() {\r\n\t\t\t\t\t$( element ).valid();\r\n\t\t\t\t} );\r\n\t\t\t}\r\n\t\t\treturn value === target.val();\r\n\t\t},\r\n\r\n\t\t// http://jqueryvalidation.org/remote-method/\r\n\t\tremote: function( value, element, param, method ) {\r\n\t\t\tif ( this.optional( element ) ) {\r\n\t\t\t\treturn \"dependency-mismatch\";\r\n\t\t\t}\r\n\r\n\t\t\tmethod = typeof method === \"string\" && method || \"remote\";\r\n\r\n\t\t\tvar previous = this.previousValue( element, method ),\r\n\t\t\t\tvalidator, data, optionDataString;\r\n\r\n\t\t\tif ( !this.settings.messages[ element.name ] ) {\r\n\t\t\t\tthis.settings.messages[ element.name ] = {};\r\n\t\t\t}\r\n\t\t\tprevious.originalMessage = previous.originalMessage || this.settings.messages[ element.name ][ method ];\r\n\t\t\tthis.settings.messages[ element.name ][ method ] = previous.message;\r\n\r\n\t\t\tparam = typeof param === \"string\" && { url: param } || param;\r\n\t\t\toptionDataString = $.param( $.extend( { data: value }, param.data ) );\r\n\t\t\tif ( previous.old === optionDataString ) {\r\n\t\t\t\treturn previous.valid;\r\n\t\t\t}\r\n\r\n\t\t\tprevious.old = optionDataString;\r\n\t\t\tvalidator = this;\r\n\t\t\tthis.startRequest( element );\r\n\t\t\tdata = {};\r\n\t\t\tdata[ element.name ] = value;\r\n\t\t\t$.ajax( $.extend( true, {\r\n\t\t\t\tmode: \"abort\",\r\n\t\t\t\tport: \"validate\" + element.name,\r\n\t\t\t\tdataType: \"json\",\r\n\t\t\t\tdata: data,\r\n\t\t\t\tcontext: validator.currentForm,\r\n\t\t\t\tsuccess: function( response ) {\r\n\t\t\t\t\tvar valid = response === true || response === \"true\",\r\n\t\t\t\t\t\terrors, message, submitted;\r\n\r\n\t\t\t\t\tvalidator.settings.messages[ element.name ][ method ] = previous.originalMessage;\r\n\t\t\t\t\tif ( valid ) {\r\n\t\t\t\t\t\tsubmitted = validator.formSubmitted;\r\n\t\t\t\t\t\tvalidator.resetInternals();\r\n\t\t\t\t\t\tvalidator.toHide = validator.errorsFor( element );\r\n\t\t\t\t\t\tvalidator.formSubmitted = submitted;\r\n\t\t\t\t\t\tvalidator.successList.push( element );\r\n\t\t\t\t\t\tvalidator.invalid[ element.name ] = false;\r\n\t\t\t\t\t\tvalidator.showErrors();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\terrors = {};\r\n\t\t\t\t\t\tmessage = response || validator.defaultMessage( element, { method: method, parameters: value } );\r\n\t\t\t\t\t\terrors[ element.name ] = previous.message = message;\r\n\t\t\t\t\t\tvalidator.invalid[ element.name ] = true;\r\n\t\t\t\t\t\tvalidator.showErrors( errors );\r\n\t\t\t\t\t}\r\n\t\t\t\t\tprevious.valid = valid;\r\n\t\t\t\t\tvalidator.stopRequest( element, valid );\r\n\t\t\t\t}\r\n\t\t\t}, param ) );\r\n\t\t\treturn \"pending\";\r\n\t\t}\r\n\t}\r\n\r\n} );\r\n\r\n// Ajax mode: abort\r\n// usage: $.ajax({ mode: \"abort\"[, port: \"uniqueport\"]});\r\n// if mode:\"abort\" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort()\r\n\r\nvar pendingRequests = {},\r\n\tajax;\r\n\r\n// Use a prefilter if available (1.5+)\r\nif ( $.ajaxPrefilter ) {\r\n\t$.ajaxPrefilter( function( settings, _, xhr ) {\r\n\t\tvar port = settings.port;\r\n\t\tif ( settings.mode === \"abort\" ) {\r\n\t\t\tif ( pendingRequests[ port ] ) {\r\n\t\t\t\tpendingRequests[ port ].abort();\r\n\t\t\t}\r\n\t\t\tpendingRequests[ port ] = xhr;\r\n\t\t}\r\n\t} );\r\n} else {\r\n\r\n\t// Proxy ajax\r\n\tajax = $.ajax;\r\n\t$.ajax = function( settings ) {\r\n\t\tvar mode = ( \"mode\" in settings ? settings : $.ajaxSettings ).mode,\r\n\t\t\tport = ( \"port\" in settings ? settings : $.ajaxSettings ).port;\r\n\t\tif ( mode === \"abort\" ) {\r\n\t\t\tif ( pendingRequests[ port ] ) {\r\n\t\t\t\tpendingRequests[ port ].abort();\r\n\t\t\t}\r\n\t\t\tpendingRequests[ port ] = ajax.apply( this, arguments );\r\n\t\t\treturn pendingRequests[ port ];\r\n\t\t}\r\n\t\treturn ajax.apply( this, arguments );\r\n\t};\r\n}\r\nreturn $;\r\n})(jQuery);\r\n","/* eslint-disable */\r\n/* eslint-enable no-undef */\r\nimport $ from 'jquery';\r\nimport _ from 'underscore';\r\nimport fileCacheHandler from '@bingads-webui-static-legacy/file-cache-handler';\r\nimport pageContext from '@bingads-webui-static-legacy/page-context';\r\nimport dataService from '@bingads-webui-static-legacy/data-service';\r\nimport autoPageReloader from '@bingads-webui-static-legacy/auto-page-reloader-service';\r\nimport dataContextManager from '@bingads-webui-static-legacy/summary/SummaryDataContextManager';\r\n\r\nvar jQuery = $;\r\n$.advertiser = $.advertiser || {};\r\n\r\n$.advertiser.loadingPanel = {\r\n _i: 1,\r\n show: function () { $.advertiser.loadingPanel._i++; },\r\n hide: function () { $.advertiser.loadingPanel._i--; }\r\n};\r\n\r\n$(function () {\r\n var loadingText = $('#loadingText').val() || 'Loading...';\r\n var loadingPanelShowRequested = $.advertiser.loadingPanel._i > 0;\r\n\r\n $.advertiser.loadingPanel = new blocker(null, loadingText);\r\n if (loadingPanelShowRequested) {\r\n $.advertiser.loadingPanel.show();\r\n } else {\r\n $.advertiser.loadingPanel.hide();\r\n }\r\n});\r\n\r\n// Default beforeAjax handler that will be called by jquery.unobtrusive-ajax.js on before ajax event. jquery.unobtrusive-ajax.js only has effect on forms or links that declared on the server view using Ajax.BeginForm or Ajax.ActionLink.\r\n$.advertiser.beforeAjax = function () {\r\n $.advertiser.clearErrorSummary();\r\n $.advertiser.showLoadingPanel();\r\n};\r\n\r\n// Default on ajax error handler that will be called by jquery.unobtrusive-ajax.js on before ajax event. jquery.unobtrusive-ajax.js only has effect on forms or links that declared on the server view using Ajax.BeginForm or Ajax.ActionLink.\r\n$.advertiser.ajaxError = function (hideLoadingPanel) {\r\n hideLoadingPanel = hideLoadingPanel == undefined ? true : hideLoadingPanel;\r\n if (hideLoadingPanel) {\r\n $.advertiser.hideLoadingPanel();\r\n }\r\n var errorMessage = $('#internalErrorMsg').val();\r\n errorMessage = errorMessage ? errorMessage : 'Internal error.';\r\n $.advertiser.clearErrorSummary();\r\n $.advertiser.appendErrorSummary(errorMessage);\r\n};\r\n\r\n// Default on ajax complete handler that will be called by jquery.unobtrusive-ajax.js on before ajax event. jquery.unobtrusive-ajax.js only has effect on forms or links that declared on the server view using Ajax.BeginForm or Ajax.ActionLink.\r\n$.advertiser.ajaxComplete = function (xhr, textStatus, hideLoadingPanel) {\r\n hideLoadingPanel = hideLoadingPanel == undefined ? true : hideLoadingPanel;\r\n if (hideLoadingPanel) {\r\n $.advertiser.hideLoadingPanel();\r\n }\r\n};\r\n\r\nvar loadingPanelTimeoutID;\r\n// Shows loading panel\r\n$.advertiser.showLoadingPanel = function (hideImage, blockedElement, options) {\r\n $.advertiser.loadingPanel.show(hideImage, blockedElement);\r\n if (options && options.timeout) {\r\n loadingPanelTimeoutID = setTimeout($.advertiser.hideLoadingPanel, options.timeout);\r\n }\r\n};\r\n\r\n// Hides the loading panel\r\n$.advertiser.hideLoadingPanel = function () {\r\n $.advertiser.loadingPanel.hide();\r\n if (!_.isUndefined(loadingPanelTimeoutID)) {\r\n clearTimeout(loadingPanelTimeoutID);\r\n loadingPanelTimeoutID = undefined;\r\n }\r\n};\r\n\r\nvar alertIds = {};\r\n\r\nfunction showUnique(message) {\r\n if (alertIds[message]) {\r\n return;\r\n }\r\n\r\n alertIds[message] = window.App.views.alertCenter.showError(message);\r\n}\r\n\r\n// Clears the error summary container.\r\n$.advertiser.clearErrorSummary = function () {\r\n _.each(alertIds, function (id) {\r\n window.App.views.alertCenter.dismiss(id);\r\n });\r\n alertIds = {};\r\n};\r\n\r\n// Appends the given errors to the error summary container. The errors can be a string or an object that contains Message field(serialzed from ModelValidationResult server object), or an array of string\r\n// or an array of objects that contains Message field.\r\n$.advertiser.appendErrorSummary = function (errors) {\r\n if (errors === undefined) {\r\n return;\r\n }\r\n\r\n if (typeof (errors) === 'string') {\r\n if ($.trim(errors) !== '') {\r\n showUnique(errors);\r\n }\r\n }\r\n else if ($.isArray(errors)) {\r\n var strErrors = new Array();\r\n $.each(errors, function (index, item) {\r\n var message;\r\n if (typeof (item) === 'string' && $.trim(item) !== '') {\r\n message = item;\r\n }\r\n else if (typeof (item) === 'object' && item['Message']) {\r\n message = item['Message'];\r\n }\r\n if(!!message && $.inArray(message, strErrors) < 0) {\r\n showUnique(message);\r\n strErrors.push(message);\r\n }\r\n });\r\n }\r\n else if (typeof (errors) === 'object' && errors['Message']) {\r\n showUnique(errors.Message);\r\n }\r\n};\r\n\r\n// Makes jQuery ajax post action. dataType default is json, contentType default is application/x-www-form-urlencoded.\r\n$.advertiser.ajaxPost = function (options) {\r\n return safetyNetAjaxAction('POST', options, ['cid', 'uid', 'aid', 'mkt', 'loglevel', 'newui']);\r\n};\r\n\r\n// Makes jQuery ajax get action. dataType default is json, contentType default is application/x-www-form-urlencoded.\r\n$.advertiser.ajaxGet = function (options) {\r\n return safetyNetAjaxAction('GET', options, ['cid', 'uid', 'aid', 'mkt', 'loglevel', 'newui']);\r\n};\r\n\r\n// Gets the url parameter value by parameter name. If url is not provided use window.location.href as the url\r\n$.advertiser.getUrlParameter = function (name, url) {\r\n if (window.App && window.App.state && window.App.state.legacy_get && (url == window.location.href || !url)) {\r\n var ret = window.App.state.legacy_get(name);\r\n\r\n if (ret) {\r\n return ret;\r\n }\r\n }\r\n\r\n url = url || window.location.href;\r\n name = name.replace(/[\\[]/, '\\\\\\[').replace(/[\\]]/, '\\\\\\]');\r\n var value = (RegExp('[\\\\?&]' + name + '=([^&#]*)').exec(url) || [, null])[1];\r\n\r\n if (value) {\r\n return decodeURIComponent(value);\r\n }\r\n\r\n return value;\r\n};\r\n\r\n$.advertiser.generateRequestGuid = function () {\r\n var S4 = function () {\r\n var mask = '0000';\r\n var val = Math.floor(Math.random() * 0x10000 /* 65536 */).toString(16);\r\n val = mask.substring(0, 4 - val.length) + val;\r\n return val;\r\n };\r\n\r\n var S12 = function () {\r\n var d = new Date().getTime().toString(16) + new Date().getTime().toString(16);\r\n return (d.substring(0, 8) + '-' + d.substring(8, 12));\r\n };\r\n\r\n return (\r\n S12() + '-' +\r\n S4() + '-' +\r\n S4() + '-' +\r\n S4() + S4() + S4()\r\n );\r\n};\r\n\r\n$.advertiser.setCookie = function (cName, cValue, expires, path, domain, secure) {\r\n document.cookie = cName + '=' + escape(cValue) +\r\n ((expires) ? '; expires=' + expires.toGMTString() : '') +\r\n ((path) ? '; path=' + path : '') +\r\n ((domain) ? '; domain=' + domain : '') +\r\n ((secure) ? '; secure' : '');\r\n return null;\r\n};\r\n\r\n$.advertiser.getCookie = function (cName) {\r\n var i, x, y, ARRcookies = document.cookie.split(';');\r\n for (i = 0; i < ARRcookies.length; i++) {\r\n x = ARRcookies[i].substr(0, ARRcookies[i].indexOf('='));\r\n y = ARRcookies[i].substr(ARRcookies[i].indexOf('=') + 1);\r\n x = x.replace(/^\\s+|\\s+$/g, '');\r\n if (x == cName) {\r\n return unescape(y);\r\n }\r\n }\r\n\r\n return null;\r\n};\r\n\r\n$.advertiser.setRequestId = function (url, isNotAjax) {\r\n if (url && url.length > 0) {\r\n if (!isNotAjax) {\r\n url = $.advertiser.setUrlParameter('__adcenterAJAX', 'true', url);\r\n }\r\n var usegenReqId = $.advertiser.getCookie('usegenReqId');\r\n var genReqId = $.advertiser.getUrlParameter('genReqId');\r\n if ((usegenReqId && usegenReqId == 'true') || (genReqId && genReqId == 'true')) {\r\n var requestId = $.advertiser.generateRequestGuid();\r\n url = $.advertiser.setUrlParameter('ReqId', requestId, url);\r\n if (genReqId && genReqId == 'true') {\r\n url = $.advertiser.setUrlParameter('genReqId', 'true', url);\r\n }\r\n }\r\n }\r\n return url;\r\n};\r\n\r\n// Sets the url parameter value. If url is not provided use window.location.href as the url\r\n$.advertiser.setUrlParameter = function (name, value, url, options) {\r\n options = options || {};\r\n var keepSqBrackets = !!options.keepSqBrackets;\r\n url = url || window.location.href;\r\n\r\n var setQueryStringParam = function (url, n, v, replaceOnly) {\r\n if (!keepSqBrackets) {\r\n n = n.replace(/[\\[]/, '\\\\\\[').replace(/[\\]]/, '\\\\\\]');\r\n };\r\n var regex = new RegExp('([\\\\?&])' + n + '=.*?(&|$|#)');\r\n if (url.match(regex)) {\r\n return url.replace(regex, '$1' + n + '=' + v + '$2');\r\n }\r\n if (!replaceOnly) {\r\n var qs = ''\r\n , position = url.indexOf('?');\r\n if (position > -1) {\r\n if (position + 1 < url.length) {\r\n qs = '&';\r\n }\r\n } else {\r\n qs = '?';\r\n };\r\n return url + qs + n + '=' + v;\r\n } else {\r\n return url;\r\n }\r\n }\r\n\r\n var pound = url.lastIndexOf('#');\r\n if (pound > -1) {\r\n return setQueryStringParam(url.slice(0, pound), name, value, false) + setQueryStringParam(url.slice(pound), name, value, true);\r\n } else {\r\n return setQueryStringParam(url, name, value, false);\r\n }\r\n};\r\n\r\nvar currentCustomerId = '';\r\nvar currentUserId = '';\r\n$.advertiser.getAccountContextQueryString = function () {\r\n currentCustomerId = currentCustomerId === '' ? $.advertiser.getUrlParameter('cid') : currentCustomerId;\r\n currentUserId = currentUserId === '' ? $.advertiser.getUrlParameter('uid') : currentUserId;\r\n var currentAccount = $('#CurrentAccount');\r\n var aid = currentAccount.length > 0 ? currentAccount.val() : $.advertiser.getUrlParameter('aid');\r\n return '?cid=' + currentCustomerId + '&uid=' + currentUserId + '&aid=' + aid;\r\n};\r\n\r\nfunction safetyNetAjaxAction(type, options, requiredParams) {\r\n if (!options || !options.url) {\r\n return;\r\n }\r\n\r\n var publishSafetyNetWarnings = function (requestedUrl, paramentersNotFound) {\r\n if (paramentersNotFound && paramentersNotFound.length > 0) {\r\n var message =\r\n 'SafetyNet: Required paramenter was not found.\\r\\n' +\r\n ' - requested url: ' + requestedUrl + '\\r\\n' +\r\n ' - paramenters:' + paramentersNotFound.join(', ');\r\n try {\r\n console.log(message);\r\n } catch (e) {\r\n try {\r\n window.opera.postError(message);\r\n } catch (e) {\r\n\r\n }\r\n }\r\n }\r\n };\r\n\r\n var requiredParamSafetyNet = function (parameterName, requestOptions, getValue) {\r\n var url = requestOptions.url,\r\n data = requestOptions.data ? requestOptions.data : {},\r\n requestParamValue = $.advertiser.getUrlParameter(parameterName, url),\r\n parameterExists = (requestParamValue && requestParamValue != '0') || data[parameterName];\r\n\r\n if (!parameterExists) {\r\n var existingUrlParamVal = $.advertiser.getUrlParameter(parameterName),\r\n val = getValue(),\r\n paramValue = (val && val != '0') ? val : existingUrlParamVal;\r\n if (paramValue) {\r\n url = $.advertiser.setUrlParameter(parameterName, paramValue, url);\r\n }\r\n }\r\n requestOptions.url = url;\r\n requestOptions.data = data;\r\n return parameterExists;\r\n };\r\n\r\n var safetyNetData = {\r\n aid: function () {\r\n var currentAccount = $('#CurrentAccount');\r\n return currentAccount.length > 0 ? currentAccount.val() : null;\r\n },\r\n cid: function () {\r\n return currentCustomerId;\r\n }\r\n };\r\n\r\n var i = 0,\r\n n = (requiredParams) ? requiredParams.length : 0,\r\n originalRequestedUrl = options.url,\r\n warnings = [];\r\n for (; i < n; i++) {\r\n var parameterWasSetInRequest = requiredParamSafetyNet(requiredParams[i], options, safetyNetData[requiredParams[i]] || function () { return null; });\r\n if (!parameterWasSetInRequest) {\r\n warnings.push(requiredParams[i]);\r\n }\r\n }\r\n\r\n //publishSafetyNetWarnings(originalRequestedUrl, warnings);\r\n return ajaxAction.call(this, type, options);\r\n}\r\n\r\nvar requestKeyPref = '_$';\r\nvar ajaxRequests = {};\r\n\r\nfunction ajaxAction(type, options) {\r\n if (!options || !options.url) {\r\n return;\r\n }\r\n if (type !== 'GET') {\r\n options = addRequestToken(options);\r\n }\r\n\r\n options.url = $.advertiser.setRequestId(options.url);\r\n options.data = options.data ? options.data : {};\r\n options.cotentType = options.contentType ? options.contentType : 'application/x-www-form-urlencoded';\r\n options.dataType = options.dataType ? options.dataType : null;\r\n options.onsuccessEventData = options.onsuccessEventData || {};\r\n options.hideLoadingPanelOnSuccess = options.hideLoadingPanelOnSuccess === undefined ? true : options.hideLoadingPanelOnSuccess;\r\n options.hideLoadingPanelOnError = options.hideLoadingPanelOnError === undefined ? true : options.hideLoadingPanelOnError;\r\n options.ignoreBeforeAjax = options.ignoreBeforeAjax == undefined ? false : options.ignoreBeforeAjax;\r\n options.traditional = options.traditional == undefined ? false : options.traditional;\r\n options.cache = (typeof options.cache) == 'undefined' ? true : options.cache;\r\n options.skipCache = (typeof options.skipCache) == 'undefined' ? true : options.skipCache;\r\n if (options.requestId) {\r\n var requestKey = requestKeyPref + options.requestId;\r\n if (ajaxRequests[requestKey]) {\r\n ajaxRequests[requestKey].abort();\r\n delete ajaxRequests[requestKey];\r\n }\r\n }\r\n\r\n var handler = {\r\n type: type,\r\n url: options.url,\r\n data: options.data,\r\n cache: options.cache,\r\n contentType: options.cotentType,\r\n xhrFields: options.xhrFields,\r\n beforeSend: function (xhr) {\r\n try {\r\n if (autoPageReloader && autoPageReloader.shouldAutoReloadPage(options.url)) {\r\n $.advertiser.showLoadingPanel(false, null, {timeout: 30000});\r\n // cancel the request\r\n return false;\r\n }\r\n } catch (e) {\r\n // do nothing\r\n }\r\n if (options.beforeSend && $.isFunction(options.beforeSend)) {\r\n return options.beforeSend(xhr);\r\n }\r\n if (!options.ignoreBeforeAjax) {\r\n $.advertiser.beforeAjax();\r\n }\r\n },\r\n success: function (data, textStatus, xhr) {\r\n if (!$.advertiser.handleAjaxAuthFailure(data, options.url)) {\r\n return;\r\n }\r\n\r\n try {\r\n if (options.success && $.isFunction(options.success)) {\r\n options.success.apply(options, arguments);\r\n }\r\n else {\r\n if (data && data.Errors && !$.isEmptyObject(data.Errors)) {\r\n if (options.onJsonError && $.isFunction(options.onJsonError)) {\r\n options.onJsonError(data, textStatus, xhr);\r\n }\r\n else {\r\n $.advertiser.appendErrorSummary(data.Errors);\r\n }\r\n }\r\n if (options.onSuccess && $.isFunction(options.onSuccess)) {\r\n options.onSuccess(data, textStatus, options.data, options.onsuccessEventData, xhr);\r\n }\r\n }\r\n }\r\n finally {\r\n if (options.hideLoadingPanelOnSuccess) {\r\n $.advertiser.hideLoadingPanel();\r\n }\r\n }\r\n },\r\n error: function (xhr, textStatus, errorThrown) {\r\n try {\r\n if (options.error && $.isFunction(options.error)) {\r\n options.error.apply(options, arguments);\r\n }\r\n if (options.onAjaxError && $.isFunction(options.onAjaxError)) {\r\n options.onAjaxError(xhr, textStatus, errorThrown);\r\n }\r\n else {\r\n if (xhr && xhr.status != 0) {\r\n $.advertiser.ajaxError();\r\n }\r\n }\r\n }\r\n finally {\r\n if (options.hideLoadingPanelOnError) {\r\n $.advertiser.hideLoadingPanel();\r\n }\r\n }\r\n },\r\n complete: function (xhr, textStatus) {\r\n if (options.requestId) {\r\n requestKey = requestKeyPref + options.requestId;\r\n delete ajaxRequests[requestKey];\r\n }\r\n\r\n if (options.onAjaxComplete && $.isFunction(options.onAjaxComplete)) {\r\n options.onAjaxComplete(xhr, textStatus);\r\n }\r\n else {\r\n $.advertiser.ajaxComplete(xhr, textStatus, false);\r\n }\r\n },\r\n dataType: options.dataType,\r\n traditional: options.traditional,\r\n skipCache: options.skipCache\r\n };\r\n\r\n if (options.timeout !== undefined) {\r\n handler.timeout = options.timeout;\r\n }\r\n\r\n validateSession(handler);\r\n addFileCacheHandler(handler);\r\n\r\n return addGridDataContextAndReturnRequest(handler, options, requestKey, ajaxRequests);\r\n}\r\n\r\nfunction addGridDataContextAndReturnRequest(handler, options, requestKey, ajaxRequests){\r\n addGridDataContext(handler);\r\n var request = sendRequest(handler);\r\n\r\n // <TODO> tengdu, remove this.\r\n // This is temporary info log to detect ads inline update\r\n if(handler.url.indexOf('/Campaign/Ads/InlineUpdate') > -1) {\r\n import(/* webpackMode: 'eager' */ '@bingads-webui-static-legacy/instrumentation/index').then(legacyModule => legacyModule.default).then(function(instrument) {\r\n instrument.logMessage(\r\n ['ClientTrace'],\r\n {\r\n name: 'Info',\r\n value: 0\r\n },\r\n '__log_ui_err_ads_inlineupdate__',\r\n JSON.stringify({\r\n data: handler.data,\r\n url: handler.url,\r\n })\r\n );\r\n })\r\n }\r\n\r\n if (options.requestId) {\r\n requestKey = requestKeyPref + options.requestId;\r\n ajaxRequests[requestKey] = request;\r\n }\r\n return request;\r\n}\r\n\r\nfunction sendRequest(handler) {\r\n if (handler.contentType &&\r\n handler.contentType.indexOf('application/json') >= 0 &&\r\n typeof handler.data !== 'string') {\r\n handler.data = JSON.stringify(handler.data);\r\n }\r\n var request;\r\n if (window.dataServiceAvailable) {\r\n request = dataService.communicate(handler);\r\n } else {\r\n request = $.ajax(handler);\r\n }\r\n return request;\r\n}\r\n\r\nfunction validateSession(handler) {\r\n if (window.sessionValidatorAvailable) {\r\n import(/* webpackMode: 'eager' */ '@bingads-webui-static-legacy/session-validator').then(legacyModule => legacyModule.default).then(function (sessionValidator) {\r\n if (sessionValidator) {\r\n sessionValidator.validate(handler.url);\r\n }\r\n });\r\n }\r\n}\r\n\r\nfunction addGridDataContext(handler) {\r\n if (dataContextManager) {\r\n var segmentPostFix = /SegmentationTypes\\[0\\]$/;\r\n var dataFormKeys = (handler.data && typeof(handler.data) === 'object') ? _.keys(handler.data) : null;\r\n var segmentKey = dataFormKeys ? _.find(dataFormKeys, function(keys) {return segmentPostFix.test(keys)}) : null;\r\n var segmentValue = segmentKey ? handler.data[segmentKey] : null;\r\n var context = dataContextManager.getContext(handler.url, false, handler.type, segmentValue);\r\n if (context) {\r\n if (context.data){\r\n addToRequest(handler, context.data);\r\n }\r\n addBIDateRange(handler);\r\n var handlers = context.handlers;\r\n if (handlers) {\r\n var originalSuccess = handler.success;\r\n handler.success = function (data, textStatus, xhr) {\r\n for (var handler in handlers) {\r\n if (handlers.hasOwnProperty(handler) && $.isFunction(handlers[handler])) {\r\n handlers[handler](data, textStatus, xhr);\r\n }\r\n }\r\n if ($.isFunction(originalSuccess)) {\r\n originalSuccess(data, textStatus, xhr);\r\n }\r\n };\r\n }\r\n }\r\n }\r\n}\r\n\r\nfunction addBIDateRange(handler){\r\n var stateDateRange = window.App && window.App.state ? window.App.state.get('$daterange') : null;\r\n var osd = window.osd;\r\n if (osd &&\r\n osd.ui &&\r\n osd.ui.Controls &&\r\n osd.ui.Controls.DateRangeFilter &&\r\n _.isFunction(osd.ui.Controls.DateRangeFilter.getDateRange)) {\r\n //get date range from old date filter\r\n addToRequest(handler, {BiDateRange : osd.ui.Controls.DateRangeFilter.getDateRange()});\r\n } else if (stateDateRange) {\r\n var lcid = pageContext && pageContext.CurrentUser ?\r\n pageContext.CurrentUser.Locale :\r\n window.userLcid;\r\n //get date range from new date filter\r\n var dateRange = {\r\n RangeId : stateDateRange.grain,\r\n RangeStartDate : stateDateRange.formatedStart,\r\n RangeEndDate : stateDateRange.formatedEnd,\r\n Rangelcid : lcid\r\n };\r\n addToRequest(handler, {BiDateRange : dateRange});\r\n // TODO:[sjiang] need to pass compared data range as well. will work with Nick on it after the hotfix.\r\n }\r\n}\r\n\r\nfunction addFileCacheHandler(handler) {\r\n if (window.fileCacheHandlerAvailable) {\r\n if (fileCacheHandler) {\r\n var handleData = fileCacheHandler.getHandle(handler.url);\r\n if (handleData) {\r\n if (handleData.data) {\r\n addToRequest(handler, handleData.data);\r\n }\r\n if ($.isFunction(handleData.responseHandler)) {\r\n var originalSuccess = handler.success;\r\n handler.success = function (data, textStatus, xhr) {\r\n handleData.responseHandler(data, textStatus, xhr);\r\n if ($.isFunction(originalSuccess)) {\r\n originalSuccess(data, textStatus, xhr);\r\n }\r\n };\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\nfunction addToRequest(handler, dataToBeAdded) {\r\n if (typeof handler.data === 'string') {\r\n try {\r\n handler.data = JSON.parse(handler.data);\r\n handler.data = $.extend(true, handler.data, dataToBeAdded);\r\n } catch (e) {\r\n var contextParams = '';\r\n for (var key in dataToBeAdded) {\r\n if (dataToBeAdded.hasOwnProperty(key)) {\r\n contextParams += '&' + key + '=' + dataToBeAdded[key];\r\n }\r\n }\r\n handler.data += contextParams;\r\n }\r\n } else {\r\n handler.data = $.extend(true, handler.data, dataToBeAdded);\r\n }\r\n}\r\n\r\nfunction addOption(options, key, value) {\r\n var option = key + '=' + encodeURIComponent(value);\r\n if (!options.data) {\r\n options.data = option;\r\n return options;\r\n }\r\n if (typeof (options.data) === 'string') {\r\n if (options.data.indexOf(key) == -1) {\r\n options.data += '&' + option;\r\n }\r\n }\r\n else if (typeof (options.data) === 'object') {\r\n if (!options.data[key]) {\r\n options.data[key] = value;\r\n }\r\n }\r\n return options;\r\n}\r\n\r\nfunction addRequestToken(options) {\r\n var verificationToken = $('input[name=\"__RequestVerificationToken\"]').val();\r\n if (!verificationToken) {\r\n return options;\r\n }\r\n\r\n if (options.contentType && options.contentType.indexOf('application/json') >= 0) {\r\n if (typeof options.data === 'string') {\r\n options.data = JSON.parse(options.data);\r\n }\r\n options.data = $.extend(true, options.data, { __RequestVerificationToken: verificationToken });\r\n return options;\r\n } else {\r\n return addOption(options, '__RequestVerificationToken', verificationToken);\r\n }\r\n}\r\n\r\n$.advertiser.hideLayer = function (e) {\r\n if (e && e.data && e.data.targetLayerId) {\r\n var id = e.data.targetLayerId;\r\n if (e.target.id != id && $(e.target).parents('#' + id).length === 0 && checkForIds(e.target.id, e.data.additionalIds)) {\r\n var targetLayer = $('#' + id);\r\n targetLayer.hide();\r\n\r\n if (e.data.namespace) {\r\n $(document).off('click.' + e.data.namespace, $.advertiser.hideLayer);\r\n }\r\n else {\r\n $(document).off('click', $.advertiser.hideLayer);\r\n }\r\n if (e.data.callback && typeof (e.data.callback) === 'function') {\r\n e.data.callback(e);\r\n }\r\n }\r\n }\r\n}\r\n\r\nfunction checkForIds(targetId, ids) {\r\n if (ids) {\r\n for (var i = 0; i < ids.length; i++) {\r\n if (ids[i] === targetId) {\r\n return false;\r\n }\r\n }\r\n }\r\n\r\n return true;\r\n}\r\n\r\n$.isJSON = function (json) {\r\n json = json.replace(/\\\\[\"\\\\\\/bfnrtu]/g, '@');\r\n json = json.replace(/\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g, ']');\r\n json = json.replace(/(?:^|:|,)(?:\\s*\\[)+/g, '');\r\n return (/^[\\],:{}\\s]*$/.test(json));\r\n};\r\n\r\nString.prototype.isJSON = function () {\r\n return $.isJSON(this);\r\n};\r\n\r\n$.advertiser.redirect = function (redirectUrl) {\r\n if (redirectUrl && redirectUrl.length > 0) {\r\n var context = '';\r\n var custId = $.advertiser.getUrlParameter('cid', redirectUrl);\r\n if (!(custId && custId > 0)) {\r\n context = $.advertiser.getAccountContextQueryString();\r\n if (redirectUrl.indexOf('?') > -1) {\r\n if (context.indexOf('?') === 0) {\r\n context = '&' + context.slice(1);\r\n }\r\n }\r\n }\r\n var endUrl = $.advertiser.setRequestId(redirectUrl + context, true);\r\n var userId = $.advertiser.getUrlParameter('uid');\r\n endUrl = $.advertiser.setUrlParameter('uid', userId, endUrl);\r\n window.location.href = endUrl;\r\n }\r\n};\r\n\r\n$.advertiser.entitySeparator = '-------------------------';\r\n$.advertiser.showEntityErrors = function (errors, fieldId, errorPanelId) {\r\n if (!errors) {\r\n return;\r\n }\r\n if (fieldId && $.isArray(errors.InvalidEntities) && errors.InvalidEntities.length > 0) {\r\n var entities = $.merge([], errors.InvalidEntities);\r\n if ($.isArray(errors.ValidEntities) && errors.ValidEntities.length > 0) {\r\n entities.push($.advertiser.entitySeparator);\r\n $.merge(entities, errors.ValidEntities);\r\n }\r\n $('#' + fieldId).val(entities.join('\\n'));\r\n }\r\n if (errorPanelId && $.isArray(errors.EntityErrors) && errors.EntityErrors.length > 0) {\r\n var template = $.template('entityErrorsTemplate');\r\n if ($.isEmptyObject(template)) {\r\n template = $.template('entityErrorsTemplate', '<div class=\"error\">${Key}</div><ul>{{each Value}}<li>${$value}</li>{{/each}}</ul>');\r\n }\r\n $('#' + errorPanelId).empty().append($.tmpl(template, errors.EntityErrors)).show();\r\n }\r\n};\r\n\r\n// dynamic Hover\r\n$.gridPopup = {};\r\n\r\n$.gridPopup.Cache = new Array();\r\n$.gridPopup.Cache['Ids'] = new Array();\r\n\r\n$.gridPopup.ResetImage = function (event) {\r\n $.each($.gridPopup.Cache['Ids'], function (index, value) {\r\n $(value).removeClass('status_icon_hover').addClass('status_icon');\r\n });\r\n\r\n $.gridPopup.Cache['Ids'] = new Array();\r\n}\r\n\r\n$.gridPopup.pagePrev = function (elementPrefix, count) {\r\n\r\n var curPageEl = $('#gridPopup-Pager-cur'),\r\n curVal = parseInt(curPageEl.attr('data-val')),\r\n prevVal = curVal - 1,\r\n shouldShow;\r\n\r\n if (curVal > 1 && curVal <= count) {\r\n for (var i = 0; i < count; i++) {\r\n shouldShow = (i === curVal - 2);\r\n $('#' + elementPrefix + i).toggle(shouldShow);\r\n }\r\n curPageEl.attr('data-val', prevVal);\r\n curPageEl.html(prevVal);\r\n if (prevVal === 1) {\r\n $('#gridPopup-Pager-prev').toggleClass('grid-previous grid-previous-disabled');\r\n $('#gridPopup-Pager-prev').attr('tabindex', '-1');\r\n }\r\n $('#gridPopup-Pager-next').removeClass('grid-next-disabled').addClass('grid-next');\r\n $('#gridPopup-Pager-next').attr('tabindex', '0');\r\n }\r\n}\r\n\r\n$.gridPopup.pageNext = function (elementPrefix, count) {\r\n\r\n var curPageEl = $('#gridPopup-Pager-cur'),\r\n curVal = parseInt(curPageEl.attr('data-val')),\r\n nextVal = curVal + 1,\r\n shouldShow;\r\n\r\n if (curVal > 0 && curVal < count) {\r\n for (var i = 0; i < count; i++) {\r\n shouldShow = (i === curVal);\r\n $('#' + elementPrefix + i).toggle(shouldShow);\r\n }\r\n $('#gridPopup-Pager-cur').attr('data-val', nextVal);\r\n $('#gridPopup-Pager-cur').html(nextVal);\r\n if (nextVal === count) {\r\n $('#gridPopup-Pager-next').toggleClass('grid-next grid-next-disabled');\r\n $('#gridPopup-Pager-next').attr('tabindex', '-1');\r\n }\r\n\r\n $('#gridPopup-Pager-prev').attr('tabindex', '0');\r\n $('#gridPopup-Pager-prev').removeClass('grid-previous-disabled').addClass('grid-previous');\r\n }\r\n}\r\n\r\n$.gridPopup.Callback = function (data, status, options, eventArgs) {\r\n if (data && data.length > 0) {\r\n var container = $('#rejectionContainer');\r\n if (data.isJSON()) {\r\n $(document).trigger('click');\r\n var errorData = jQuery.parseJSON(data);\r\n if (errorData && errorData.Errors) {\r\n $.advertiser.clearErrorSummary();\r\n $.advertiser.appendErrorSummary(errorData.Errors);\r\n }\r\n }\r\n else {\r\n container.html(data);\r\n }\r\n $('#rejectionContainer .closeimage').focus();\r\n }\r\n}\r\n\r\n$.gridPopup.clickEvent = function (e, callBack, containerID, title, showLoading) {\r\n var arrow;\r\n e = e || window.event; //// debugger;\r\n if (e) { arrow = e.target || e.srcElement; }\r\n if (arrow) {\r\n var container = $('#' + containerID + '');\r\n\r\n // create the container if it doesn't exist already\r\n if (container.length === 0) {\r\n $('body').append('<div id=\\'' + containerID + '\\' role=\\'tooltip\\' class=\\'qs-Container\\'></div>');\r\n container = $('#' + containerID + '');\r\n }\r\n\r\n if (container.length != 0) {\r\n if (showLoading) {\r\n if (!$.gridPopup.Cache['imgPanelHtml']) {\r\n var loadingText = $('#loadingText').val();\r\n var imgPanelHtml = getBlockerHtml(loadingText, false);\r\n $.gridPopup.Cache['imgPanelHtml'] = imgPanelHtml;\r\n }\r\n container.html($.gridPopup.Cache['imgPanelHtml']);\r\n }\r\n\r\n if ($.isFunction(callBack)) {\r\n callBack();\r\n }\r\n\r\n var jarrow = $(arrow);\r\n var left = jarrow.parent().offset().left + jarrow.parent().width();\r\n if((left + container.outerWidth()) > $(window).width()) {\r\n left = jarrow.parent().offset().left - jarrow.parent().width() - container.outerWidth();\r\n }\r\n var top = jarrow.parents('td').offset().top - 8;\r\n\r\n container.show();\r\n container.offset({ top: top, left: left});\r\n jarrow.removeClass('status_icon').addClass('status_icon_hover');\r\n $.gridPopup.Cache['Ids'].push(arrow);\r\n $(document).on('click.' + containerID, { 'targetLayerId': containerID, 'namespace': containerID, 'additionalIds': [arrow.id], 'callback': $.gridPopup.ResetImage }, $.advertiser.hideLayer);\r\n $('#' + containerID + ' .closeimage').focus();\r\n }\r\n }\r\n}\r\n\r\n// Client center block js.\r\n//TODO: [alekseyv] Rewrite to use CSS instead of Javascript for resizing\r\nfunction blocker(targetPanel, loadingText) {\r\n var blockPanel, imgPanel;\r\n var target = targetPanel;\r\n var coveredElement;\r\n var coveredBound;\r\n var resizeCheckInterval;\r\n\r\n function getElementBound(element) {\r\n var offset = element.offset()\r\n ? element.offset()\r\n : {\r\n left: 0,\r\n top: 0\r\n };\r\n return {\r\n left : offset.left + parseInt(element.css('padding-left')),\r\n top : offset.top,\r\n width : element.width(),\r\n height: element.height()\r\n };\r\n }\r\n\r\n function areNotEqual(bound1, bound2) {\r\n return bound1.left !== bound2.left ||\r\n bound1.top !== bound2.top ||\r\n bound1.width !== bound2.width ||\r\n bound1.height !== bound2.height;\r\n }\r\n\r\n\r\n this.show = function (hideImage, element) {\r\n if (element && coveredElement && coveredElement[0] === element[0]) {\r\n return;\r\n }\r\n\r\n coveredBound = undefined;\r\n clearInterval(resizeCheckInterval);\r\n\r\n if (element && !blockPanel.is(':visible')) {\r\n coveredElement = element;\r\n coveredBound = getElementBound(element);\r\n resizeCheckInterval = setInterval(function () {\r\n var newBound = getElementBound(element);\r\n if (areNotEqual(coveredBound, newBound)) {\r\n coveredBound = newBound;\r\n setSize();\r\n }\r\n }, 50);\r\n }\r\n\r\n blockPanel.css({ display: 'block', zIndex: 1010 });\r\n if (imgPanel) imgPanel.css({ display: hideImage ? 'none' : 'block' });\r\n setSize();\r\n $(window).on('resize scroll', null, setSize);\r\n };\r\n\r\n this.hide = function () {\r\n blockPanel.hide();\r\n if (imgPanel) {\r\n imgPanel.hide();\r\n }\r\n $(window).off('resize scroll', setSize);\r\n clearInterval(resizeCheckInterval);\r\n coveredBound = undefined;\r\n coveredElement = undefined;\r\n };\r\n\r\n this.updateText = function (text) {\r\n if (!target) {\r\n $('div.blocker-text', imgPanel).html(text);\r\n setSize();\r\n }\r\n };\r\n\r\n function create() {\r\n if (!target) {\r\n blockPanel = $('<div class=\\'blocker-panel\\'></div>');\r\n loadingText = loadingText || 'Loading...';\r\n var imgPanelHtml = getBlockerHtml(loadingText, true);\r\n imgPanel = $(imgPanelHtml);\r\n var body = $('body');\r\n body.append(blockPanel);\r\n body.append(imgPanel);\r\n }\r\n else {\r\n blockPanel = target;\r\n }\r\n }\r\n\r\n function setSize() {\r\n var w = $(window);\r\n var wHeight = $.browser && $.browser.msie ? w.height() : window.innerHeight;\r\n var wWidth = w.width();\r\n var left, top;\r\n\r\n if (coveredBound) {\r\n blockPanel.css(\r\n {\r\n height: Math.max(coveredBound.height, wHeight),\r\n width: coveredBound.width,\r\n left: coveredBound.left,\r\n top: coveredBound.top\r\n });\r\n left = ((wWidth - blockPanel.offset().left - imgPanel.width()) / 2) + blockPanel.offset().left + w.scrollLeft();\r\n top = ((wHeight - blockPanel.offset().top - imgPanel.height()) / 2) + blockPanel.offset().top + w.scrollTop();\r\n } else if (target) {\r\n blockPanel.css(\r\n {\r\n left: (wWidth - blockPanel.width()) / 2,\r\n top: (wHeight - blockPanel.height()) / 2\r\n });\r\n left = ((wWidth - blockPanel.offset().left - imgPanel.width()) / 2) + blockPanel.offset().left + w.scrollLeft();\r\n top = ((wHeight - blockPanel.offset().top - imgPanel.height()) / 2) + blockPanel.offset().top + w.scrollTop();\r\n } else {\r\n blockPanel.css(\r\n {\r\n height: wHeight,\r\n width: wWidth,\r\n left: w.scrollLeft(),\r\n top: w.scrollTop()\r\n });\r\n left = ((wWidth - blockPanel.offset().left - imgPanel.width()) / 2) + w.scrollLeft();\r\n top = ((wHeight - imgPanel.height()) / 2) + w.scrollTop();\r\n }\r\n\r\n if (imgPanel) {\r\n if (left > 0 && top > 0) {\r\n imgPanel.css({\r\n left: left,\r\n top: top\r\n });\r\n }\r\n }\r\n }\r\n\r\n create();\r\n}\r\n\r\nfunction getBlockerHtml(loadingText, fixedPosition) {\r\n var imgPanelHtml, positionStyle = '';\r\n if (fixedPosition === false) {\r\n positionStyle = ' style=\"position: relative;\" ';\r\n }\r\n\r\n imgPanelHtml = '<div aria-live=\\'polite\\' aria-relevant=\\'all\\' class=\\'blocker-indicator\\'' + positionStyle + '><div class=\\'blocker-image\\'></div><div class=\\'blocker-text\\'>' + loadingText + '</div></div>';\r\n return imgPanelHtml;\r\n}\r\n","/* eslint-disable */\r\n\r\n// copied from application/scripts/module/lib/countdown.js to be used in $.advertiser\r\n// Countdown counter that updates every second\r\nexport function Countdown(options) {\r\n let timer;\r\n const instance = this;\r\n let seconds = options.seconds || 10;\r\n const updateStatus = options.onUpdateStatus || function () {};\r\n const counterEnd = options.onCounterEnd || function () {};\r\n\r\n function decrementCounter() {\r\n updateStatus(seconds);\r\n if (seconds === 0) {\r\n counterEnd();\r\n instance.stop();\r\n }\r\n seconds--;\r\n }\r\n\r\n this.start = function () {\r\n clearInterval(timer);\r\n timer = 0;\r\n seconds = options.seconds;\r\n timer = setInterval(decrementCounter, 1000);\r\n };\r\n\r\n this.stop = function () {\r\n clearInterval(timer);\r\n };\r\n};\r\n","/* eslint-disable no-param-reassign */\r\nimport $ from 'jquery';\r\nimport './advertiser.common.vnext';\r\nimport * as constants from '../global-init/constants';\r\nimport { Countdown } from './countdown';\r\n\r\nconst { handleAjaxAuthFailure } = constants;\r\n\r\nexport function overrideLegacyJQuery({\r\n aid,\r\n cid,\r\n uid,\r\n campaignId,\r\n adGroupId,\r\n}) {\r\n // some functions are modified, keep them.\r\n const originalGetUrlParameter = $.advertiser.getUrlParameter;\r\n $.advertiser.getUrlParameter = (name, url) => {\r\n if (url === window.location.href || !url) {\r\n switch (name) {\r\n case 'aid':\r\n return aid;\r\n case 'cid':\r\n return cid;\r\n case 'uid':\r\n return uid;\r\n case 'cmpid':\r\n return campaignId;\r\n case 'adgid':\r\n return adGroupId;\r\n default:\r\n break;\r\n }\r\n }\r\n return originalGetUrlParameter(name, url);\r\n };\r\n\r\n $.advertiser.handleAjaxAuthFailure = (data, requestUrl) => {\r\n if (!data) {\r\n return true;\r\n }\r\n\r\n if (!handleAjaxAuthFailure(data, requestUrl)) {\r\n return false;\r\n }\r\n\r\n // copy logic from old ui advertiser.common.js\r\n if (data.AntiForgeryError) {\r\n const counter = new Countdown({\r\n seconds: 10, // number of seconds to count down before refreshing the page\r\n onUpdateStatus(second) {\r\n if (data.AntiForgeryError.Message && second) {\r\n $.advertiser.clearErrorSummary();\r\n $.advertiser.appendErrorSummary(data.AntiForgeryError.Message.replace('{0}', second));\r\n }\r\n },\r\n onCounterEnd() {\r\n window.location.reload();\r\n },\r\n });\r\n\r\n counter.start();\r\n\r\n return false;\r\n }\r\n\r\n return true;\r\n };\r\n\r\n $.advertiser.beforeTabAjax = () => {\r\n $.advertiser.clearErrorSummary();\r\n $.advertiser.showLoadingPanel();\r\n };\r\n}\r\n","/* eslint-disable @typescript-eslint/no-unused-vars */\r\n\r\nimport Backbone from 'backbone';\r\nimport $ from 'jquery';\r\nimport 'jquery-migrate';\r\nimport _ from 'underscore';\r\nimport ko from 'knockout';\r\nimport BluebirdPromise from 'bluebird';\r\nimport kendo from '@bingads-webui/kendo/kendo.data';\r\n\r\nimport * as filterStroage from '@bingads-webui-campaign/filter-storage';\r\nimport schemaVnext from '@bingads-webui-campaign/campaign-ui-schemas';\r\nimport { PageReady } from '@bingads-webui/page-ready';\r\n\r\n// This import was earlier happening on experiment subpage menu.\r\n// After we delayed subpage menu, many features are broken. Importing it during init-legacy.\r\nimport 'bootstrap';\r\n\r\n/* eslint-disable import/no-unresolved,import/extensions */\r\nimport { getBudgetRangeOld } from '@bingads-webui-campaign-legacy/common-grid-config/budget/get-budget-range';\r\nimport PageContext from '@bingads-webui-static-legacy/page-context';\r\nimport JSData from 'js-data';\r\nimport componentConfigImport from '@bingads-webui-component-legacy/config/index';\r\nimport componentStateImport from '@bingads-webui-component-legacy/state/index';\r\nimport * as prefetchResourcesImport from '@bingads-webui-campaign-legacy/resources-prefetch/campaignui-resources-prefetch';\r\nimport dateFilterImport from '@bingads-webui-static-legacy/app/state/dateFilter';\r\nimport ajaxsetupImport from '@bingads-webui-static-legacy/app/config/ajaxsetup';\r\n// Extensions need to load:\r\nimport '@bingads-webui-component-legacy/js-data-extension/index';\r\n/* eslint-enable */\r\nimport dataContextManager from '@bingads-webui-static-legacy/summary/SummaryDataContextManager';\r\n\r\nimport { themes } from '../themes-config';\r\nimport { initKendo } from './kendo-bootstrap';\r\nimport { initOSD } from './osd-bootstrap';\r\nimport { legacyAccessibilityHelper } from './legacy-accessibility-shim-layer';\r\nimport './shim/jquery-shim';\r\nimport { overrideLegacyJQuery } from './override-legacy-jquery';\r\nimport * as constants from '../global-init/constants';\r\n\r\nconst pageContext = PageContext;\r\nconst config = componentConfigImport;\r\nconst state = componentStateImport;\r\nconst { redirectToLogin } = constants;\r\nlet waterfallFilterStorage;\r\nconst overrideLegacyJQueryFromWebpack = overrideLegacyJQuery;\r\n// const getCldrLocaleFunc = getCldrLocale;\r\nconst initializeKendo = initKendo;\r\nconst initializeOSD = initOSD;\r\nconst shimLegacyAccessibility = legacyAccessibilityHelper;\r\nconst ajaxsetupWebpack = ajaxsetupImport;\r\n\r\nconst BingBaseUrl = 'https://bing.com/';\r\nconst MaxSelectedImagesPerAccountDefault = 25;\r\nconst MaxSelectedImagesPerAdGroupOrCampaignForV2 = 25;\r\nconst MaxSelectedImagesPerAdGroupOrCampaign = 25;\r\nconst dateFilterFromWebpack = dateFilterImport;\r\nconst prefetchResources = prefetchResourcesImport;\r\nconst { WaterfallFilterStorage, WaterfallFilterType, waterfallDateFilterProcessor } = filterStroage;\r\n\r\n// Feature code relies on bluebird promises\r\nJSData.DSUtils.Promise = BluebirdPromise;\r\n\r\nBackbone.$ = $;\r\n\r\n/* eslint-disable no-underscore-dangle */\r\nwindow.__requirejs_packages_temp_global__ = {};\r\nwindow.__requirejs_packages_temp_global__['@bingads-webui-static-legacy/summary/SummaryDataContextManager'] = dataContextManager;\r\n\r\nfunction initDateFilter({\r\n dateFilter,\r\n preferenceService,\r\n serverContext,\r\n}) {\r\n if (_.isUndefined(preferenceService.findByName('WebApp.CampaignUI.dateFilter'))) {\r\n dateFilter\r\n .getFilterPromise()\r\n .then((dateRange) => {\r\n const lcid = serverContext && serverContext.CurrentUser ? serverContext.CurrentUser.Locale : '';\r\n const dateRangeLegacy = _.extend({\r\n RangeStartDate: dateRange.formatedStart,\r\n RangeEndDate: dateRange.formatedEnd,\r\n RangeId: dateRange.grain,\r\n Rangelcid: lcid,\r\n }, {\r\n compared: dateRange.compared,\r\n });\r\n preferenceService.setAtUserLevel({ Name: 'WebApp.CampaignUI.dateFilter', Data: dateRangeLegacy });\r\n });\r\n }\r\n}\r\n\r\nconst initPrefetch = _.memoize((Permissions) => {\r\n const newUIResources = window.serviceWorkerPreFetchUrls && window.serviceWorkerPreFetchUrls.filter(r => r.indexOf('/resources/') > -1);\r\n\r\n prefetchResources.init(Permissions, newUIResources);\r\n}, () => null);\r\n\r\nko.utils.domNodeDisposal.cleanExternalData = () => {}; // eslint-disable-line no-param-reassign\r\n\r\najaxsetupWebpack.run();\r\n\r\nfunction getLimitValue(serverContext, scope, getLimitValueById) {\r\n const perCampaign = getLimitValueById(serverContext, scope, 28);\r\n const perAdGroup = getLimitValueById(serverContext, scope, 29);\r\n const perAccount = getLimitValueById(serverContext, scope, 93);\r\n return { perCampaign, perAdGroup, perAccount };\r\n}\r\n\r\nfunction loadSystemLimit(cid, aid, serverContext, scope) {\r\n const isLegal = (val) => {\r\n if (val === null || val === undefined) { return false; }\r\n return true;\r\n };\r\n\r\n PageReady.afterPageReady().then(() => {\r\n import('../global-init/load-limit-odata-localstorage').then((item) => {\r\n const limitValue = (cid && aid) ? getLimitValue(serverContext, scope, item.getLimitValueById) : {};\r\n const MaxSelectedImagesPerCampaign = isLegal(limitValue.perCampaign) ? limitValue.perCampaign : MaxSelectedImagesPerAdGroupOrCampaignForV2;\r\n const MaxSelectedImagesPerAdGroup = isLegal(limitValue.perAdGroup) ? limitValue.perAdGroup : MaxSelectedImagesPerAdGroupOrCampaignForV2;\r\n const MaxSelectedImagesPerAccount = isLegal(limitValue.perAccount) ? limitValue.perAccount : MaxSelectedImagesPerAccountDefault;\r\n\r\n const featureConfig = config.get('Feature');\r\n config.set({\r\n Feature: {\r\n AdExtension: {\r\n MaxSelectedImagesPerCampaign,\r\n MaxSelectedImagesPerAdGroup,\r\n MaxSelectedImagesPerAccount,\r\n ...featureConfig.AdExtension,\r\n },\r\n },\r\n });\r\n });\r\n });\r\n}\r\n\r\nexport function initLegacyComponents({\r\n serverContext,\r\n scope = {},\r\n permissions: Permissions,\r\n preferenceService,\r\n curTheme,\r\n}) {\r\n const {\r\n values: {\r\n cid,\r\n aid,\r\n campaignId,\r\n adGroupId,\r\n },\r\n } = scope;\r\n const {\r\n CurrentCustomer,\r\n UserPreferences: { AccountLevelPreferences, UserLevelPreferences },\r\n CurrentAccount,\r\n CurrentAccountInActive,\r\n CurrentLocale,\r\n CurrentUser,\r\n Token,\r\n ServicesEndpoints: { CampaignAPI, AdInsightAPI, MmcAPI },\r\n CurrentLocale: Culture,\r\n KeywordBidRange,\r\n KeywordCPVBidRange,\r\n KeywordCPMBidRange,\r\n ProductGroupBidRange,\r\n VideoViewsCPVBidRange,\r\n VideoViewsCPMBidRange,\r\n RecommendCPCBid,\r\n WindowsStoreAdsBidRange,\r\n Urls: {\r\n ClientCenterBaseUrl,\r\n },\r\n DecimalFormatter,\r\n PublicPath,\r\n WelcomeStatus,\r\n UtcOffsetHours,\r\n IsAADUser,\r\n } = serverContext;\r\n\r\n\r\n const uid = CurrentUser.Id;\r\n const TemplatesPathUrl = `${PublicPath}files/templates/`;\r\n const imagePath = `${PublicPath}files/images/`;\r\n\r\n const AudienceSettings = {\r\n RemarketingPolicyLink: 'http://go.microsoft.com/fwlink/?LinkId=690341',\r\n BulkAssociationMaxLimit: 1000000,\r\n BulkAudienceCriterionMaxLimit: 3000000,\r\n };\r\n const BingPlacesTaskItemType = 'BingPlacesImport';\r\n const GMBTaskItemType = 'GoogleMyBusinessImport';\r\n const {\r\n AdvertiserCustomerID,\r\n CurrencyCode,\r\n TimeZone,\r\n } = CurrentAccount;\r\n\r\n const BudgetRange = getBudgetRangeOld(CurrencyCode);\r\n\r\n loadSystemLimit(cid, aid, serverContext, scope);\r\n\r\n overrideLegacyJQueryFromWebpack({\r\n aid,\r\n cid,\r\n uid,\r\n campaignId,\r\n adGroupId,\r\n });\r\n\r\n config.set({\r\n CurrentAccount,\r\n CurrentCustomer,\r\n CurrentUser,\r\n IsNewUI: true,\r\n });\r\n\r\n config.set({\r\n Feature: {\r\n AdExtension: {\r\n AppExtensionIconBaseUrl: BingBaseUrl,\r\n MaxSelectedImagesPerAdGroupOrCampaign,\r\n MaxSelectedImagesPerAdGroupOrCampaignForV2,\r\n },\r\n },\r\n });\r\n\r\n config.set({\r\n // if a react component is wrapped with backbone view, we could not get the theme injected in App layer.\r\n // Here inject theme to config so that legacy code can easy get it and pass to underlying react component\r\n theme: themes[curTheme],\r\n });\r\n\r\n state.set({\r\n advertisercustomer_id: AdvertiserCustomerID,\r\n customer_id: cid,\r\n user_id: uid,\r\n account_id: aid,\r\n campaign_id: campaignId,\r\n adgroup_id: adGroupId,\r\n });\r\n\r\n state.on('http.auth.error', redirectToLogin);\r\n\r\n Object.assign(pageContext, {\r\n Token,\r\n IsAADUser,\r\n BudgetRange,\r\n KeywordBidRange,\r\n KeywordCPVBidRange,\r\n KeywordCPMBidRange,\r\n ProductGroupBidRange,\r\n VideoViewsCPVBidRange,\r\n VideoViewsCPMBidRange,\r\n RecommendCPCBid,\r\n Culture,\r\n CurrentAccount,\r\n CurrentAccountInActive,\r\n CurrentCustomer,\r\n CurrentLocale,\r\n CurrentUser,\r\n ClientInstrumentation: { isEnabled: true },\r\n Permissions,\r\n UserLevelPreferences: JSON.parse(UserLevelPreferences),\r\n AccountLevelPreferences: JSON.parse(AccountLevelPreferences),\r\n BingAdsWebApiUri: CampaignAPI,\r\n BingAdsAdInsightWebApiUri: AdInsightAPI,\r\n CultureDateTimeFormat: CurrentUser.CultureDateTimeFormat,\r\n CultureName: Culture,\r\n CultureDayNames: CurrentUser.CultureDateTimeFormat.DayNames,\r\n CultureDayNamesShort: CurrentUser.CultureDateTimeFormat.AbbreviatedDayNames,\r\n CultureDayNamesMin: CurrentUser.CultureDateTimeFormat.ShortestDayNames,\r\n CultureMonthNames: CurrentUser.CultureDateTimeFormat.MonthNames,\r\n CultureMonthNamesShort: CurrentUser.CultureDateTimeFormat.AbbreviatedMonthNames,\r\n CultureFirstDay: CurrentUser.CultureDateTimeFormat.FirstDayOfWeek,\r\n DecimalFormatter,\r\n AccountCurrencyCode: CurrencyCode,\r\n AudienceSettings,\r\n GMBTaskItemType,\r\n BingPlacesTaskItemType,\r\n TemplatesPathUrl,\r\n CCBaseUrl: ClientCenterBaseUrl,\r\n WelcomeStatus,\r\n CultureLcid: CurrentUser.LocaleID,\r\n AccountsOverviewPrefetchQuery: serverContext.AccountsOverviewPrefetchQuery,\r\n UtcOffsetHours,\r\n sessionId: serverContext.Omniture && serverContext.Omniture.SessionId,\r\n });\r\n\r\n initializeKendo(kendo, pageContext, DecimalFormatter);\r\n initializeOSD();\r\n\r\n const isLocal = () => {\r\n const hostname = document.location.hostname.toLowerCase();\r\n return hostname.indexOf('ads.microsoft.com') === -1 &&\r\n hostname.indexOf('ads-int.microsoft.com') === -1;\r\n };\r\n const odataPath = isLocal() ? 'Advertiser/V2' : 'Campaign/V2';\r\n\r\n // multiPart path is inside the request POST body so can't be proxied by UI server like path\r\n const batchPath = 'Advertiser/V2';\r\n config.set({\r\n 'odata.path': odataPath,\r\n 'odata.multipart_path': batchPath,\r\n 'odata.batch_url': `${CampaignAPI}${odataPath}/$batch`,\r\n 'odata.url': CampaignAPI,\r\n 'adinsight.odata.url': AdInsightAPI,\r\n 'adinsight.odata.batch_url': `${AdInsightAPI}AdInsight/V2/$batch`,\r\n BingAdsMmcWebApiUri: MmcAPI,\r\n BudgetRange,\r\n KeywordBidRange,\r\n KeywordCPVBidRange,\r\n KeywordCPMBidRange,\r\n KeywordPercentCpcBidRange: { CeilingValue: 100, FloorValue: 0 },\r\n KeywordCommissionRateRange: { CeilingValue: 100, FloorValue: 0 },\r\n ProductGroupBidRange,\r\n VideoViewsCPVBidRange,\r\n VideoViewsCPMBidRange,\r\n RecommendCPCBid,\r\n WindowsStoreAdsBidRange,\r\n AccountTimeZone: TimeZone,\r\n audienceSettings: AudienceSettings,\r\n CurrentAccount,\r\n CurrentAccountInActive,\r\n CurrentCustomer,\r\n CurrentUser,\r\n Culture,\r\n CultureDateTimeFormat: CurrentUser.CultureDateTimeFormat,\r\n CultureName: Culture,\r\n CultureDayNames: CurrentUser.CultureDateTimeFormat.DayNames,\r\n CultureDayNamesShort: CurrentUser.CultureDateTimeFormat.AbbreviatedDayNames,\r\n CultureDayNamesMin: CurrentUser.CultureDateTimeFormat.ShortestDayNames,\r\n CultureMonthNames: CurrentUser.CultureDateTimeFormat.MonthNames,\r\n CultureMonthNamesShort: CurrentUser.CultureDateTimeFormat.AbbreviatedMonthNames,\r\n CultureFirstDay: CurrentUser.CultureDateTimeFormat.FirstDayOfWeek,\r\n AccountLevelPreferences,\r\n UserLevelPreferences,\r\n culture: Culture,\r\n AccountCurrencyCode: CurrencyCode,\r\n Permissions,\r\n permissions: Permissions, // [ericwa]duplicated permissions in legacy UI and lots of places use it as config.get('permissions'), had better to unify it to config.get('Permissions')\r\n CultureLcid: CurrentUser.LocaleID,\r\n Token,\r\n 'odata.token': Token,\r\n 'globalization.number.decimalpoint': DecimalFormatter.decimalChar,\r\n 'globalization.number.groupPoint': DecimalFormatter.groupChar,\r\n 'globalization.number.groupSize': DecimalFormatter.groupSize,\r\n 'globalization.number.percentSymbol': DecimalFormatter.percentSymbol,\r\n 'globalization.number.percentGroupSize': DecimalFormatter.percentGroupSize,\r\n 'globalization.number.percentGroupSeparator': DecimalFormatter.percentGroupSeparator,\r\n 'globalization.number.percentPositivePattern': DecimalFormatter.percentPositivePattern,\r\n 'globalization.number.numberOfDigits': DecimalFormatter.numberOfDigits,\r\n 'globalization.number.percentDecimalDigits': DecimalFormatter.percentDecimalDigits,\r\n 'globalization.number.percentDecimalSeparator': DecimalFormatter.percentDecimalSeparator,\r\n TemplatesPathUrl,\r\n CCBaseUrl: ClientCenterBaseUrl,\r\n imagePath,\r\n BingAdsAdInsightWebApiUri: AdInsightAPI,\r\n Omniture: serverContext.Omniture,\r\n });\r\n\r\n if (CurrencyCode === 'JPY') {\r\n config.set({\r\n 'globalization.number.numberOfDigits': 0,\r\n });\r\n }\r\n\r\n schemaVnext.appendDynamicInfoToSchema(config, schemaVnext.schemaVnextObj);\r\n\r\n window.App = {\r\n state,\r\n on: () => (window.App),\r\n off: () => (window.App),\r\n once: () => (window.App),\r\n views: {\r\n alertCenter: {}, // alert center will be loaded after page ready.\r\n },\r\n router_new: {\r\n on: () => (window.App),\r\n },\r\n trigger: (route, args) => {\r\n /* eslint-disable */\r\n console.log(`LEGACY:Made a call to window.App.trigger with ${route} and ${JSON.stringify(args)}`);\r\n /* eslint-enable */\r\n },\r\n context: {\r\n getContextQueryUrlParams: () => {\r\n const urlParams = `cid=${cid}&aid=${aid}`;\r\n return urlParams;\r\n },\r\n },\r\n };\r\n\r\n initDateFilter({\r\n dateFilter: dateFilterFromWebpack,\r\n preferenceService,\r\n serverContext,\r\n });\r\n\r\n if (!state.attributes.$daterange) {\r\n Object.defineProperty(state.attributes, '$daterange', {\r\n get: () => {\r\n if (_.isUndefined(waterfallFilterStorage)) {\r\n waterfallFilterStorage = new WaterfallFilterStorage({\r\n preferenceService,\r\n });\r\n }\r\n const dateRange = waterfallDateFilterProcessor(\r\n waterfallFilterStorage.getFilters([WaterfallFilterType.DateFilter]),\r\n serverContext\r\n );\r\n return _.extend({\r\n formatedEnd: dateRange.RangeEndDate,\r\n formatedStart: dateRange.RangeStartDate,\r\n }, dateRange);\r\n },\r\n });\r\n }\r\n\r\n shimLegacyAccessibility();\r\n\r\n initPrefetch(Permissions);\r\n}\r\n\r\nexport function initLegacyComponentsWithServerContext(serverContext, preferenceService, curTheme) {\r\n return initLegacyComponents({\r\n serverContext,\r\n scope: {\r\n values: {\r\n uid: serverContext.CurrentUser.Id,\r\n cid: serverContext.CurrentCustomer.Id,\r\n aid: serverContext.CurrentAccount.Id,\r\n },\r\n },\r\n permissions: {\r\n ...serverContext.Permissions,\r\n dynamic: serverContext.DynamicPermissions || {},\r\n },\r\n preferenceService,\r\n curTheme,\r\n });\r\n}\r\n","export const initKendo = (kendo, pageContext, DecimalFormatter) => {\r\n const dtFormat = pageContext.CultureDateTimeFormat;\r\n const am = dtFormat.AMDesignator || 'AM';\r\n const pm = dtFormat.PMDesignator || 'PM';\r\n\r\n const groupChar = DecimalFormatter && DecimalFormatter.groupChar ? DecimalFormatter.groupChar : ',';\r\n const decimalChar = DecimalFormatter && DecimalFormatter.decimalChar ? DecimalFormatter.decimalChar : '.';\r\n const groupSize = DecimalFormatter && DecimalFormatter.groupSize ? parseInt(DecimalFormatter.groupSize, 10) : 3;\r\n const numberOfDigits = DecimalFormatter && DecimalFormatter.numberOfDigits ? parseInt(DecimalFormatter.numberOfDigits, 10) : 2;\r\n const currency = pageContext.AccountCurrencyCode ? pageContext.AccountCurrencyCode : 'USD';\r\n\r\n // eslint-disable-next-line no-param-reassign\r\n kendo.cultures[pageContext.Culture] = {\r\n name: pageContext.CultureName,\r\n numberFormat: {\r\n pattern: ['-n'], // numberFormat has only negative pattern unline the percent and currency, negative pattern: one of (n)|-n|- n|n-|n -\r\n decimals: numberOfDigits, // number of decimal places\r\n ',': groupChar, // string that separates the number groups (1,000,000)\r\n '.': decimalChar, // string that separates a number from the fractional point\r\n groupSize: [groupSize], // the length of each number group\r\n percent: {// formatting rules for percent number\r\n pattern: ['-n %', 'n %'], // [negative pattern, positive pattern]; negativePattern: one of -n %|-n%|-%n|%-n|%n-|n-%|n%-|-% n|n %-|% n-|% -n|n- %;positivePattern: one of n %|n%|%n|% n\r\n decimals: numberOfDigits, // number of decimal places\r\n ',': groupChar, // string that separates the number groups (1,000,000 %)\r\n '.': decimalChar, // string that separates a number from the fractional point\r\n groupSize: [groupSize], // the length of each number group\r\n symbol: '%', // percent symbol\r\n },\r\n currency: {\r\n pattern: [`(${currency} n)`, `${currency} n`], // [negative pattern, positive pattern];negativePattern: one of \"($n)|-$n|$-n|$n-|(n$)|-n$|n-$|n$-|-n $|-$ n|n $-|$ n-|$ -n|n- $|($ n)|(n $)\";positivePattern: one of \"$n|n$|$ n|n $\"\r\n decimals: numberOfDigits, // number of decimal places\r\n ',': groupChar, // string that separates the number groups (1,000,000 $)\r\n '.': decimalChar, // string that separates a number from the fractional point\r\n groupSize: [groupSize], // the length of each number group\r\n symbol: currency, // currency symbol\r\n },\r\n },\r\n calendars: {\r\n standard: {\r\n days: {\r\n names: pageContext.CultureDayNames, // full day names\r\n namesAbbr: pageContext.CultureDayNamesShort, // abbreviated day names\r\n namesShort: pageContext.CultureDayNamesMin, // shortest day names\r\n },\r\n months: {\r\n names: pageContext.CultureMonthNames, // full month names\r\n namesAbbr: pageContext.CultureMonthNamesShort, // abbreviated month names\r\n },\r\n AM: [am, am.toLowerCase(), am.toUpperCase()], // [\"AM\", \"am\", \"AM\"], // AM and PM designators\r\n PM: [pm, pm.toLowerCase(), pm.toUpperCase()], // [\"PM\", \"pm\", \"PM\"], // [standard,lowercase,uppercase]\r\n patterns: { // set of predefined date and time patterns used by the culture.\r\n d: dtFormat.ShortDatePattern,\r\n D: dtFormat.LongDatePattern,\r\n F: dtFormat.FullDateTimePattern,\r\n g: `${dtFormat.ShortDatePattern} ${dtFormat.ShortTimePattern}`,\r\n G: `${dtFormat.ShortDatePattern} ${dtFormat.LongTimePattern}`,\r\n m: dtFormat.MonthDayPattern,\r\n M: dtFormat.MonthDayPattern,\r\n s: dtFormat.SortableDateTimePattern,\r\n t: dtFormat.ShortTimePattern,\r\n T: dtFormat.LongTimePattern,\r\n u: dtFormat.UniversalSortableDateTimePattern,\r\n y: dtFormat.YearMonthPattern,\r\n Y: dtFormat.YearMonthPattern,\r\n },\r\n firstDay: pageContext.CultureFirstDay, // the first day of the week (0 = Sunday, 1 = Monday, etc)\r\n },\r\n },\r\n };\r\n\r\n kendo.culture(pageContext.Culture);\r\n};\r\n","import $ from 'jquery';\r\n\r\nexport function initOSD() {\r\n window.osd = window.osd || {};\r\n window.osd.ui = window.osd.ui || {};\r\n window.osd.ui.data = window.osd.ui.data || {};\r\n\r\n // init the window.osd.ui.data.Event\r\n (function ($) { // eslint-disable-line\r\n const { inArray } = $;\r\n\r\n const event = function () {\r\n this.subscribers = [];\r\n };\r\n\r\n event.prototype = {\r\n subscribe(callback, timeout) {\r\n // eslint-disable-next-line no-param-reassign\r\n timeout = isNaN(timeout) ? 0 : (0 || timeout);\r\n if (timeout <= 0) {\r\n this.subscribers.push(callback);\r\n } else {\r\n this.subscribers.push(() => { setTimeout(callback, timeout); });\r\n }\r\n return true;\r\n },\r\n unsubscribe(callback) {\r\n const i = inArray(callback, this.subscribers);\r\n if (i >= 0) {\r\n this.subscribers.splice(i, 1);\r\n return true;\r\n }\r\n\r\n return false;\r\n },\r\n unsubscribeAll() {\r\n this.subscribers = [];\r\n },\r\n publish() {\r\n const copy = this.subscribers.slice(0);\r\n let i = copy.length;\r\n while (i) {\r\n // eslint-disable-next-line\r\n try { copy[i].apply(this, arguments); } catch (err) { }\r\n i -= 1;\r\n }\r\n },\r\n };\r\n\r\n this.Event = event;\r\n }).call(window.osd.ui.data, $);\r\n}\r\n","import _ from 'underscore';\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { withSiteMap, processor, siteMapPropType } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { withScope, QueryParam } from '@bingads-webui-react/scope-service';\r\nimport * as legacyRouterDep from '@bingads-webui-campaign-react/legacy-router-dep';\r\nimport {\r\n convertStringToEnumForCampaign,\r\n convertStringToEnumForAdGroup,\r\n withCurrentExpandedScope\r\n} from '@bingads-webui-campaign-react/use-current-scope-entity';\r\nimport { PageReady } from '@bingads-webui/page-ready';\r\n\r\n/* eslint-disable import/no-unresolved,import/extensions */\r\nimport legacyRouterImport from '@bingads-webui-component-legacy/legacy-router/index';\r\nimport componentStateImport from '@bingads-webui-component-legacy/state/index';\r\nimport componentConfigImport from '@bingads-webui-component-legacy/config/index';\r\nimport PageContext from '@bingads-webui-static-legacy/page-context';\r\n/* eslint-enable */\r\n\r\n// FIXME: rayduan please fix this\r\nimport { withCampaign } from '@bingads-webui-campaign-react/with-campaign-legacy';\r\n\r\n\r\nfunction initAlertCenter() {\r\n import(/* webpackMode: 'eager' */'@bingads-webui-campaign/notification-center')\r\n .then(({ oldAlertCenterAdapter }) => {\r\n window.App.views = {\r\n alertCenter: oldAlertCenterAdapter,\r\n };\r\n });\r\n}\r\n\r\nPageReady.afterPageReady().then(() => {\r\n // No alerts are shown during page load. Moving init alert center to after page ready.\r\n // If a feature requires old alert center during page load then it would be a good idea to import it directly instead of using window.app\r\n initAlertCenter();\r\n});\r\n\r\nwindow.App.views = {\r\n alertCenter: {},\r\n};\r\n\r\nfunction mapODataContextToPageContext({\r\n currentCampaign, currentAdGroup, campaignId, adGroupId,\r\n}) {\r\n let CurrentCampaign = null;\r\n let CurrentAdGroup = null;\r\n\r\n if (!_.isEmpty(currentCampaign) && campaignId) {\r\n CurrentCampaign = convertStringToEnumForCampaign(currentCampaign);\r\n }\r\n if (!_.isEmpty(currentAdGroup) && adGroupId) {\r\n CurrentAdGroup = convertStringToEnumForAdGroup(currentAdGroup);\r\n }\r\n\r\n return {\r\n CurrentCampaign, CurrentAdGroup,\r\n };\r\n}\r\n\r\nfunction capitalize(str) {\r\n return str.charAt(0).toUpperCase() + str.slice(1);\r\n}\r\n\r\nfunction mapScopeToPageContext(scope) {\r\n let tabId = null;\r\n const pathname = scope.location && scope.location.pathname;\r\n if (pathname) {\r\n // Skip level in url\r\n const matchLastSlash = /\\/([^/]+)(\\/account|\\/adgroup|\\/campaign)?$/.exec(pathname);\r\n const siteName = matchLastSlash && matchLastSlash[1];\r\n if (siteName) {\r\n tabId = capitalize(siteName);\r\n }\r\n }\r\n\r\n return {\r\n CurrentTabId: tabId,\r\n };\r\n}\r\n\r\nconst pageContext = PageContext;\r\nconst state = componentStateImport;\r\nconst config = componentConfigImport;\r\nconst { getRouterDep } = legacyRouterDep;\r\nlet legacyRouter = legacyRouterImport;\r\n\r\n// This HoC only updates legacy component that is changable. Constant contexts are initialized in init-legacy-component\r\nexport const withLegacyContext = (Component, withCustomScope = withCurrentExpandedScope) => {\r\n const WrappedComponent = (props) => {\r\n const {\r\n siteMap, scope, currentCampaign, currentAdGroup,\r\n } = props;\r\n\r\n if (getRouterDep && siteMap && scope) {\r\n if (legacyRouter) {\r\n legacyRouter.legacyRouter = getRouterDep(scope, siteMap);\r\n } else {\r\n legacyRouter = { legacyRouter: getRouterDep(scope, siteMap) };\r\n }\r\n }\r\n\r\n const { CurrentTabId } = mapScopeToPageContext(scope);\r\n Object.assign(pageContext, { CurrentTabId });\r\n\r\n const {\r\n values: {\r\n uid,\r\n cid,\r\n aid,\r\n campaignId,\r\n adGroupId,\r\n },\r\n } = scope;\r\n\r\n const { CurrentCampaign, CurrentAdGroup } = mapODataContextToPageContext({\r\n currentCampaign,\r\n currentAdGroup,\r\n campaignId,\r\n adGroupId,\r\n });\r\n\r\n Object.assign(pageContext, { CurrentCampaign, CurrentAdGroup });\r\n config.set({\r\n CurrentCampaign,\r\n CurrentAdGroup,\r\n });\r\n\r\n state.set({\r\n user_id: uid,\r\n customer_id: cid,\r\n account_id: aid,\r\n campaign_id: campaignId,\r\n adgroup_id: adGroupId,\r\n });\r\n\r\n return (<Component {...props} />);\r\n };\r\n\r\n WrappedComponent.propTypes = {\r\n siteMap: siteMapPropType.isRequired,\r\n scope: PropTypes.instanceOf(QueryParam).isRequired,\r\n currentCampaign: PropTypes.shape({ Id: PropTypes.number }),\r\n currentAdGroup: PropTypes.shape({ Id: PropTypes.number }),\r\n };\r\n\r\n WrappedComponent.defaultProps = {\r\n currentCampaign: null,\r\n currentAdGroup: null,\r\n };\r\n\r\n return withCustomScope(withScope(withSiteMap(React.memo(WrappedComponent), [\r\n processor.processPermissions,\r\n processor.processScope,\r\n processor.processPath])));\r\n};\r\n\r\nexport const withCampaignLegacyContext = Component => withLegacyContext(Component, withCampaign);\r\n","\r\n/* eslint-disable */\r\n/*!\r\n * Note: While Microsoft is not the author of this file, Microsoft grants you\r\n * the right to use this file for the sole purpose of interacting with the\r\n * https://adcenter.microsoft.com/ using your web browser, subject to the terms\r\n * of Microsoft http://explore.live.com/microsoft-service-agreement?ref=none.\r\n * Microsoft reserves all other rights not expressly granted whether by implication,\r\n * estoppel or otherwise. The notices below are provided for informational purposes\r\n * only and are not the license terms under which Microsoft distributes this file.\r\n *\r\n *\r\n * jQuery Templates Plugin\r\n * http://github.com/jquery/jquery-tmpl\r\n *\r\n * Copyright Software Freedom Conservancy, Inc.\r\n * Permission is hereby granted, free of charge, to any person obtaining a copy\r\n * of this software and associated documentation files (the \"Software\"), to deal\r\n * in the Software without restriction, including without limitation the rights\r\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n * copies of the Software, and to permit persons to whom the Software is\r\n * furnished to do so, subject to the following conditions:\r\n *\r\n * The above copyright notice and this permission notice shall be included in\r\n * all copies or substantial portions of the Software.\r\n *\r\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n * THE SOFTWARE.\r\n */\r\n(function( jQuery, undefined ){\r\n\tvar oldManip = jQuery.fn.domManip, tmplItmAtt = \"_tmplitem\", htmlExpr = /^[^<]*(<[\\w\\W]+>)[^>]*$|\\{\\{\\! /,\r\n\t\tnewTmplItems = {}, wrappedItems = {}, appendToTmplItems, topTmplItem = { key: 0, data: {} }, itemKey = 0, cloneIndex = 0, stack = [];\r\n\r\n\tfunction newTmplItem( options, parentItem, fn, data ) {\r\n\t\t// Returns a template item data structure for a new rendered instance of a template (a 'template item').\r\n\t\t// The content field is a hierarchical array of strings and nested items (to be\r\n\t\t// removed and replaced by nodes field of dom elements, once inserted in DOM).\r\n\t\tvar newItem = {\r\n\t\t\tdata: data || (parentItem ? parentItem.data : {}),\r\n\t\t\t_wrap: parentItem ? parentItem._wrap : null,\r\n\t\t\ttmpl: null,\r\n\t\t\tparent: parentItem || null,\r\n\t\t\tnodes: [],\r\n\t\t\tcalls: tiCalls,\r\n\t\t\tnest: tiNest,\r\n\t\t\twrap: tiWrap,\r\n\t\t\thtml: tiHtml,\r\n\t\t\tupdate: tiUpdate\r\n\t\t};\r\n\t\tif ( options ) {\r\n\t\t\tjQuery.extend( newItem, options, { nodes: [], parent: parentItem } );\r\n\t\t}\r\n\t\tif ( fn ) {\r\n\t\t\t// Build the hierarchical content to be used during insertion into DOM\r\n\t\t\tnewItem.tmpl = fn;\r\n\t\t\tnewItem._ctnt = newItem._ctnt || newItem.tmpl( jQuery, newItem );\r\n\t\t\tnewItem.key = ++itemKey;\r\n\t\t\t// Keep track of new template item, until it is stored as jQuery Data on DOM element\r\n\t\t\t(stack.length ? wrappedItems : newTmplItems)[itemKey] = newItem;\r\n\t\t}\r\n\t\treturn newItem;\r\n\t}\r\n\r\n\t// Override appendTo etc., in order to provide support for targeting multiple elements. (This code would disappear if integrated in jquery core).\r\n\tjQuery.each({\r\n\t\tappendTo: \"append\",\r\n\t\tprependTo: \"prepend\",\r\n\t\tinsertBefore: \"before\",\r\n\t\tinsertAfter: \"after\",\r\n\t\treplaceAll: \"replaceWith\"\r\n\t}, function( name, original ) {\r\n\t\tjQuery.fn[ name ] = function( selector ) {\r\n\t\t\tvar ret = [], insert = jQuery( selector ), elems, i, l, tmplItems,\r\n\t\t\t\tparent = this.length === 1 && this[0].parentNode;\r\n\r\n\t\t\tappendToTmplItems = newTmplItems || {};\r\n\t\t\tif ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) {\r\n\t\t\t\tinsert[ original ]( this[0] );\r\n\t\t\t\tret = this;\r\n\t\t\t} else {\r\n\t\t\t\tfor ( i = 0, l = insert.length; i < l; i++ ) {\r\n\t\t\t\t\tcloneIndex = i;\r\n\t\t\t\t\telems = (i > 0 ? this.clone(true) : this).get();\r\n\t\t\t\t\tjQuery.fn[ original ].apply( jQuery(insert[i]), elems );\r\n\t\t\t\t\tret = ret.concat( elems );\r\n\t\t\t\t}\r\n\t\t\t\tcloneIndex = 0;\r\n\t\t\t\tret = this.pushStack( ret, name, insert.selector );\r\n\t\t\t}\r\n\t\t\ttmplItems = appendToTmplItems;\r\n\t\t\tappendToTmplItems = null;\r\n\t\t\tjQuery.tmpl.complete( tmplItems );\r\n\t\t\treturn ret;\r\n\t\t};\r\n\t});\r\n\r\n\tjQuery.fn.extend({\r\n\t\t// Use first wrapped element as template markup.\r\n\t\t// Return wrapped set of template items, obtained by rendering template against data.\r\n\t\ttmpl: function( data, options, parentItem ) {\r\n\t\t\treturn jQuery.tmpl( this[0], data, options, parentItem );\r\n\t\t},\r\n\r\n\t\t// Find which rendered template item the first wrapped DOM element belongs to\r\n\t\ttmplItem: function() {\r\n\t\t\treturn jQuery.tmplItem( this[0] );\r\n\t\t},\r\n\r\n\t\t// Consider the first wrapped element as a template declaration, and get the compiled template or store it as a named template.\r\n\t\ttemplate: function( name ) {\r\n\t\t\treturn jQuery.template( name, this[0] );\r\n\t\t},\r\n\r\n\t\tdomManip: function( args, table, callback, options ) {\r\n\t\t\t// This appears to be a bug in the appendTo, etc. implementation\r\n\t\t\t// it should be doing .call() instead of .apply(). See #6227\r\n\t\t\tif ( args[0] && args[0].nodeType ) {\r\n\t\t\t\tvar dmArgs = jQuery.makeArray( arguments ), argsLength = args.length, i = 0, tmplItem;\r\n\t\t\t\twhile ( i < argsLength && !(tmplItem = jQuery.data( args[i++], \"tmplItem\" ))) {}\r\n\t\t\t\tif ( argsLength > 1 ) {\r\n\t\t\t\t\tdmArgs[0] = [jQuery.makeArray( args )];\r\n\t\t\t\t}\r\n\t\t\t\tif ( tmplItem && cloneIndex ) {\r\n\t\t\t\t\tdmArgs[2] = function( fragClone ) {\r\n\t\t\t\t\t\t// Handler called by oldManip when rendered template has been inserted into DOM.\r\n\t\t\t\t\t\tjQuery.tmpl.afterManip( this, fragClone, callback );\r\n\t\t\t\t\t};\r\n\t\t\t\t}\r\n\t\t\t\toldManip.apply( this, dmArgs );\r\n\t\t\t} else {\r\n\t\t\t\toldManip.apply( this, arguments );\r\n\t\t\t}\r\n\t\t\tcloneIndex = 0;\r\n\t\t\tif ( !appendToTmplItems ) {\r\n\t\t\t\tjQuery.tmpl.complete( newTmplItems );\r\n\t\t\t}\r\n\t\t\treturn this;\r\n\t\t}\r\n\t});\r\n\r\n\tjQuery.extend({\r\n\t\t// Return wrapped set of template items, obtained by rendering template against data.\r\n\t\ttmpl: function( tmpl, data, options, parentItem ) {\r\n\t\t\tvar ret, topLevel = !parentItem;\r\n\t\t\tif ( topLevel ) {\r\n\t\t\t\t// This is a top-level tmpl call (not from a nested template using {{tmpl}})\r\n\t\t\t\tparentItem = topTmplItem;\r\n\t\t\t\ttmpl = jQuery.template[tmpl] || jQuery.template( null, tmpl );\r\n\t\t\t\twrappedItems = {}; // Any wrapped items will be rebuilt, since this is top level\r\n\t\t\t} else if ( !tmpl ) {\r\n\t\t\t\t// The template item is already associated with DOM - this is a refresh.\r\n\t\t\t\t// Re-evaluate rendered template for the parentItem\r\n\t\t\t\ttmpl = parentItem.tmpl;\r\n\t\t\t\tnewTmplItems[parentItem.key] = parentItem;\r\n\t\t\t\tparentItem.nodes = [];\r\n\t\t\t\tif ( parentItem.wrapped ) {\r\n\t\t\t\t\tupdateWrapped( parentItem, parentItem.wrapped );\r\n\t\t\t\t}\r\n\t\t\t\t// Rebuild, without creating a new template item\r\n\t\t\t\treturn jQuery( build( parentItem, null, parentItem.tmpl( jQuery, parentItem ) ));\r\n\t\t\t}\r\n\t\t\tif ( !tmpl ) {\r\n\t\t\t\treturn []; // Could throw...\r\n\t\t\t}\r\n\t\t\tif ( typeof data === \"function\" ) {\r\n\t\t\t\tdata = data.call( parentItem || {} );\r\n\t\t\t}\r\n\t\t\tif ( options && options.wrapped ) {\r\n\t\t\t\tupdateWrapped( options, options.wrapped );\r\n\t\t\t}\r\n\t\t\tret = jQuery.isArray( data ) ? \r\n\t\t\t\tjQuery.map( data, function( dataItem ) {\r\n\t\t\t\t\treturn dataItem ? newTmplItem( options, parentItem, tmpl, dataItem ) : null;\r\n\t\t\t\t}) :\r\n\t\t\t\t[ newTmplItem( options, parentItem, tmpl, data ) ];\r\n\t\t\treturn topLevel ? jQuery( build( parentItem, null, ret ) ) : ret;\r\n\t\t},\r\n\r\n\t\t// Return rendered template item for an element.\r\n\t\ttmplItem: function( elem ) {\r\n\t\t\tvar tmplItem;\r\n\t\t\tif ( elem instanceof jQuery ) {\r\n\t\t\t\telem = elem[0];\r\n\t\t\t}\r\n\t\t\twhile ( elem && elem.nodeType === 1 && !(tmplItem = jQuery.data( elem, \"tmplItem\" )) && (elem = elem.parentNode) ) {}\r\n\t\t\treturn tmplItem || topTmplItem;\r\n\t\t},\r\n\r\n\t\t// Set:\r\n\t\t// Use $.template( name, tmpl ) to cache a named template,\r\n\t\t// where tmpl is a template string, a script element or a jQuery instance wrapping a script element, etc.\r\n\t\t// Use $( \"selector\" ).template( name ) to provide access by name to a script block template declaration.\r\n\r\n\t\t// Get:\r\n\t\t// Use $.template( name ) to access a cached template.\r\n\t\t// Also $( selectorToScriptBlock ).template(), or $.template( null, templateString )\r\n\t\t// will return the compiled template, without adding a name reference.\r\n\t\t// If templateString includes at least one HTML tag, $.template( templateString ) is equivalent\r\n\t\t// to $.template( null, templateString )\r\n\t\ttemplate: function( name, tmpl ) {\r\n\t\t\tif (tmpl) {\r\n\t\t\t\t// Compile template and associate with name\r\n\t\t\t\tif ( typeof tmpl === \"string\" ) {\r\n\t\t\t\t\t// This is an HTML string being passed directly in.\r\n\t\t\t\t\ttmpl = buildTmplFn( tmpl )\r\n\t\t\t\t} else if ( tmpl instanceof jQuery ) {\r\n\t\t\t\t\ttmpl = tmpl[0] || {};\r\n\t\t\t\t}\r\n\t\t\t\tif ( tmpl.nodeType ) {\r\n\t\t\t\t\t// If this is a template block, use cached copy, or generate tmpl function and cache.\r\n\t\t\t\t\ttmpl = jQuery.data( tmpl, \"tmpl\" ) || jQuery.data( tmpl, \"tmpl\", buildTmplFn( tmpl.innerHTML ));\r\n\t\t\t\t}\r\n\t\t\t\treturn typeof name === \"string\" ? (jQuery.template[name] = tmpl) : tmpl;\r\n\t\t\t}\r\n\t\t\t// Return named compiled template\r\n\t\t\treturn name ? (typeof name !== \"string\" ? jQuery.template( null, name ): \r\n\t\t\t\t(jQuery.template[name] || \r\n\t\t\t\t\t// If not in map, treat as a selector. (If integrated with core, use quickExpr.exec) \r\n\t\t\t\t\tjQuery.template( null, htmlExpr.test( name ) ? name : jQuery( name )))) : null; \r\n\t\t},\r\n\r\n\t\tencode: function( text ) {\r\n\t\t\t// Do HTML encoding replacing < > & and ' and \" by corresponding entities.\r\n\t\t\treturn (\"\" + text).split(\"<\").join(\"<\").split(\">\").join(\">\").split('\"').join(\""\").split(\"'\").join(\"'\");\r\n\t\t}\r\n\t});\r\n\r\n\tjQuery.extend( jQuery.tmpl, {\r\n\t\ttag: {\r\n\t\t\t\"tmpl\": {\r\n\t\t\t\t_default: { $2: \"null\" },\r\n\t\t\t\topen: \"if($notnull_1){_=_.concat($item.nest($1,$2));}\"\r\n\t\t\t\t// tmpl target parameter can be of type function, so use $1, not $1a (so not auto detection of functions)\r\n\t\t\t\t// This means that {{tmpl foo}} treats foo as a template (which IS a function). \r\n\t\t\t\t// Explicit parens can be used if foo is a function that returns a template: {{tmpl foo()}}.\r\n\t\t\t},\r\n\t\t\t\"wrap\": {\r\n\t\t\t\t_default: { $2: \"null\" },\r\n\t\t\t\topen: \"$item.calls(_,$1,$2);_=[];\",\r\n\t\t\t\tclose: \"call=$item.calls();_=call._.concat($item.wrap(call,_));\"\r\n\t\t\t},\r\n\t\t\t\"each\": {\r\n\t\t\t\t_default: { $2: \"$index, $value\" },\r\n\t\t\t\topen: \"if($notnull_1){$.each($1a,function($2){with(this){\",\r\n\t\t\t\tclose: \"}});}\"\r\n\t\t\t},\r\n\t\t\t\"if\": {\r\n\t\t\t\topen: \"if(($notnull_1) && $1a){\",\r\n\t\t\t\tclose: \"}\"\r\n\t\t\t},\r\n\t\t\t\"else\": {\r\n\t\t\t\t_default: { $1: \"true\" },\r\n\t\t\t\topen: \"}else if(($notnull_1) && $1a){\"\r\n\t\t\t},\r\n\t\t\t\"html\": {\r\n\t\t\t\t// Unecoded expression evaluation. \r\n\t\t\t\topen: \"if($notnull_1){_.push($1a);}\"\r\n\t\t\t},\r\n\t\t\t\"=\": {\r\n\t\t\t\t// Encoded expression evaluation. Abbreviated form is ${}.\r\n\t\t\t\t_default: { $1: \"$data\" },\r\n\t\t\t\topen: \"if($notnull_1){_.push($.encode($1a));}\"\r\n\t\t\t},\r\n\t\t\t\"!\": {\r\n\t\t\t\t// Comment tag. Skipped by parser\r\n\t\t\t\topen: \"\"\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\t// This stub can be overridden, e.g. in jquery.tmplPlus for providing rendered events\r\n\t\tcomplete: function( items ) {\r\n\t\t\tnewTmplItems = {};\r\n\t\t},\r\n\r\n\t\t// Call this from code which overrides domManip, or equivalent\r\n\t\t// Manage cloning/storing template items etc.\r\n\t\tafterManip: function afterManip( elem, fragClone, callback ) {\r\n\t\t\t// Provides cloned fragment ready for fixup prior to and after insertion into DOM\r\n\t\t\tvar content = fragClone.nodeType === 11 ?\r\n\t\t\t\tjQuery.makeArray(fragClone.childNodes) :\r\n\t\t\t\tfragClone.nodeType === 1 ? [fragClone] : [];\r\n\r\n\t\t\t// Return fragment to original caller (e.g. append) for DOM insertion\r\n\t\t\tcallback.call( elem, fragClone );\r\n\r\n\t\t\t// Fragment has been inserted:- Add inserted nodes to tmplItem data structure. Replace inserted element annotations by jQuery.data.\r\n\t\t\tstoreTmplItems( content );\r\n\t\t\tcloneIndex++;\r\n\t\t}\r\n\t});\r\n\r\n\t//========================== Private helper functions, used by code above ==========================\r\n\r\n\tfunction build( tmplItem, nested, content ) {\r\n\t\t// Convert hierarchical content into flat string array \r\n\t\t// and finally return array of fragments ready for DOM insertion\r\n\t\tvar frag, ret = content ? jQuery.map( content, function( item ) {\r\n\t\t\treturn (typeof item === \"string\") ? \r\n\t\t\t\t// Insert template item annotations, to be converted to jQuery.data( \"tmplItem\" ) when elems are inserted into DOM.\r\n\t\t\t\t(tmplItem.key ? item.replace( /(<\\w+)(?=[\\s>])(?![^>]*_tmplitem)([^>]*)/g, \"$1 \" + tmplItmAtt + \"=\\\"\" + tmplItem.key + \"\\\" $2\" ) : item) :\r\n\t\t\t\t// This is a child template item. Build nested template.\r\n\t\t\t\tbuild( item, tmplItem, item._ctnt );\r\n\t\t}) : \r\n\t\t// If content is not defined, insert tmplItem directly. Not a template item. May be a string, or a string array, e.g. from {{html $item.html()}}. \r\n\t\ttmplItem;\r\n\t\tif ( nested ) {\r\n\t\t\treturn ret;\r\n\t\t}\r\n\r\n\t\t// top-level template\r\n\t\tret = ret.join(\"\");\r\n\r\n\t\t// Support templates which have initial or final text nodes, or consist only of text\r\n\t\t// Also support HTML entities within the HTML markup.\r\n\t\tret.replace( /^\\s*([^<\\s][^<]*)?(<[\\w\\W]+>)([^>]*[^>\\s])?\\s*$/, function( all, before, middle, after) {\r\n\t\t\tfrag = jQuery( middle ).get();\r\n\r\n\t\t\tstoreTmplItems( frag );\r\n\t\t\tif ( before ) {\r\n\t\t\t\tfrag = unencode( before ).concat(frag);\r\n\t\t\t}\r\n\t\t\tif ( after ) {\r\n\t\t\t\tfrag = frag.concat(unencode( after ));\r\n\t\t\t}\r\n\t\t});\r\n\t\treturn frag ? frag : unencode( ret );\r\n\t}\r\n\r\n\tfunction unencode( text ) {\r\n\t\t// Use createElement, since createTextNode will not render HTML entities correctly\r\n\t\tvar el = document.createElement( \"div\" );\r\n\t\tel.innerHTML = text;\r\n\t\treturn jQuery.makeArray(el.childNodes);\r\n\t}\r\n\r\n\t// Generate a reusable function that will serve to render a template against data\r\n\tfunction buildTmplFn( markup ) {\r\n\t\treturn new Function(\"jQuery\",\"$item\",\r\n\t\t\t\"var $=jQuery,call,_=[],$data=$item.data;\" +\r\n\r\n\t\t\t// Introduce the data as local variables using with(){}\r\n\t\t\t\"with($data){_.push('\" +\r\n\r\n\t\t\t// Convert the template into pure JavaScript\r\n\t\t\tjQuery.trim(markup)\r\n\t\t\t\t.replace( /([\\\\'])/g, \"\\\\$1\" )\r\n\t\t\t\t.replace( /[\\r\\t\\n]/g, \" \" )\r\n\t\t\t\t.replace( /\\$\\{([^\\}]*)\\}/g, \"{{= $1}}\" )\r\n\t\t\t\t.replace( /\\{\\{(\\/?)(\\w+|.)(?:\\(((?:[^\\}]|\\}(?!\\}))*?)?\\))?(?:\\s+(.*?)?)?(\\(((?:[^\\}]|\\}(?!\\}))*?)\\))?\\s*\\}\\}/g,\r\n\t\t\t\tfunction( all, slash, type, fnargs, target, parens, args ) {\r\n\t\t\t\t\tvar tag = jQuery.tmpl.tag[ type ], def, expr, exprAutoFnDetect;\r\n\t\t\t\t\tif ( !tag ) {\r\n\t\t\t\t\t\tthrow \"Template command not found: \" + type;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdef = tag._default || [];\r\n\t\t\t\t\tif ( parens && !/\\w$/.test(target)) {\r\n\t\t\t\t\t\ttarget += parens;\r\n\t\t\t\t\t\tparens = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ( target ) {\r\n\t\t\t\t\t\ttarget = unescape( target ); \r\n\t\t\t\t\t\targs = args ? (\",\" + unescape( args ) + \")\") : (parens ? \")\" : \"\");\r\n\t\t\t\t\t\t// Support for target being things like a.toLowerCase();\r\n\t\t\t\t\t\t// In that case don't call with template item as 'this' pointer. Just evaluate...\r\n\t\t\t\t\t\texpr = parens ? (target.indexOf(\".\") > -1 ? target + parens : (\"(\" + target + \").call($item\" + args)) : target;\r\n\t\t\t\t\t\texprAutoFnDetect = parens ? expr : \"(typeof(\" + target + \")==='function'?(\" + target + \").call($item):(\" + target + \"))\";\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\texprAutoFnDetect = expr = def.$1 || \"null\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfnargs = unescape( fnargs );\r\n\t\t\t\t\treturn \"');\" + \r\n\t\t\t\t\t\ttag[ slash ? \"close\" : \"open\" ]\r\n\t\t\t\t\t\t\t.split( \"$notnull_1\" ).join( target ? \"typeof(\" + target + \")!=='undefined' && (\" + target + \")!=null\" : \"true\" )\r\n\t\t\t\t\t\t\t.split( \"$1a\" ).join( exprAutoFnDetect )\r\n\t\t\t\t\t\t\t.split( \"$1\" ).join( expr )\r\n\t\t\t\t\t\t\t.split( \"$2\" ).join( fnargs ?\r\n\t\t\t\t\t\t\t\tfnargs.replace( /\\s*([^\\(]+)\\s*(\\((.*?)\\))?/g, function( all, name, parens, params ) {\r\n\t\t\t\t\t\t\t\t\tparams = params ? (\",\" + params + \")\") : (parens ? \")\" : \"\");\r\n\t\t\t\t\t\t\t\t\treturn params ? (\"(\" + name + \").call($item\" + params) : all;\r\n\t\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t\t\t: (def.$2||\"\")\r\n\t\t\t\t\t\t\t) +\r\n\t\t\t\t\t\t\"_.push('\";\r\n\t\t\t\t}) +\r\n\t\t\t\"');}return _;\"\r\n\t\t);\r\n\t}\r\n\tfunction updateWrapped( options, wrapped ) {\r\n\t\t// Build the wrapped content. \r\n\t\toptions._wrap = build( options, true, \r\n\t\t\t// Suport imperative scenario in which options.wrapped can be set to a selector or an HTML string.\r\n\t\t\tjQuery.isArray( wrapped ) ? wrapped : [htmlExpr.test( wrapped ) ? wrapped : jQuery( wrapped ).html()]\r\n\t\t).join(\"\");\r\n\t}\r\n\r\n\tfunction unescape( args ) {\r\n\t\treturn args ? args.replace( /\\\\'/g, \"'\").replace(/\\\\\\\\/g, \"\\\\\" ) : null;\r\n\t}\r\n\tfunction outerHtml( elem ) {\r\n\t\tvar div = document.createElement(\"div\");\r\n\t\tdiv.appendChild( elem.cloneNode(true) );\r\n\t\treturn div.innerHTML;\r\n\t}\r\n\r\n\t// Store template items in jQuery.data(), ensuring a unique tmplItem data data structure for each rendered template instance.\r\n\tfunction storeTmplItems( content ) {\r\n\t\tvar keySuffix = \"_\" + cloneIndex, elem, elems, newClonedItems = {}, i, l, m;\r\n\t\tfor ( i = 0, l = content.length; i < l; i++ ) {\r\n\t\t\tif ( (elem = content[i]).nodeType !== 1 ) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\telems = elem.getElementsByTagName(\"*\");\r\n\t\t\tfor ( m = elems.length - 1; m >= 0; m-- ) {\r\n\t\t\t\tprocessItemKey( elems[m] );\r\n\t\t\t}\r\n\t\t\tprocessItemKey( elem );\r\n\t\t}\r\n\t\tfunction processItemKey( el ) {\r\n\t\t\tvar pntKey, pntNode = el, pntItem, tmplItem, key;\r\n\t\t\t// Ensure that each rendered template inserted into the DOM has its own template item,\r\n\t\t\tif ( (key = el.getAttribute( tmplItmAtt ))) {\r\n\t\t\t\twhile ( pntNode.parentNode && (pntNode = pntNode.parentNode).nodeType === 1 && !(pntKey = pntNode.getAttribute( tmplItmAtt ))) { }\r\n\t\t\t\tif ( pntKey !== key ) {\r\n\t\t\t\t\t// The next ancestor with a _tmplitem expando is on a different key than this one.\r\n\t\t\t\t\t// So this is a top-level element within this template item\r\n\t\t\t\t\t// Set pntNode to the key of the parentNode, or to 0 if pntNode.parentNode is null, or pntNode is a fragment.\r\n\t\t\t\t\tpntNode = pntNode.parentNode ? (pntNode.nodeType === 11 ? 0 : (pntNode.getAttribute( tmplItmAtt ) || 0)) : 0;\r\n\t\t\t\t\tif ( !(tmplItem = newTmplItems[key]) ) {\r\n\t\t\t\t\t\t// The item is for wrapped content, and was copied from the temporary parent wrappedItem.\r\n\t\t\t\t\t\ttmplItem = wrappedItems[key];\r\n\t\t\t\t\t\ttmplItem = newTmplItem( tmplItem, newTmplItems[pntNode]||wrappedItems[pntNode], null, true );\r\n\t\t\t\t\t\ttmplItem.key = ++itemKey;\r\n\t\t\t\t\t\tnewTmplItems[itemKey] = tmplItem;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ( cloneIndex ) {\r\n\t\t\t\t\t\tcloneTmplItem( key );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tel.removeAttribute( tmplItmAtt );\r\n\t\t\t} else if ( cloneIndex && (tmplItem = jQuery.data( el, \"tmplItem\" )) ) {\r\n\t\t\t\t// This was a rendered element, cloned during append or appendTo etc.\r\n\t\t\t\t// TmplItem stored in jQuery data has already been cloned in cloneCopyEvent. We must replace it with a fresh cloned tmplItem.\r\n\t\t\t\tcloneTmplItem( tmplItem.key );\r\n\t\t\t\tnewTmplItems[tmplItem.key] = tmplItem;\r\n\t\t\t\tpntNode = jQuery.data( el.parentNode, \"tmplItem\" );\r\n\t\t\t\tpntNode = pntNode ? pntNode.key : 0;\r\n\t\t\t}\r\n\t\t\tif ( tmplItem ) {\r\n\t\t\t\tpntItem = tmplItem;\r\n\t\t\t\t// Find the template item of the parent element. \r\n\t\t\t\t// (Using !=, not !==, since pntItem.key is number, and pntNode may be a string)\r\n\t\t\t\twhile ( pntItem && pntItem.key != pntNode ) { \r\n\t\t\t\t\t// Add this element as a top-level node for this rendered template item, as well as for any\r\n\t\t\t\t\t// ancestor items between this item and the item of its parent element\r\n\t\t\t\t\tpntItem.nodes.push( el );\r\n\t\t\t\t\tpntItem = pntItem.parent;\r\n\t\t\t\t}\r\n\t\t\t\t// Delete content built during rendering - reduce API surface area and memory use, and avoid exposing of stale data after rendering...\r\n\t\t\t\tdelete tmplItem._ctnt;\r\n\t\t\t\tdelete tmplItem._wrap;\r\n\t\t\t\t// Store template item as jQuery data on the element\r\n\t\t\t\tjQuery.data( el, \"tmplItem\", tmplItem );\r\n\t\t\t}\r\n\t\t\tfunction cloneTmplItem( key ) {\r\n\t\t\t\tkey = key + keySuffix;\r\n\t\t\t\ttmplItem = newClonedItems[key] = \r\n\t\t\t\t\t(newClonedItems[key] || newTmplItem( tmplItem, newTmplItems[tmplItem.parent.key + keySuffix] || tmplItem.parent, null, true ));\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//---- Helper functions for template item ----\r\n\r\n\tfunction tiCalls( content, tmpl, data, options ) {\r\n\t\tif ( !content ) {\r\n\t\t\treturn stack.pop();\r\n\t\t}\r\n\t\tstack.push({ _: content, tmpl: tmpl, item:this, data: data, options: options });\r\n\t}\r\n\r\n\tfunction tiNest( tmpl, data, options ) {\r\n\t\t// nested template, using {{tmpl}} tag\r\n\t\treturn jQuery.tmpl( jQuery.template( tmpl ), data, options, this );\r\n\t}\r\n\r\n\tfunction tiWrap( call, wrapped ) {\r\n\t\t// nested template, using {{wrap}} tag\r\n\t\tvar options = call.options || {};\r\n\t\toptions.wrapped = wrapped;\r\n\t\t// Apply the template, which may incorporate wrapped content, \r\n\t\treturn jQuery.tmpl( jQuery.template( call.tmpl ), call.data, options, call.item );\r\n\t}\r\n\r\n\tfunction tiHtml( filter, textOnly ) {\r\n\t\tvar wrapped = this._wrap;\r\n\t\treturn jQuery.map(\r\n\t\t\tjQuery( jQuery.isArray( wrapped ) ? wrapped.join(\"\") : wrapped ).filter( filter || \"*\" ),\r\n\t\t\tfunction(e) {\r\n\t\t\t\treturn textOnly ?\r\n\t\t\t\t\te.innerText || e.textContent :\r\n\t\t\t\t\te.outerHTML || outerHtml(e);\r\n\t\t\t});\r\n\t}\r\n\r\n\tfunction tiUpdate() {\r\n\t\tvar coll = this.nodes;\r\n\t\tjQuery.tmpl( null, null, null, this).insertBefore( coll[0] );\r\n\t\tjQuery( coll ).remove();\r\n\t}\r\n})( jQuery );\r\n","/* eslint-disable */\r\nwindow.__publicpath__ = window.serverContext && window.serverContext.PublicPath ?\r\n window.serverContext.PublicPath : window.location.origin + '/campaign/vnext/';\r\n__webpack_public_path__ = window.__publicpath__;"],"names":["window","globalLegacySchema","get","schemaName","schemaVnext","config","componentConfigImport","serverContext","CurrentAccount","CurrentCustomer","CurrentUser","Culture","CurrentLocale","initializeUiNextLegacyI18n","set","checkQueryParams","query","queryString","location","search","skipcccache","history","replaceState","document","title","concat","pathname","sort","hash","isSDK","KEYS","$","bindFirst","name","fn","this","on","each","handlers","split","handler","pop","splice","dropdownMenuKeydownHandler","e","$this","hasClass","acceptableKeysReg","RegExp","$parent","selector","attr","test","replace","length","parent","getParent","which","target","tagName","preventDefault","stopPropagation","is","isActive","find","trigger","$items","index","getAttribute","click","currentItem","eq","itemClass","_","clickableKeydownHandler","triggerKey","keyCode","afterKeydownFocusHandler","focus","addRoleButtonHandler","setAttribute","buttonFocusHandler","$helpPopup","helpButtonKeydownHandler","addRolePresentationForPaginationRow","$footerRows","element","$pagers","patchLegacyLabelSelectorCheckbox","$siblings","siblings","uniqueId","p8","s","p","Math","random","toString","substr","createGuid","ariaChecked","findClosestMenuItemsOnSameLevel","$item","menuitemLocator","arguments","undefined","closest","not","menuMoveUp","$menuItems","menuIndex","$newItem","menuMoveDown","menuNum","moveToContainer","$currentSubMenu","$parentMenuItem","prev","menuItemKeydownHandler","currentTarget","muiltiLevelMenuItemKeydownHandler","$subMenu","nextAll","$activeItem","css","showSubMenu","handled","removeClass","$triggerButton","closeMenu","kendoListKeydownHandler","el","$el","$selectedItem","kendoListSetTabIndex","menuToggleKeyup","altKey","ctrlKey","$menu","next","$menuitems","handleFocusTrapping","$activeElement","activeElement","items","$root","$firstElement","$lastElement","lowestTabindex","highestTabindex","tabindex","$focusElements","filter","firstElement","lastElement","getFocusItemsAtBothEnds","shiftKey","handleFocusTrappingDatepicker","focusedItemIdx","findIndex","item","addClass","needToFocusItem","_slicedToArray","kendoDialogKeydown","getKendoDatepickerKeys","kendoDatePickerKeydown","$datePickerInput","datePicker","data","off","innerEvent","stopImmediatePropagation","close","kendoDatePickerCalendarKeydown","datePickerInputsSelector","_findDatePickerAndInp","$calendar","$matchedPickerInputs","idx","dp","dateView","calendar","findDatePickerAndInputFromCalendarDOMEvent","_findDatePickerAndInp2","tablistKeydown","$tabs","$selectedTab","moveFocusTo","$to","$from","clickRowAndFocus","$row","$treeGrid","$treeItem","dataKey","defer","exists","focusRowByDataKey","treeGridKeydown","level","$childRow","$prevRow","$nextRow","treeGridFocus","relatedTarget","$activeRow","first","removeAllButtonOnLocationGridFocus","$firstCell","overviewPageMenuToggleKeyUp","parents","overviewPageMenuItemKeyDown","$openParent","$toggleButton","scriptsQuickFiterFocusHandler","$dropdownToggle","$dropdownMenu","$link","jQuery","jQueryVersionParts","jquery","oldInit","init","arg1","ret","apply","Array","prototype","slice","call","context","oldPosition","position","elem","offsetParent","customized","nodeName","documentElement","parentOffset","offset","top","left","currentOffset","old","factory","UA","navigator","userAgent","isEdge","SmartBanner","options","origHtmlMargin","parseFloat","extend","smartbanner","defaults","standalone","force","type","match","iOSUniversalApp","localStorage","getItem","getCookie","scale","width","screen","meta","appId","parsedMetaContent","exec","text","author","hostname","iconUrl","price","onInstall","onClose","onShow","create","show","listen","constructor","iconURL","link","url","appStoreLanguage","gloss","iconGloss","GooglePlayParams","banner","description","button","layer","appendToSelector","append","prepend","icon","bannerHeight","outerHeight","hide","proxy","install","contentSelector","adjustOuterContent","callback","stop","animate","display","speedIn","pushSelector","paddingTop","support","transition","one","end","emulateTransitionEnd","slideDown","resize","adjustButton","scroll","speedOut","slideUp","setItem","hideOnInstall","setCookie","daysReminder","value","exdays","exdate","Date","setDate","getDate","encodeURI","toUTCString","cookie","i","x","y","ARRcookies","indexOf","decodeURI","innerWidth","right","scrollX","srcElement","switchType","that","detach","option","$window","daysHidden","Constructor","duration","called","setTimeout","createElement","transEndEventNames","WebkitTransition","MozTransition","OTransition","style","transitionEnd","cleanData","_cleanData","elems","triggerHandler","_remove","remove","keepData","add","widget","base","fullName","namespace","Widget","expr","_createWidget","basePrototype","widgetName","widgetEventPrefix","widgetBaseClass","bridge","object","isMethodCall","args","returnValue","charAt","instance","methodValue","isFunction","_init","disabled","_getCreateOptions","self","bind","destroy","_create","_trigger","metadata","unbind","removeData","removeAttr","key","_setOptions","_setOption","enable","disable","event","prop","orig","Event","toLowerCase","originalEvent","isDefaultPrevented","validate","validator","settings","onsubmit","submitHandler","submitButton","cancelSubmit","handle","hidden","result","val","appendTo","currentForm","debug","form","pendingRequest","formSubmitted","focusInvalid","console","warn","valid","errorList","rules","command","argument","staticRules","existingRules","param","filtered","normalizeRule","messages","method","normalizeRules","classRules","attributeRules","dataRules","required","remote","pseudos","blank","a","trim","filled","unchecked","format","source","params","makeArray","unshift","n","groups","errorClass","pendingClass","validClass","errorElement","focusCleanup","errorContainer","errorLabelContainer","ignore","ignoreTitle","onfocusin","lastActive","unhighlight","hideThese","errorsFor","onfocusout","checkable","submitted","optional","onkeyup","elementValue","inArray","invalid","onclick","parentNode","highlight","findByName","setDefaults","email","date","dateISO","number","digits","equalTo","maxlength","minlength","rangelength","range","max","min","step","autoCreateRanges","labelContainer","errorContext","containers","valueCache","pending","reset","delegate","hasAttribute","eventType","invalidHandler","checkForm","errorMap","showErrors","prepareForm","elements","currentElements","check","rs","group","cleanElement","clean","checkElement","validationTargetFor","v","prepareElement","testgroup","push","numberOfInvalids","toHide","errors","map","message","successList","grep","defaultShowErrors","resetForm","hideErrors","resetElements","objectLength","obj","count","addWrapper","size","findLastActive","rulesCache","error","join","resetInternals","toShow","$element","validity","badInput","lastIndexOf","rule","rulesCount","dependencyMismatch","normalizer","TypeError","parameters","methods","formatAndAdd","log","id","customDataMessage","toUpperCase","substring","customMessage","m","String","findDefined","defaultMessage","theregex","toToggle","wrapper","showLabel","success","validElements","invalidElements","place","errorID","elementID","idOrName","describedBy","html","wrap","errorPlacement","insertAfter","escapeCssMeta","describer","string","getLength","depend","dependTypes","startRequest","stopRequest","submit","previousValue","classRuleSettings","creditcard","addClassRules","className","classes","normalizeAttributeRule","Number","isNaN","depends","keepRule","parameter","parts","isArray","transformed","addMethod","decimals","errorMessage","re","decimalPlaces","num","toInt","round","pow","Error","optionDataString","previous","originalMessage","ajax","mode","port","dataType","response","pendingRequests","ajaxPrefilter","xhr","abort","ajaxSettings","_menuContainer","_isRtl","_global","numberOfInstances","menuTemplateId","menuTemplate","menuData","menuHtml","flyoutBeforeShow","topFn","shouldShowFlyout","_staticConstructor","_onElementClick","_staticDestructor","_onBodyClick","menuBlock","hideAll","tmpl","elementWrapper","height","currentElement","_isDescendant","child","loadingPanelTimeoutID","loadingPanel","_i","loadingText","loadingPanelShowRequested","blocker","beforeAjax","clearErrorSummary","showLoadingPanel","ajaxError","hideLoadingPanel","appendErrorSummary","ajaxComplete","textStatus","hideImage","blockedElement","timeout","clearTimeout","alertIds","showUnique","App","views","alertCenter","showError","dismiss","strErrors","Message","ajaxPost","safetyNetAjaxAction","ajaxGet","getUrlParameter","state","legacy_get","href","decodeURIComponent","generateRequestGuid","S4","floor","d","getTime","S12","cName","cValue","expires","path","domain","secure","escape","toGMTString","unescape","setRequestId","isNotAjax","setUrlParameter","usegenReqId","genReqId","requestId","keepSqBrackets","setQueryStringParam","replaceOnly","regex","qs","pound","currentCustomerId","currentUserId","requiredParams","requiredParamSafetyNet","parameterName","requestOptions","getValue","requestParamValue","parameterExists","existingUrlParamVal","paramValue","safetyNetData","aid","currentAccount","cid","warnings","ajaxAction","getAccountContextQueryString","requestKeyPref","ajaxRequests","verificationToken","contentType","JSON","parse","__RequestVerificationToken","encodeURIComponent","addOption","addRequestToken","cotentType","onsuccessEventData","hideLoadingPanelOnSuccess","hideLoadingPanelOnError","ignoreBeforeAjax","traditional","cache","skipCache","requestKey","xhrFields","beforeSend","autoPageReloader","shouldAutoReloadPage","handleAjaxAuthFailure","Errors","onJsonError","onSuccess","errorThrown","onAjaxError","status","complete","onAjaxComplete","sessionValidatorAvailable","then","legacyModule","default","sessionValidator","validateSession","fileCacheHandlerAvailable","fileCacheHandler","handleData","getHandle","addToRequest","responseHandler","originalSuccess","addFileCacheHandler","dataContextManager","segmentPostFix","dataFormKeys","segmentKey","keys","segmentValue","getContext","stateDateRange","osd","ui","Controls","DateRangeFilter","getDateRange","BiDateRange","lcid","pageContext","Locale","userLcid","RangeId","grain","RangeStartDate","formatedStart","RangeEndDate","formatedEnd","Rangelcid","addBIDateRange","hasOwnProperty","addGridDataContext","request","stringify","dataServiceAvailable","dataService","communicate","sendRequest","instrument","logMessage","addGridDataContextAndReturnRequest","dataToBeAdded","contextParams","targetPanel","blockPanel","imgPanel","coveredElement","coveredBound","resizeCheckInterval","getElementBound","parseInt","setSize","w","wHeight","msie","innerHeight","wWidth","scrollLeft","scrollTop","clearInterval","setInterval","bound1","bound2","newBound","zIndex","updateText","imgPanelHtml","getBlockerHtml","body","fixedPosition","positionStyle","hideLayer","targetLayerId","targetId","ids","checkForIds","additionalIds","json","isJSON","redirect","redirectUrl","custId","endUrl","userId","entitySeparator","showEntityErrors","fieldId","errorPanelId","InvalidEntities","entities","ValidEntities","EntityErrors","template","empty","Cache","ResetImage","pagePrev","elementPrefix","shouldShow","curPageEl","curVal","prevVal","toggle","toggleClass","pageNext","nextVal","Callback","eventArgs","container","errorData","parseJSON","clickEvent","callBack","containerID","showLoading","arrow","jarrow","outerWidth","Countdown","timer","seconds","updateStatus","onUpdateStatus","counterEnd","onCounterEnd","decrementCounter","start","constants","waterfallFilterStorage","PageContext","componentStateImport","redirectToLogin","overrideLegacyJQueryFromWebpack","_ref","uid","campaignId","adGroupId","originalGetUrlParameter","requestUrl","AntiForgeryError","second","reload","beforeTabAjax","initializeKendo","kendo","DecimalFormatter","dtFormat","CultureDateTimeFormat","am","AMDesignator","pm","PMDesignator","groupChar","decimalChar","groupSize","numberOfDigits","currency","AccountCurrencyCode","cultures","CultureName","numberFormat","pattern","percent","symbol","calendars","standard","days","names","CultureDayNames","namesAbbr","CultureDayNamesShort","namesShort","CultureDayNamesMin","months","CultureMonthNames","CultureMonthNamesShort","AM","PM","patterns","ShortDatePattern","D","LongDatePattern","F","FullDateTimePattern","g","ShortTimePattern","G","LongTimePattern","MonthDayPattern","M","SortableDateTimePattern","t","T","u","UniversalSortableDateTimePattern","YearMonthPattern","Y","firstDay","CultureFirstDay","culture","initializeOSD","subscribers","subscribe","unsubscribe","unsubscribeAll","publish","copy","err","shimLegacyAccessibility","ajaxsetupWebpack","ajaxsetupImport","BingBaseUrl","MaxSelectedImagesPerAccountDefault","MaxSelectedImagesPerAdGroupOrCampaignForV2","MaxSelectedImagesPerAdGroupOrCampaign","dateFilterFromWebpack","dateFilterImport","prefetchResources","prefetchResourcesImport","WaterfallFilterStorage","filterStroage","WaterfallFilterType","waterfallDateFilterProcessor","JSData","Promise","BluebirdPromise","Backbone","__requirejs_packages_temp_global__","initPrefetch","Permissions","newUIResources","serviceWorkerPreFetchUrls","r","initLegacyComponents","_ref2","_ref2$scope","scope","permissions","preferenceService","curTheme","_scope$values","values","_serverContext$UserPr","UserPreferences","AccountLevelPreferences","UserLevelPreferences","CurrentAccountInActive","Token","_serverContext$Servic","ServicesEndpoints","CampaignAPI","AdInsightAPI","MmcAPI","KeywordBidRange","KeywordCPVBidRange","KeywordCPMBidRange","ProductGroupBidRange","VideoViewsCPVBidRange","VideoViewsCPMBidRange","RecommendCPCBid","WindowsStoreAdsBidRange","ClientCenterBaseUrl","Urls","PublicPath","WelcomeStatus","UtcOffsetHours","IsAADUser","Id","TemplatesPathUrl","imagePath","AudienceSettings","RemarketingPolicyLink","BulkAssociationMaxLimit","BulkAudienceCriterionMaxLimit","AdvertiserCustomerID","CurrencyCode","TimeZone","BudgetRange","getBudgetRangeOld","isLegal","PageReady","afterPageReady","limitValue","getLimitValueById","perCampaign","perAdGroup","perAccount","getLimitValue","MaxSelectedImagesPerCampaign","MaxSelectedImagesPerAdGroup","MaxSelectedImagesPerAccount","featureConfig","Feature","AdExtension","_objectSpread","loadSystemLimit","IsNewUI","AppExtensionIconBaseUrl","theme","themes","advertisercustomer_id","customer_id","user_id","account_id","campaign_id","adgroup_id","Object","assign","ClientInstrumentation","isEnabled","BingAdsWebApiUri","BingAdsAdInsightWebApiUri","DayNames","AbbreviatedDayNames","ShortestDayNames","MonthNames","AbbreviatedMonthNames","FirstDayOfWeek","GMBTaskItemType","BingPlacesTaskItemType","CCBaseUrl","CultureLcid","LocaleID","AccountsOverviewPrefetchQuery","sessionId","Omniture","SessionId","odataPath","isLocal","BingAdsMmcWebApiUri","KeywordPercentCpcBidRange","CeilingValue","FloorValue","KeywordCommissionRateRange","AccountTimeZone","audienceSettings","percentSymbol","percentGroupSize","percentGroupSeparator","percentPositivePattern","percentDecimalDigits","percentDecimalSeparator","once","router_new","route","getContextQueryUrlParams","dateFilter","getFilterPromise","dateRange","dateRangeLegacy","compared","setAtUserLevel","Name","Data","initDateFilter","attributes","$daterange","defineProperty","getFilters","DateFilter","initLegacyComponentsWithServerContext","dynamic","DynamicPermissions","ko","domNodeDisposal","cleanExternalData","run","oldAlertCenterAdapter","getRouterDep","legacyRouterDep","legacyRouter","legacyRouterImport","withLegacyContext","Component","withCustomScope","withCurrentExpandedScope","WrappedComponent","props","siteMap","currentCampaign","currentAdGroup","_mapScopeToPageContex","str","tabId","matchLastSlash","siteName","CurrentTabId","mapScopeToPageContext","_mapODataContextToPag","CurrentCampaign","CurrentAdGroup","convertStringToEnumForCampaign","convertStringToEnumForAdGroup","mapODataContextToPageContext","_jsx","defaultProps","withScope","withSiteMap","React","processor","processPermissions","processScope","processPath","withCampaignLegacyContext","withCampaign","appendToTmplItems","oldManip","domManip","tmplItmAtt","htmlExpr","newTmplItems","wrappedItems","topTmplItem","itemKey","cloneIndex","stack","newTmplItem","parentItem","newItem","_wrap","nodes","calls","tiCalls","nest","tiNest","tiWrap","tiHtml","update","tiUpdate","_ctnt","build","tmplItem","nested","content","frag","all","before","middle","after","storeTmplItems","unencode","innerHTML","childNodes","buildTmplFn","markup","Function","slash","fnargs","parens","def","exprAutoFnDetect","tag","_default","$1","$2","updateWrapped","wrapped","l","keySuffix","newClonedItems","nodeType","getElementsByTagName","processItemKey","pntKey","pntItem","pntNode","cloneTmplItem","removeAttribute","textOnly","innerText","textContent","outerHTML","div","appendChild","cloneNode","outerHtml","coll","insertBefore","prependTo","replaceAll","original","tmplItems","insert","clone","pushStack","table","dmArgs","argsLength","fragClone","afterManip","topLevel","dataItem","encode","open","__publicpath__","origin","__webpack_public_path__"],"sourceRoot":""}