File: /var/www/html/wp-content/plugins/advanced-ads/assets/dist/screen-ads-listing.js.map
{"version":3,"file":"screen-ads-listing.js","mappings":";;;;;;;;;;;;;;;;AAAuD;AAEhD,SAASC,aAAaA,CAAEC,SAAS,EAAG;EAC1C,IAAK,CAAEC,QAAQ,CAACC,IAAI,CAACC,SAAS,CAACC,QAAQ,CAAEJ,SAAU,CAAC,EAAG;IACtD;EACD;EAEA,MAAMK,MAAM,GAAG,IAAIC,eAAe,CAAEC,MAAM,CAACC,QAAQ,CAACC,MAAO,CAAC;EAC5D,MAAMC,WAAW,GAAGL,MAAM,CAACM,GAAG,CAAE,GAAI,CAAC,IAAIN,MAAM,CAACO,GAAG,CAAE,GAAI,CAAC,CAACC,IAAI,CAAC,CAAC,KAAK,EAAE;EAExE,IAAKH,WAAW,EAAG;IAClB,MAAMI,SAAS,GAAGb,QAAQ,CAACc,aAAa,CAAE,cAAe,CAAC;IAC1D,MAAMC,QAAQ,GAAGf,QAAQ,CAACc,aAAa,CAAE,WAAY,CAAC;IAEtD,IAAKC,QAAQ,EAAG;MACfA,QAAQ,CAACb,SAAS,CAACc,GAAG,CAAE,QAAS,CAAC;IACnC;IAEA,MAAMC,KAAK,GAAGjB,QAAQ,CAACkB,aAAa,CAAE,MAAO,CAAC;IAC9CD,KAAK,CAACE,SAAS,GAAG,6BAA6B;IAC/CF,KAAK,CAACG,WAAW,GAAGvB,iEAAkB;IACtCgB,SAAS,CAACQ,qBAAqB,CAAE,YAAY,EAAEJ,KAAM,CAAC;EACvD;AACD,C;;;;;;;;;;;;;;;;ACvB4B;;AAE5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASM,SAASA,CAACC,EAAE,EAAE;EACtB,MAAMC,KAAK,GAAG,WAAWD,EAAE,EAAE;EAC7B,MAAME,MAAM,GAAGpB,MAAM,CAACmB,KAAK,CAAC;EAC5BE,UAAU,CAACH,EAAE,EAAEE,MAAM,CAAC;AACvB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;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;;;;ACAA,kC;;;;;;;;;;ACAA,kC;;;;;;;;;;ACAA,0C;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WC5BA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA,E;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA,E;;;;;WCPA,wF;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D,E;;;;;;;;;;;;;;;;ACN4C;AAErB;AAEuB;AACa;AAE3DC,2DAAQ,CAAE,MAAM;EACfC,4DAAa,CAAC,CAAC;EACfjE,uEAAa,CAAE,wBAAyB,CAAC;AAC1C,CAAE,CAAC,C","sources":["webpack://advanced-ads/./src/admin/partials/search-reulsts.js","webpack://advanced-ads/./src/admin/screen-ads/quick-bulk-edit.js","webpack://advanced-ads/./src/admin/screen-ads/listing.css?75f5","webpack://advanced-ads/external var \"advancedAds.i18n\"","webpack://advanced-ads/external window \"jQuery\"","webpack://advanced-ads/external window [\"wp\",\"domReady\"]","webpack://advanced-ads/webpack/bootstrap","webpack://advanced-ads/webpack/runtime/compat get default export","webpack://advanced-ads/webpack/runtime/define property getters","webpack://advanced-ads/webpack/runtime/hasOwnProperty shorthand","webpack://advanced-ads/webpack/runtime/make namespace object","webpack://advanced-ads/./src/admin/screen-ads/listing.js"],"sourcesContent":["import { searchResultsLabel } from '@advancedAds/i18n';\r\n\r\nexport function searchResults( pageClass ) {\r\n\tif ( ! document.body.classList.contains( pageClass ) ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tconst params = new URLSearchParams( window.location.search );\r\n\tconst isSearching = params.has( 's' ) && params.get( 's' ).trim() !== '';\r\n\r\n\tif ( isSearching ) {\r\n\t\tconst searchBox = document.querySelector( 'p.search-box' );\r\n\t\tconst subtitle = document.querySelector( '.subtitle' );\r\n\r\n\t\tif ( subtitle ) {\r\n\t\t\tsubtitle.classList.add( 'hidden' );\r\n\t\t}\r\n\r\n\t\tconst label = document.createElement( 'span' );\r\n\t\tlabel.className = 'advads-search-results-label';\r\n\t\tlabel.textContent = searchResultsLabel;\r\n\t\tsearchBox.insertAdjacentElement( 'afterbegin', label );\r\n\t}\r\n}\r\n","import jQuery from 'jquery';\r\n\r\n/**\r\n * Retrieves ad data for a given ID using AJAX.\r\n *\r\n * @param {number} id - The ID of the ad.\r\n *\r\n * @return {void}\r\n */\r\nfunction getAdData(id) {\r\n\tconst adVar = `ad_json_${id}`;\r\n\tconst adData = window[adVar];\r\n\tfillInputs(id, adData);\r\n}\r\n\r\n/**\r\n * Fills the input fields in the specified row with the provided data.\r\n *\r\n * @param {number} id - The ID of the row.\r\n * @param {Object} data - The data to fill the input fields with.\r\n *\r\n * @return {void}\r\n */\r\nfunction fillInputs(id, data) {\r\n\tconst theRow = jQuery(`#edit-${id}`);\r\n\ttheRow.find('.advads-quick-edit').prop('disabled', false);\r\n\ttheRow.find('[name=\"debugmode\"]').prop('checked', data.debug_mode);\r\n\r\n\tif (data.expiry.expires) {\r\n\t\ttheRow.find('[name=\"enable_expiry\"]').prop('checked', true);\r\n\t\tconst inputs = theRow.find('.expiry-inputs').show();\r\n\t\tfor (const key in data.expiry.expiry_date) {\r\n\t\t\tinputs.find(`[name=\"${key}\"]`).val(data.expiry.expiry_date[key]);\r\n\t\t}\r\n\t}\r\n\r\n\t// Privacy module enabled.\r\n\tconst privacyCheckbox = theRow.find('[name=\"ignore_privacy\"]');\r\n\tif (privacyCheckbox.length) {\r\n\t\tprivacyCheckbox.prop('checked', data.ignore_privacy);\r\n\t}\r\n\r\n\t// Ad label.\r\n\tconst adLabel = theRow.find('[name=\"ad_label\"]');\r\n\tif (adLabel.length) {\r\n\t\tadLabel.val(data.ad_label);\r\n\t}\r\n\r\n\t/**\r\n\t * Allow add-ons to do field initialization\r\n\t */\r\n\twp.hooks.doAction('advanced-ads-quick-edit-fields-init', id, data);\r\n}\r\n\r\nexport default function QuickBulkEdit() {\r\n\t/* eslint-disable no-undef */\r\n\tconst editCopy = window.inlineEditPost.edit;\r\n\r\n\t// Replace the default WP function\r\n\twindow.inlineEditPost.edit = function (id) {\r\n\t\t/* eslint-enable no-undef */\r\n\t\t// Call the original WP edit function.\r\n\t\teditCopy.apply(this, arguments);\r\n\r\n\t\t// Now we do our stuff.\r\n\t\tif ('object' === typeof id) {\r\n\t\t\tgetAdData(parseInt(this.getId(id), 10));\r\n\t\t}\r\n\t};\r\n\r\n\t// Show/hide expiry date inputs on bulk edit.\r\n\tjQuery(document).on(\r\n\t\t'change',\r\n\t\t'.advads-bulk-edit [name=\"expiry_date\"]',\r\n\t\tfunction () {\r\n\t\t\tconst select = jQuery(this);\r\n\t\t\tselect\r\n\t\t\t\t.closest('fieldset')\r\n\t\t\t\t.find('.expiry-inputs')\r\n\t\t\t\t.css('display', 'on' === select.val() ? 'block' : 'none');\r\n\t\t}\r\n\t);\r\n\r\n\t// Show/hide expiry date inputs on quick edit.\r\n\tjQuery(document).on('click', '[name=\"enable_expiry\"]', function () {\r\n\t\tconst checkbox = jQuery(this);\r\n\t\tcheckbox\r\n\t\t\t.closest('fieldset')\r\n\t\t\t.find('.expiry-inputs')\r\n\t\t\t.css('display', checkbox.prop('checked') ? 'block' : 'none');\r\n\t});\r\n\r\n\tjQuery(function () {\r\n\t\tjQuery('.inline-edit-group select option[value=\"private\"]').remove();\r\n\t});\r\n}\r\n","// extracted by mini-css-extract-plugin\nexport {};","module.exports = advancedAds.i18n;","module.exports = window[\"jQuery\"];","module.exports = window[\"wp\"][\"domReady\"];","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Check if module exists (development only)\n\tif (__webpack_modules__[moduleId] === undefined) {\n\t\tvar e = new Error(\"Cannot find module '\" + moduleId + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import domReady from '@wordpress/dom-ready';\r\n\r\nimport './listing.css';\r\n\r\nimport quickBulkEdit from './quick-bulk-edit';\r\nimport { searchResults } from '../partials/search-reulsts';\r\n\r\ndomReady( () => {\r\n\tquickBulkEdit();\r\n\tsearchResults( 'post-type-advanced_ads' );\r\n} );\r\n"],"names":["searchResultsLabel","searchResults","pageClass","document","body","classList","contains","params","URLSearchParams","window","location","search","isSearching","has","get","trim","searchBox","querySelector","subtitle","add","label","createElement","className","textContent","insertAdjacentElement","jQuery","getAdData","id","adVar","adData","fillInputs","data","theRow","find","prop","debug_mode","expiry","expires","inputs","show","key","expiry_date","val","privacyCheckbox","length","ignore_privacy","adLabel","ad_label","wp","hooks","doAction","QuickBulkEdit","editCopy","inlineEditPost","edit","apply","arguments","parseInt","getId","on","select","closest","css","checkbox","remove","domReady","quickBulkEdit"],"sourceRoot":""}