/
www
/
wwwroot
/
alo88.autos
/
wp-content
/
plugins
/
internal-links
/
admin
/
js
/
Upload File
HOME
{"version":3,"file":"ilj_menu_settings.min.js","mappings":"2BAAIA,oBAAsB,CAAC,EAI3B,SAASC,kBAAkBC,EAAIC,EAAQC,GACrCC,OAAOH,GAAII,YAAY,CACrBC,MAAO,MACPC,mBAAoB,EACpBC,kBAAmB,SAAUC,GAC3B,IAAIC,EAAQ,GACRC,EAAUP,OAAOH,GAKrB,OAJIU,GAAWA,EAAQC,KAAK,4BAC1BF,EAAQG,SAASF,EAAQC,KAAK,6BAEpBH,EAAMK,KAAKC,OAASL,EAAQD,EAAMK,KAAKE,UAAU,EAAGN,GAAS,MAAQD,EAAMK,MACxE,SAAWL,EAAMR,GAAK,GACvC,EACAgB,KAAM,CACJC,IAAKC,QACLC,KAAM,OACNR,KAAM,SAAUS,GACd,MAAO,CACLnB,OAAQA,EACRoB,OAAQD,EAAOE,KACfC,SAAUrB,EACVsB,KAAMJ,EAAOI,MAAQ,EAEzB,EACAC,eAAgB,SAAUd,GACxB,OAAoB,IAAhBA,EAAKG,SAGTY,MAAO,EACHf,EAAKG,OAASZ,IAChBwB,MAAO,GAEFC,SAAW,CAChB,QAAWhB,EACX,WAAc,CACZ,OAGN,GAEFiB,SAAU,CACRC,aAAc,WACZ,OAAOC,wBAAwBC,aACjC,EACAC,cAAe,SAAUC,GACvB,IAAIC,EAAiBD,EAAKE,QAAUF,EAAKG,MAAMtB,OAC/C,OAAOgB,wBAAwBO,gBAAkB,KAAOH,CAC1D,EACAI,YAAa,WACX,OAAOR,wBAAwBS,YACjC,EACAC,UAAW,WACT,OAAOV,wBAAwBW,UACjC,EACAC,UAAW,WACT,OAAOZ,wBAAwBY,SACjC,IAGN,CAUA,SAASC,iCAAiCC,EAAOC,EAAgBC,EAAY,YAC3EC,gCAAgCH,EAAMI,KAAK,WAAYH,EAAgBC,GACvEF,EAAMK,GAAG,UAAU,WACjBF,gCAAgCH,EAAMI,KAAK,WAA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AO,yCAC5B6E,EAAyB7E,OAAO,4EAC/BoF,EAAmBzE,SAGpByE,EAAmB,GAAGN,SACxBD,EAAuB7B,MAAK,WAC1BhD,OAAOiD,MAAMC,QAAQ,MAAMC,KAAK,MAAME,SAAS,WACjD,IACAwB,EAAuBhC,KAAK,YAAY,IAExCgC,EAAuBhC,KAAK,YAAY,GAE5C,IAeA7C,OAAO,QAAQqF,SAVG,CAChBnF,MAAO,GACPoF,SAAU,MACVC,UAAU,EACVC,MAAO,IACPC,MAAO,IACPC,WAAY,UACZC,MAAO,UACPC,KAAM,UAGR5F,OAAOkF,UAAUpC,GAAG,QAAS,gCAAgC,SAAUgB,GAGrE,GAFAA,EAAE+B,iBACmBC,QAAQC,8BAA8BC,0BAIvDhG,OAAOiD,MAAMgD,KAAK,YAAtB,CAGAjG,OAAOiD,MAAMiD,MAAMlG,OAAO,gGAI1BA,OAAOa,KAAK,CACVC,IAAKC,QACLC,KAAM,OACNR,KANS,CACT,OAAU,wBAMV2F,WAAY,CACV,IAAK,SAAUC,MACT,KAAmBA,IAAQ,CAAC,UAAW,SAASC,SAASD,EAAIE,aAAaC,SAG9EC,QAAQC,IAAI,UAAYL,EAAIE,aAAaI,QAC3C,GAEFC,QAAS,SAAUnG,EAAMoG,EAAYR,GAInC,GAHApG,OAAO,gCAAgC6G,SAGgB,IAAnD7G,OAAO,iCAAiCW,OAAc,CAExD,IAAImG,EAAiB,0FAA4Ff,8BAA8BgB,gBAAkB,aACjK/G,OAAO8G,GAAgBE,YAAY,gCAGnCC,YAAW,WACTjH,OAAO,iCAAiC6G,QAC1C,GAAG,IACL,CACF,GA/BF,CAiCF,GACF","sources":["webpack://wp-internal-linkjuicer/./src/admin/js/ilj_menu_settings.js"],"sourcesContent":["var __webpack_exports__ = {};\n/*!*******************************************!*\\\n !*** ./src/admin/js/ilj_menu_settings.js ***!\n \\*******************************************/\nfunction ilj_dynamicSelect(id, action, searchResults) {\n jQuery(id).ilj_select2({\n width: '50%',\n minimumInputLength: 3,\n templateSelection: function (state) {\n var limit = 20;\n var element = jQuery(id);\n if (element && element.data(\"iljTitleCharacterLimit\")) {\n limit = parseInt(element.data(\"iljTitleCharacterLimit\"));\n }\n var title = state.text.length > limit ? state.text.substring(0, limit) + \"...\" : state.text;\n return title + \" (ID: \" + state.id + \")\";\n },\n ajax: {\n url: ajaxurl,\n type: \"POST\",\n data: function (params) {\n return {\n action: action,\n search: params.term,\n per_page: searchResults,\n page: params.page || 1\n };\n },\n processResults: function (data) {\n if (data.length === 0) {\n return false;\n }\n more = true;\n if (data.length < searchResults) {\n more = false;\n }\n return data_new = {\n \"results\": data,\n \"pagination\": {\n \"more\": more\n }\n };\n }\n },\n language: {\n errorLoading: function () {\n return ilj_select2_translation.error_loading;\n },\n inputTooShort: function (args) {\n var remainingChars = args.minimum - args.input.length;\n return ilj_select2_translation.input_too_short + ': ' + remainingChars;\n },\n loadingMore: function () {\n return ilj_select2_translation.loading_more;\n },\n noResults: function () {\n return ilj_select2_translation.no_results;\n },\n searching: function () {\n return ilj_select2_translation.searching;\n }\n }\n });\n}\n\n/**\n * This function is used to disable a group of fields when a toggle is disabled,\n * enable it when its enabled ( both during page load and while changing the settings )\n *\n * @param {jQuery} field JQuery object for selected field\n * @param {jQuery} inverse_fields JQuery object for inverse fields.\n * @param {string} attribute The attribute to toggle (defaults to readonly)\n */\nfunction ilj_menu_settings_inverse_fields(field, inverse_fields, attribute = 'readonly') {\n ilj_menu_settings_toggle_fields(field.prop('checked'), inverse_fields, attribute);\n field.on('change', function () {\n ilj_menu_settings_toggle_fields(field.prop('checked'), inverse_fields, attribute);\n });\n}\n\n/**\n * Disable the fields and its corresponding row.\n * @param {boolean} toggle Set to disabled or enabled based on this boolean.\n * @param {jQuery} inverse_fields The jQuery object for fields.\n * @param {string} attribute The attribute to toggle.\n */\nfunction ilj_menu_settings_toggle_fields(toggle, inverse_fields, attribute) {\n if (toggle) {\n inverse_fields.each(function () {\n jQuery(this).prop(attribute, false).closest('tr').find('th').removeClass('inactive');\n });\n } else {\n inverse_fields.each(function () {\n jQuery(this).prop(attribute, true).closest('tr').find('th').addClass('inactive');\n });\n }\n}\njQuery(function ($) {\n $('#ilj_settings_field_editor_role, #ilj_settings_field_index_generation, #ilj_settings_field_whitelist, #ilj_settings_field_taxonomy_whitelist,#ilj_settings_field_limit_taxonomy_list, #ilj_settings_field_keyword_order, #ilj_settings_field_no_link_tags').ilj_select2({\n minimumResultsForSearch: 10,\n width: '50%'\n });\n\n /**\n * ilj_settings_field_custom_fields_to_link_post, ilj_settings_field_custom_fields_to_link_term now supports\n * the regex rule matching. For example if the user types 'apple' in to the field we have to show the following three\n * options\n *\n * 1. Custom field name starts with 'apple'\n * 2. Custom field name ends with 'apple'\n * 3. Custom field name contains 'apple'\n *\n * To accomplish this behaviour we use the insertTag() option of select2 to dynamically add tags.\n */\n $('#ilj_settings_field_custom_fields_to_link_post, #ilj_settings_field_custom_fields_to_link_term').ilj_select2({\n minimumResultsForSearch: 10,\n width: '50%',\n tags: true,\n insertTag: function (data, tag) {\n // Collect existing ids to perform O(1) lookup in a set.\n var ids = new Set(data.map(e => e.id));\n var startsWithId = `starts_with:${tag.id}`.trim();\n var endsWithId = `ends_with:${tag.id}`.trim();\n var containsId = `contains:${tag.id}`.trim();\n if (!ids.has(startsWithId)) {\n data.push({\n newOption: true,\n id: startsWithId,\n text: ilj_select2_translation.custom_field_starts_with.replace('%s', tag.text)\n });\n }\n if (!ids.has(endsWithId)) {\n data.push({\n newOption: true,\n id: endsWithId,\n text: ilj_select2_translation.custom_field_ends_with.replace('%s', tag.text)\n });\n }\n if (!ids.has(containsId)) {\n data.push({\n newOption: true,\n id: containsId,\n text: ilj_select2_translation.custom_field_has.replace('%s', tag.text)\n });\n }\n }\n });\n\n /***\n * When the user clicks on any one of the dynamically added option, we have to add them to select2 options\n * and make it selected.\n */\n $('#ilj_settings_field_custom_fields_to_link_post, #ilj_settings_field_custom_fields_to_link_term').on('select2:select', function (e) {\n if (e.params.data.newOption) {\n var data = e.params.data;\n // Create a DOM Option and pre-select by default\n var newOption = new Option(data.text, data.id, true, true);\n // Append it to the select using the current selected ID\n $(this).append(newOption).trigger('change');\n }\n });\n\n /**\n * Toggle max incoming links field by limit incoming links toggle.\n */\n ilj_menu_settings_inverse_fields(jQuery('#ilj_settings_field_limit_incoming_links'), jQuery('#ilj_settings_field_max_incoming_links'));\n ilj_dynamicSelect('#ilj_settings_field_blacklist', 'ilj_search_posts', 20);\n ilj_dynamicSelect('#ilj_settings_field_term_blacklist', 'ilj_search_terms', 20);\n\n /**\n * Toggle \"links_per_page\" and \"links_per_target\" depending on multiple keyword state\n */\n jQuery('#ilj_settings_field_multiple_keywords').on('change', function () {\n var $inverse_setting_field = jQuery('#ilj_settings_field_links_per_page, #ilj_settings_field_links_per_target, #ilj_settings_field_limit_incoming_links');\n if (this.checked) {\n $inverse_setting_field.each(function () {\n jQuery(this).closest('tr').find('th').addClass('inactive');\n });\n $inverse_setting_field.prop('disabled', true);\n jQuery(\"#ilj_settings_field_links_per_page\").val(\"0\");\n jQuery(\"#ilj_settings_field_links_per_target\").val(\"0\");\n jQuery('#ilj_settings_field_limit_incoming_links').val('0').prop('checked', false).trigger('change');\n } else {\n $inverse_setting_field.each(function () {\n jQuery(this).closest('tr').find('th').removeClass('inactive');\n });\n $inverse_setting_field.prop('disabled', false);\n }\n });\n jQuery('#ilj_settings_field_index_generation').on('change', function () {\n var $inverse_setting_field = jQuery('#ilj_settings_field_hide_status_bar');\n if (this.value == \"index_mode_none\") {\n $inverse_setting_field.each(function () {\n jQuery(this).closest('tr').find('th').addClass('inactive');\n });\n $inverse_setting_field.prop('disabled', true);\n } else {\n $inverse_setting_field.each(function () {\n jQuery(this).closest('tr').find('th').removeClass('inactive');\n });\n $inverse_setting_field.prop('disabled', false);\n }\n });\n var index_generation_mode = jQuery('#ilj_settings_field_index_generation').val();\n if (index_generation_mode == 'index_mode_none') {\n // Do something here\n var disable_hide_status_bar_option = jQuery(\"#ilj_settings_field_hide_status_bar\");\n disable_hide_status_bar_option.each(function () {\n jQuery(this).closest('tr').find('th').addClass('inactive');\n });\n disable_hide_status_bar_option.prop('disabled', true);\n }\n jQuery(document).ready(function () {\n var $multiple_keywords = jQuery('#ilj_settings_field_multiple_keywords');\n var $inverse_setting_field = jQuery('#ilj_settings_field_links_per_page, #ilj_settings_field_links_per_target');\n if (!$multiple_keywords.length) {\n return;\n }\n if ($multiple_keywords[0].checked) {\n $inverse_setting_field.each(function () {\n jQuery(this).closest('tr').find('th').addClass('inactive');\n });\n $inverse_setting_field.prop('disabled', true);\n } else {\n $inverse_setting_field.prop('disabled', false);\n }\n });\n\n /**\n * Adding Tooltip\n */\n var tipsoConfig = {\n width: '',\n maxWidth: '200',\n useTitle: true,\n delay: 100,\n speed: 500,\n background: '#32373c',\n color: '#eeeeee',\n size: 'small'\n };\n jQuery('.tip').iljtipso(tipsoConfig);\n jQuery(document).on('click', '.button.ilj-cancel-schedules', function (e) {\n e.preventDefault();\n var user_confirmed = confirm(ilj_menu_settings_translation.confirm_cancel_message);\n if (!user_confirmed) {\n return;\n }\n if (jQuery(this).attr('disabled')) {\n return;\n }\n jQuery(this).after(jQuery('<span id=\"ilj-cancel-schedule-spinner\" class=\"spinner is-active\" style=\"float:none\"></span>'));\n var data = {\n 'action': 'ilj_cancel_schedules'\n };\n jQuery.ajax({\n url: ajaxurl,\n type: 'POST',\n data: data,\n statusCode: {\n 500: function (xhr) {\n if (!'responseJSON' in xhr || !['success', 'error'].includes(xhr.responseJSON.status)) {\n return;\n }\n console.log('Error: ' + xhr.responseJSON.message);\n }\n },\n success: function (data, textStatus, xhr) {\n jQuery('#ilj-cancel-schedule-spinner').remove();\n\n // Check if the success message is not already shown\n if (jQuery('#ilj-cancel-schedule-feedback').length === 0) {\n // Display a success message\n var successMessage = '<div id=\"ilj-cancel-schedule-feedback\" class=\"notice notice-success is-dismissible\"><p>' + ilj_menu_settings_translation.success_message + '</p></div>';\n jQuery(successMessage).insertAfter('.button.ilj-cancel-schedules');\n\n // Remove the notice after 2 seconds\n setTimeout(function () {\n jQuery(\"#ilj-cancel-schedule-feedback\").remove();\n }, 2000);\n }\n }\n });\n });\n});\n"],"names":["__webpack_exports__","ilj_dynamicSelect","id","action","searchResults","jQuery","ilj_select2","width","minimumInputLength","templateSelection","state","limit","element","data","parseInt","text","length","substring","ajax","url","ajaxurl","type","params","search","term","per_page","page","processResults","more","data_new","language","errorLoading","ilj_select2_translation","error_loading","inputTooShort","args","remainingChars","minimum","input","input_too_short","loadingMore","loading_more","noResults","no_results","searching","ilj_menu_settings_inverse_fields","field","inverse_fields","attribute","ilj_menu_settings_toggle_fields","prop","on","toggle","each","this","closest","find","removeClass","addClass","$","minimumResultsForSearch","tags","insertTag","tag","ids","Set","map","e","startsWithId","trim","endsWithId","containsId","has","push","newOption","custom_field_starts_with","replace","custom_field_ends_with","custom_field_has","Option","append","trigger","$inverse_setting_field","checked","val","value","disable_hide_status_bar_option","document","ready","$multiple_keywords","iljtipso","maxWidth","useTitle","delay","speed","background","color","size","preventDefault","confirm","ilj_menu_settings_translation","confirm_cancel_message","attr","after","statusCode","xhr","includes","responseJSON","status","console","log","message","success","textStatus","remove","successMessage","success_message","insertAfter","setTimeout"],"sourceRoot":""}