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gBAAiB,GAGrB,G,gBCjKA,IAAIuF,EAAM,CACT,eAAgB,IAChB,0BAA2B,IAC3B,qBAAsB,IACtB,2BAA4B,IAC5B,8BAA+B,GAC/B,+BAAgC,IAChC,6BAA8B,IAC9B,+BAAgC,IAChC,gBAAiB,GACjB,eAAgB,IAChB,cAAe,IACf,mBAAoB,IACpB,sBAAuB,KAIxB,SAASmE,EAAeC,GACvB,IAAIC,EAAKC,EAAsBF,GAC/B,OAAOG,EAAoBF,EAC5B,CACA,SAASC,EAAsBF,GAC9B,IAAIG,EAAoBC,EAAExE,EAAKoE,GAAM,CACpC,IAAIzJ,EAAI,IAAI8J,MAAM,uBAAyBL,EAAM,KAEjD,MADAzJ,EAAEiH,KAAO,mBACHjH,CACP,CACA,OAAOqF,EAAIoE,EACZ,CACAD,EAAeO,KAAO,WACrB,OAAOC,OAAOD,KAAK1E,EACpB,EACAmE,EAAeS,QAAUN,EACzBO,EAAOC,QAAUX,EACjBA,EAAeE,GAAK,G,GCjChBU,EAA2B,CAAC,EAGhC,SAASR,EAAoBS,GAE5B,IAAIC,EAAeF,EAAyBC,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaH,QAGrB,IAAID,EAASE,EAAyBC,GAAY,CAGjDF,QAAS,CAAC,GAOX,OAHAK,EAAoBH,GAAUH,EAAQA,EAAOC,QAASP,GAG/CM,EAAOC,OACf,CCtBAP,EAAoBC,EAAI,CAAC9F,EAAK/B,IAAUgI,OAAOS,UAAUC,eAAeC,KAAK5G,EAAK/B,IhBE/D7D,EAIT,QAHN4L,OAAO/E,QAAQ7G,E","sources":["webpack://app/./app/javascript/application.js","webpack://app/./app/assets/javascripts/payments.js","webpack://app/./app/assets/javascripts/organisations_contacts.js","webpack://app/./app/assets/javascripts/exports.js","webpack://app/./app/assets/javascripts/load_best_in_place.js","webpack://app/./app/assets/javascripts/subscribers.js","webpack://app/./app/assets/javascripts/trial_requests.js","webpack://app/./app/assets/javascripts/organisations_members.js","webpack://app/./app/assets/javascripts/organisations_directors.js","webpack://app/./app/assets/javascripts/search.js","webpack://app/./app/assets/javascripts/organisations_turnovers.js","webpack://app/./app/assets/javascripts/reports.js","webpack://app/./app/assets/javascripts/organisations_banks.js","webpack://app/./app/assets/javascripts/organisations.js","webpack://app/./app/assets/javascripts/ sync \\.js$","webpack://app/webpack/bootstrap","webpack://app/webpack/runtime/hasOwnProperty shorthand"],"sourcesContent":["// Entry point for the build script in your package.json\n\nfunction importAll(r) {\n r.keys().forEach(r);\n}\n\nimportAll(require.context('../assets/javascripts/', true, /\\.js$/));\n","$(function() {\n $('#payments-table').dataTable({\n processing: true,\n serverSide: true,\n ajax: $('#payments-table').data('source'),\n pagingType: 'full_numbers',\n columns: [\n { data: 'id' },\n { data: 'received', orderable: false },\n { data: 'total', orderable: false },\n { data: 'user', orderable: false },\n { data: 'created', orderable: false }\n ],\n order: [[0, \"desc\"]]\n });\n});\n","$(document).ready(function () {\n // Function to calculate the next unique index\n function getNextContactIndex() {\n let maxIndex = 0;\n\n // Find the highest existing index in the form\n $('#contacts-fields input[name*=\"contacts_attributes\"]').each(function () {\n const match = $(this).attr('name').match(/\\[(\\d+)\\]/); // Extract the index\n if (match && match[1]) {\n maxIndex = Math.max(maxIndex, parseInt(match[1], 10));\n }\n });\n\n return maxIndex + 1; // Return the next index\n }\n\n // Add new contact\n function addContact(beforeElement) {\n const contactIndex = getNextContactIndex();\n\n // Clone the hidden template\n const newContact = $('#contact-template').html();\n\n // Replace the placeholder with a unique index\n const updatedContact = newContact.replace(/NEW_RECORD/g, contactIndex);\n\n // Append to the contacts fields container\n if (beforeElement && beforeElement.length) {\n $(beforeElement).before(updatedContact);\n } else {\n $('#contacts-fields').append(updatedContact);\n }\n\n // Add buttons for adding contacts\n addContactButtons();\n }\n\n // Add buttons for adding contacts\n function addContactButtons() {\n // Remove existing \"Add Contact Here\" buttons\n $('.add-contact-here').remove();\n\n const addContactButton = '';\n\n // Add \"Add Contact Here\" button before the first contact\n $('#contacts-fields').prepend(addContactButton);\n\n // Add \"Add Contact Here\" button after each contact\n $('.contact-field').each(function () {\n $(this).after(addContactButton);\n });\n\n // Initialize multiselect for job titles, ignoring the hidden templates\n $('select[id$=\"job_title_code\"]:visible').multiselect({\n enableFiltering: true,\n enableCaseInsensitiveFiltering: true,\n maxHeight: 200,\n buttonWidth: '100%',\n includeSelectAllOption: false,\n filterPlaceholder: 'Search Job Titles...',\n numberDisplayed: 0\n });\n }\n\n // Initial call to add buttons\n addContactButtons();\n\n // Event handler for add-contact-here button\n $(document).on('click', '.add-contact-here', function (e) {\n e.preventDefault();\n addContact($(this).next('.contact-field'));\n });\n\n // Remove contact field\n $(document).on('click', '.remove-contact', function (e) {\n e.preventDefault();\n\n // generate a string of the contact's name from the parent element including salutation, first and last name\n const salutation = $(this).closest('.contact-field').find('select[name*=\"[salutation_code]\"] option:selected').text() || '';\n const firstName = $(this).closest('.contact-field').find('input[name*=\"[first_name]\"]').val() || '';\n const lastName = $(this).closest('.contact-field').find('input[name*=\"[last_name]\"]').val() || '';\n const contactName = `${salutation} ${firstName} ${lastName}`.trim();\n\n // Show a confirmation popup using the generated contact's name\n\n const confirmed = confirm(\"Are you sure you want to remove: \" + contactName + \"?\");\n\n // If the user confirms, remove the parent `.contact-field` div\n if (confirmed) {\n $(this).closest('.contact-field').remove();\n // Re-add the \"Add Contact Here\" buttons\n addContactButtons();\n }\n });\n});\n","$(document).on('click', 'button#submit_export', function(event) {\n event.preventDefault();\n return $(this).closest('.modal').find('form').submit();\n});\n\nwindow.ExportFieldSelection = (function() {\n ExportFieldSelection.init = function(selector) {\n return new this(selector);\n };\n\n function ExportFieldSelection(selector) {\n this.field = $(selector);\n this.field.on('change', function(e) {\n if ($('#export_cost_paid').prop('checked')) {\n $('#export_fields option').prop('selected', true);\n $('#export_fields').prop('disabled', false);\n $('#export_contact_limit').prop('disabled', false);\n return $('#export_contact_limit option').filter('[value=\"99\"]').prop('selected', true);\n } else {\n $('#export_fields option').prop('selected', false);\n $('#export_fields option').filter('[value=\"id\"]').prop('selected', true);\n $('#export_fields option').filter('[value=\"name\"]').prop('selected', true);\n $('#export_fields').prop('disabled', true);\n $('#export_contact_limit').prop('disabled', true);\n return $('#export_contact_limit option').filter('[value=\"0\"]').prop('selected', true);\n }\n });\n this.field.trigger('change');\n }\n\n return ExportFieldSelection;\n\n})();\n\ndocument.addEventListener('DOMContentLoaded', function() {\n ExportFieldSelection.init(\"input[name='export[cost]']:radio\");\n});\n","$(document).ready(function() {\n jQuery(\".best_in_place\").best_in_place();\n});\n","$(document).on('click', '#set_trial_dates', function(event) {\n event.preventDefault();\n const today = new Date();\n // Set the start date to 12 hours from UTC now\n const startsOn = new Date(today.getTime() + (12 * 60 * 60 * 1000)).toISOString().split('T')[0];\n const endsOn = new Date(today.setDate(today.getDate() + 14)).toISOString().split('T')[0];\n\n $('#subscriber_subscription_starts_on').val(startsOn);\n $('#subscriber_subscription_ends_on').val(endsOn);\n $('#subscriber_trial').prop('checked', true);\n $('#subscriber_trial_search_count_limit').val('300');\n});\n\n$(function() {\n $('#subscribers-table').dataTable({\n processing: true,\n serverSide: true,\n ajax: $('#subscribers-table').data('source'),\n pagingType: 'full_numbers',\n columns: [\n { data: 'name' },\n { data: 'from' },\n { data: 'to' },\n { data: 'current', orderable: false },\n { data: 'searches' },\n { data: 'admin', orderable: false }\n ],\n order: [[2, \"desc\"]]\n });\n});\n","$(function() {\n $('#trial-requests-table').dataTable({\n processing: true,\n serverSide: true,\n ajax: $('#trial-requests-table').data('source'),\n pagingType: 'full_numbers',\n columns: [\n { data: 'name' },\n { data: 'country' },\n { data: 'contact' },\n { data: 'email' },\n { data: 'phone', orderable: false },\n { data: 'usage', orderable: false },\n { data: 'created' },\n { data: 'subscriber', orderable: false },\n { data: 'searches', orderable: false }\n ],\n order: [[6, \"desc\"]]\n });\n});\n","$(document).ready(function () {\n // Add new member\n function addMember(beforeElement) {\n // Clone the hidden template\n const newMember = $('#member-template').html();\n\n // Append to the members fields container\n if (beforeElement && beforeElement.length) {\n $(beforeElement).before(newMember);\n } else {\n $('#members-fields').append(newMember);\n }\n }\n\n // Event handler for add-member-here button\n $(document).on('click', '.add-member-here', function (e) {\n e.preventDefault();\n addMember($(this).closest('.member-field').next('.member-field'));\n });\n\n // Remove member field\n $(document).on('click', '.remove-member', function (e) {\n e.preventDefault();\n\n // generate a string of the member's name from the parent element\n const memberName = $(this).closest('.member-field').find('input[name*=\"[members]\"]').val() || '';\n\n // don't show the popup if membername is blank\n if (!memberName) {\n $(this).closest('.member-field').remove();\n return;\n }\n\n // Show a confirmation popup using the generated member's name\n const confirmed = confirm(`Are you sure you want to remove: ${memberName}?`);\n\n // If the user confirms, remove the parent `.member-field` div\n if (confirmed) {\n $(this).closest('.member-field').remove();\n }\n });\n\n // Remove member-template before form submission\n $('form').on('submit', function () {\n $('#member-template').remove();\n });\n});\n","$(document).ready(function () {\n // Function to calculate the next unique index\n function getNextDirectorIndex() {\n let maxIndex = 0;\n\n // Find the highest existing index in the form\n $('#directors-fields input[name*=\"directors_attributes\"]').each(function () {\n const match = $(this).attr('name').match(/\\[(\\d+)\\]/); // Extract the index\n if (match && match[1]) {\n maxIndex = Math.max(maxIndex, parseInt(match[1], 10));\n }\n });\n\n return maxIndex + 1; // Return the next index\n }\n\n // Add new director\n function addDirector(beforeElement) {\n const directorIndex = getNextDirectorIndex();\n\n // Clone the hidden template\n const newDirector = $('#director-template').html();\n\n // Replace the placeholder with a unique index\n const updatedDirector = newDirector.replace(/NEW_RECORD/g, directorIndex);\n\n // Append to the directors fields container\n if (beforeElement && beforeElement.length) {\n $(beforeElement).before(updatedDirector);\n } else {\n $('#directors-fields').append(updatedDirector);\n }\n\n // Add buttons for adding directors\n addDirectorButtons();\n }\n\n // Add buttons for adding directors\n function addDirectorButtons() {\n // Remove existing \"Add Director Here\" buttons\n $('.add-director-here').remove();\n\n const addDirectorButton = '';\n\n // Add \"Add Director Here\" button before the first director\n $('#directors-fields').prepend(addDirectorButton);\n\n // Add \"Add Director Here\" button after each director\n $('.director-field').each(function () {\n $(this).after(addDirectorButton);\n });\n\n // Initialize multiselect for job titles, ignoring the hidden templates\n $('select[id$=\"job_title_code\"]:visible').multiselect({\n enableFiltering: true,\n enableCaseInsensitiveFiltering: true,\n maxHeight: 200,\n buttonWidth: '100%',\n includeSelectAllOption: false,\n filterPlaceholder: 'Search Job Titles...',\n numberDisplayed: 0\n });\n }\n\n // Initial call to add buttons\n addDirectorButtons();\n\n // Event handler for add-director-here button\n $(document).on('click', '.add-director-here', function (e) {\n e.preventDefault();\n addDirector($(this).next('.director-field'));\n });\n\n // Remove director field\n $(document).on('click', '.remove-director', function (e) {\n e.preventDefault();\n\n // generate a string of the director's name from the parent element including salutation, first and last name\n const salutation = $(this).closest('.director-field').find('select[name*=\"[salutation_code]\"] option:selected').text() || '';\n const firstName = $(this).closest('.director-field').find('input[name*=\"[first_name]\"]').val() || '';\n const lastName = $(this).closest('.director-field').find('input[name*=\"[last_name]\"]').val() || '';\n const directorName = `${salutation} ${firstName} ${lastName}`.trim();\n\n // Show a confirmation popup using the generated director's name\n\n const confirmed = confirm(\"Are you sure you want to remove: \" + directorName + \"?\");\n\n // If the user confirms, remove the parent `.director-field` div\n if (confirmed) {\n $(this).closest('.director-field').remove();\n // Re-add the \"Add Director Here\" buttons\n addDirectorButtons();\n }\n });\n});\n","$(document).ready(function() {\n $(\"form:first input[type!='hidden']:first\").focus();\n\n var company_name_auto = new Bloodhound({\n datumTokenizer: Bloodhound.tokenizers.obj.whitespace(\"value\"),\n queryTokenizer: Bloodhound.tokenizers.whitespace,\n remote: {\n url: \"/autocomplete/company_name/%QUERY\",\n wildcard: '%QUERY'\n }\n });\n company_name_auto.initialize();\n $(\"#company_name.typeahead\").typeahead(null, {\n source: company_name_auto,\n display: 'value'\n });\n\n if ($('#form_search').length > 0) {\n new ComboWarning('#form_search', ['#turnover_range', '#employee_range'], '#turnover_emp_combo');\n new SearchDescriptionUpdater('#form_search');\n new ComboWarning('#form_search', ['#job_title', '#job_title_category'], '#job_title_combo');\n new MultiSelectBoxes('#form_search', [\n '#employee_range',\n '#turnover_range',\n '#region',\n '#anzsic_division',\n '#anzsic_subdivision',\n '#anzsic_group',\n '#anzsic_class',\n '#job_title_category',\n '#job_title',\n '#export_countries',\n '#import_countries',\n '#parent_country',\n '#include_lists',\n '#exclude_lists',\n '#banks',\n '#members',\n '#update_date',\n '#status'\n ]);\n };\n\n return;\n});\n\nclass ComboWarning {\n constructor(form, comboBoxes, warning) {\n this.form = form;\n this.comboBoxes = comboBoxes;\n this.warning = warning;\n this.comboBoxes.forEach((comboBox) => {\n $(comboBox).on('change', (e) => {\n this.toggleWarning();\n });\n });\n $(this.form).on('reset', (e) => {\n setTimeout(() => {\n this.toggleWarning();\n });\n });\n }\n\n toggleWarning() {\n var has_values = this.comboBoxes.map((comboBox) => {\n return $(comboBox).val() && $(comboBox).val().length > 0;\n });\n var warning_visible = has_values.filter(Boolean).length > 1;\n $(this.warning).toggle(warning_visible);\n }\n}\n\nclass SearchDescriptionUpdater {\n constructor(form) {\n this.form = form;\n\n $(this.form + \" :input\").on('change', (e) => {\n this.updateSearchDescription();\n });\n $(this.form).on('reset', (e) => {\n setTimeout(() => {\n this.updateSearchDescription();\n });\n });\n this.updateSearchDescription();\n }\n\n updateSearchDescription() {\n $('#search_description').html('');\n var activeFilters = [];\n\n var excludedFields = ['missing_anzsic', 'update_date[]', 'status[]']; // Add field names or IDs to exclude\n $(this.form + \" :input\").each(function() {\n // Skip excluded fields\n if (excludedFields.includes($(this).attr('name'))) return;\n\n var fieldIsActive = $(this).is(':checkbox') ?\n $(this).prop('checked') && !$(this).prop('disabled') :\n $(this).is('select[multiple]') ?\n $(this).val() && $(this).val().length > 0 :\n $(this).val();\n var fieldDesc = $(this).data('desc');\n if (fieldIsActive && jQuery.trim(fieldDesc).length > 0) {\n activeFilters.push(fieldDesc);\n }\n });\n\n activeFilters = [...new Set(activeFilters)];\n if (activeFilters.length > 0) {\n $('#search_description').append(activeFilters.join(', '));\n } else {\n $('#search_description').append(\"None\");\n }\n }\n}\n\nclass MultiSelectBoxes {\n constructor(form, boxes) {\n this.form = form;\n this.boxes = boxes;\n this.boxes.forEach((box) => {\n $(box).multiselect({\n maxHeight: 300,\n includeSelectAllOption: true,\n enableFiltering: true,\n enableCaseInsensitiveFiltering: true\n });\n });\n }\n}\n\n$(document).on('click', '#form_search_reset', function(e) {\n e.preventDefault();\n $('#form_search')[0].reset();\n\n // Reset multi-select dropdowns\n $('select').each(function() {\n $(this).multiselect('deselectAll', false);\n if ($(this).attr('name') === 'status[]') {\n $(this).multiselect('select', ['active', 'manual_update']);\n }\n $(this).multiselect('updateButtonText');\n });\n\n return;\n});\n\n$(document).on('click', 'a[data-anzsic-2006-link]', function(e) {\n e.preventDefault();\n $('#form_search_reset').click();\n $('#business').html('');\n $('.nav-tabs a[href=\"#form_products\"]').tab('show');\n var anzsicCode = $(this).data('anzsic-2006-link');\n var option = 'option[value=\"' + anzsicCode + '\"]';\n if (anzsicCode.length == 1) {\n $(option, $('#anzsic_division')).prop('selected', true);\n $('#anzsic_division').multiselect('refresh');\n } else if (anzsicCode.length == 3) {\n $(option, $('#anzsic_subdivision')).prop('selected', true);\n $('#anzsic_subdivision').multiselect('refresh');\n } else if (anzsicCode.length == 4) {\n $(option, $('#anzsic_group')).prop('selected', true);\n $('#anzsic_group').multiselect('refresh');\n } else if (anzsicCode.length == 5) {\n $(option, $('#anzsic_class')).prop('selected', true);\n $('#anzsic_class').multiselect('refresh');\n }\n $('#form_search').submit();\n return;\n});\n","$(document).ready(function () {\n // Function to calculate the next unique index\n function getNextTurnoverIndex() {\n let maxIndex = 0;\n\n // Find the highest existing index in the form\n $('#turnovers-fields input[name*=\"turnovers_attributes\"]').each(function () {\n const match = $(this).attr('name').match(/\\[(\\d+)\\]/); // Extract the index\n if (match && match[1]) {\n maxIndex = Math.max(maxIndex, parseInt(match[1], 10));\n }\n });\n\n return maxIndex + 1; // Return the next index\n }\n\n // Add new turnover\n function addTurnover(beforeElement) {\n const turnoverIndex = getNextTurnoverIndex();\n\n // Clone the hidden template\n const newTurnover = $('#turnover-template').html();\n\n // Replace the placeholder with a unique index\n const updatedTurnover = newTurnover.replace(/NEW_RECORD/g, turnoverIndex);\n\n // Append to the turnovers fields container\n if (beforeElement && beforeElement.length) {\n $(beforeElement).before(updatedTurnover);\n } else {\n $('#turnovers-fields').append(updatedTurnover);\n }\n\n // Add buttons for adding turnovers\n addTurnoverButtons();\n }\n\n // Add buttons for adding turnovers\n function addTurnoverButtons() {\n // Remove existing \"Add Turnover Here\" buttons\n $('.add-turnover-here').remove();\n\n const addTurnoverButton = '';\n\n // Add \"Add Turnover Here\" button before the first turnover\n $('#turnovers-fields').prepend(addTurnoverButton);\n\n // Add \"Add Turnover Here\" button after each turnover\n $('.turnover-field').each(function () {\n $(this).after(addTurnoverButton);\n });\n }\n\n // Initial call to add buttons\n addTurnoverButtons();\n\n // Event handler for add-turnover-here button\n $(document).on('click', '.add-turnover-here', function (e) {\n e.preventDefault();\n addTurnover($(this).next('.turnover-field'));\n });\n\n // Remove turnover field\n $(document).on('click', '.remove-turnover', function (e) {\n e.preventDefault();\n\n // generate a string of the turnover from the parent element\n const amount = $(this).closest('.turnover-field').find('input[name*=\"[amount]\"]').val() || '';\n const currency = $(this).closest('.turnover-field').find('input[name*=\"[currency]\"]').val() || '';\n const turnoverName = `${amount} ${currency}`.trim();\n\n // Show a confirmation popup using the generated turnover's name\n const confirmed = confirm(\"Are you sure you want to remove: \" + turnoverName + \"?\");\n\n // If the user confirms, remove the parent `.turnover-field` div\n if (confirmed) {\n $(this).closest('.turnover-field').remove();\n // Re-add the \"Add Turnover Here\" buttons\n addTurnoverButtons();\n }\n });\n\n // dynamic set turnover range selection\n var turnoverRanges = [\n { code: 0, low: 0, high: 0 },\n { code: 1, low: 1, high: 1000000 },\n { code: 2, low: 1000000, high: 5000000 },\n { code: 3, low: 5000000, high: 10000000 },\n { code: 4, low: 10000000, high: 20000000 },\n { code: 5, low: 20000000, high: 50000000 },\n { code: 6, low: 50000001, high: 999999999999 }\n ];\n\n // Event delegation for input fields\n $(document).on('input', 'input[name*=\"organisation[turnovers_attributes]\"][name*=\"[amount]\"]', function () {\n var turnover = parseInt($(this).val()) || 0;\n var matchingRange = turnoverRanges.find(range => turnover >= range.low && turnover < range.high);\n if (matchingRange) {\n $(this).closest('.turnover-field').find('select[name*=\"[range_code]\"]').val(matchingRange.code);\n }\n });\n});\n","$(document).ready(function() {\n $('#subscriber-activity-table').DataTable({\n processing: true,\n serverSide: false,\n columnDefs: [{ orderable: true, targets: [1, 2, 3, 4] }],\n order: [[3, \"asc\"]]\n });\n});\n","$(document).ready(function () {\n // Function to calculate the next unique index\n function getNextBankIndex() {\n let maxIndex = 0;\n\n // Find the highest existing index in the form\n $('#banks-fields input[name*=\"banks\"]:visible').each(function () {\n const match = $(this).attr('id').match(/(\\d+)/); // Extract the index\n // debugger;\n if (match && match[1]) {\n maxIndex = Math.max(maxIndex, parseInt(match[1], 10));\n }\n });\n\n return maxIndex + 1; // Return the next index\n }\n\n // Add new bank\n function addBank(beforeElement) {\n const bankIndex = getNextBankIndex();\n\n // Clone the hidden template\n const newBank = $('#bank-template').html();\n\n const updatedBank = newBank.replace(/NEW_RECORD/g, bankIndex);\n\n // Append to the banks fields container\n if (beforeElement && beforeElement.length) {\n $(beforeElement).before(updatedBank);\n } else {\n $('#banks-fields').append(updatedBank);\n }\n\n var substringMatcher = function(strs) {\n return function findMatches(q, cb) {\n var matches, substringRegex;\n\n // an array that will be populated with substring matches\n matches = [];\n\n // regex used to determine if a string contains the substring `q`\n substrRegex = new RegExp(q, 'i');\n\n // iterate through the pool of strings and for any string that\n // contains the substring `q`, add it to the `matches` array\n $.each(strs, function(i, str) {\n if (substrRegex.test(str)) {\n matches.push(str);\n }\n });\n\n cb(matches);\n };\n };\n\n var banks = [\n 'ANZ Banking Group (New Zealand) Limited',\n 'ASB Bank Limited',\n 'Bank of New Zealand',\n 'Citibank N.A.',\n 'HSBC',\n 'KiwiBank',\n 'Rabobank',\n 'TSB Bank Limited',\n 'Westpac'\n ];\n\n $('#banks-fields input[name*=\"banks\"]:visible').each(function () {\n $(this).typeahead({\n hint: true,\n highlight: true,\n minLength: 1\n },\n {\n name: 'banks',\n source: substringMatcher(banks)\n });\n });\n }\n\n // Event handler for add-bank-here button\n $(document).on('click', '.add-bank-here', function (e) {\n e.preventDefault();\n addBank($(this).closest('.bank-field').next('.bank-field'));\n });\n\n // Remove bank field\n $(document).on('click', '.remove-bank', function (e) {\n e.preventDefault();\n\n // generate a string of the bank's name from the parent element\n const bankName = $(this).closest('.bank-field').find('input[name*=\"[banks]\"]').val() || '';\n\n // don't show the popup if bankname is blank\n if (!bankName) {\n $(this).closest('.bank-field').remove();\n return;\n }\n\n // Show a confirmation popup using the generated bank's name\n const confirmed = confirm(`Are you sure you want to remove: ${bankName}?`);\n\n // If the user confirms, remove the parent `.bank-field` div\n if (confirmed) {\n $(this).closest('.bank-field').remove();\n }\n });\n\n // Remove bank-template before form submission\n $('form').on('submit', function () {\n $('#bank-template').remove();\n });\n});\n","$(document).ready(function () {\n // PARENTS\n // Function to calculate the next unique index\n function getNextParentIndex() {\n let maxIndex = 0;\n\n // Find the highest existing index in the form\n $('#parents-fields input[name*=\"parents_attributes\"]').each(function () {\n const match = $(this).attr('name').match(/\\[(\\d+)\\]/); // Extract the index\n if (match && match[1]) {\n maxIndex = Math.max(maxIndex, parseInt(match[1], 10));\n }\n });\n\n return maxIndex + 1; // Return the next index\n }\n\n // Add new parent\n $('#add-parent').on('click', function (e) {\n e.preventDefault();\n\n const parentIndex = getNextParentIndex();\n\n // Clone the hidden template\n const newParent = $('#parent-template').html();\n\n // Replace the placeholder with a unique index\n const updatedParent = newParent.replace(/NEW_RECORD/g, parentIndex);\n\n // Append to the parents fields container\n $('#parents-fields').append(updatedParent);\n });\n\n // Remove parent field\n $(document).on('click', '.remove-parent', function (e) {\n e.preventDefault();\n\n // Show a confirmation popup\n const confirmed = confirm(\"Are you sure you want to remove this parent?\");\n\n // If the user confirms, remove the parent `.parent-field` div\n if (confirmed) {\n $(this).closest('.parent-field').remove();\n }\n });\n\n // admin date helpers\n $(\".set-date\").on(\"click\", function(e) {\n e.preventDefault();\n var days = $(this).data(\"days\");\n var futureDate = new Date();\n futureDate.setDate(futureDate.getDate() + days);\n $(\"input[name$='[update_required_on]']\").val(futureDate.toISOString().split('T')[0]);\n });\n\n // Add new website\n $('#add-website').on('click', function (e) {\n e.preventDefault();\n\n // Clone the hidden template\n const newwebsite = $('#website-template').html();\n\n // Append to the websites fields container\n $('#websites-fields').append(newwebsite);\n });\n\n // Add new email\n $('#add-email').on('click', function (e) {\n e.preventDefault();\n\n // Clone the hidden template\n const newemail = $('#email-template').html();\n\n // Append to the emails fields container\n $('#emails-fields').append(newemail);\n });\n\n // Add new fax_number\n $('#add-fax_number').on('click', function (e) {\n e.preventDefault();\n\n // Clone the hidden template\n const newfax_number = $('#fax_number-template').html();\n\n // Append to the fax_numbers fields container\n $('#fax_numbers-fields').append(newfax_number);\n });\n\n // Add new phone_number\n $('#add-phone_number').on('click', function (e) {\n e.preventDefault();\n\n // Clone the hidden template\n const newphone_number = $('#phone_number-template').html();\n\n // Append to the phone_numbers fields container\n $('#phone_numbers-fields').append(newphone_number);\n });\n\n // Remove templates before form submission\n $('form').on('submit', function () {\n $('#phone_number-template').remove();\n $('#fax_number-template').remove();\n $('#email-template').remove();\n $('#website-template').remove();\n });\n\n // dynamic set emp range select\n var employeeRanges = [\n { code: 0, low: 0, high: 0 },\n { code: 1, low: 1, high: 5 },\n { code: 2, low: 6, high: 10 },\n { code: 3, low: 11, high: 20 },\n { code: 4, low: 21, high: 50 },\n { code: 5, low: 51, high: 100 },\n { code: 6, low: 101, high: 250 },\n { code: 7, low: 251, high: 500 },\n { code: 8, low: 501, high: 1000 },\n { code: 9, low: 1001, high: 5000 },\n { code: 10, low: 5001, high: 1000000 }\n ];\n\n $('#organisation_employee_count').on('input', function () {\n var count = parseInt($(this).val(), 10) || 0;\n var matchingRange = employeeRanges.find(range => count >= range.low && count <= range.high);\n if (matchingRange) {\n $('#organisation_employee_range_code').val(matchingRange.code);\n }\n });\n\n // anzsic code multiselect\n $('#organisation_anzsic_code').multiselect({\n enableFiltering: true,\n enableCaseInsensitiveFiltering: true,\n maxHeight: 200,\n buttonWidth: '100%',\n includeSelectAllOption: false,\n filterPlaceholder: 'Search ANZSIC Codes...',\n numberDisplayed: 0\n });\n\n // import and export countries multiselect\n $('#organisation_import_country_codes, #organisation_export_country_codes').multiselect({\n enableFiltering: true,\n enableCaseInsensitiveFiltering: true,\n maxHeight: 200,\n buttonWidth: '100%',\n includeSelectAllOption: false,\n filterPlaceholder: 'Search Countries...',\n numberDisplayed: 4\n });\n\n $('#organisation_region_code').multiselect({\n enableFiltering: true,\n enableCaseInsensitiveFiltering: true,\n maxHeight: 200,\n includeSelectAllOption: false,\n filterPlaceholder: 'Select region...',\n numberDisplayed: 0\n });\n\n});\n","var map = {\n\t\"./exports.js\": 163,\n\t\"./load_best_in_place.js\": 217,\n\t\"./organisations.js\": 599,\n\t\"./organisations_banks.js\": 531,\n\t\"./organisations_contacts.js\": 71,\n\t\"./organisations_directors.js\": 353,\n\t\"./organisations_members.js\": 295,\n\t\"./organisations_turnovers.js\": 434,\n\t\"./payments.js\": 13,\n\t\"./reports.js\": 483,\n\t\"./search.js\": 414,\n\t\"./subscribers.js\": 243,\n\t\"./trial_requests.js\": 257\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 802;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))"],"names":["r","$","dataTable","processing","serverSide","ajax","data","pagingType","columns","orderable","order","document","ready","addContactButtons","remove","addContactButton","prepend","each","this","after","multiselect","enableFiltering","enableCaseInsensitiveFiltering","maxHeight","buttonWidth","includeSelectAllOption","filterPlaceholder","numberDisplayed","on","e","preventDefault","beforeElement","contactIndex","maxIndex","match","attr","Math","max","parseInt","getNextContactIndex","updatedContact","html","replace","length","before","append","addContact","next","contactName","closest","find","text","val","trim","confirm","event","submit","window","ExportFieldSelection","selector","field","prop","filter","trigger","init","addEventListener","jQuery","best_in_place","today","Date","startsOn","getTime","toISOString","split","endsOn","setDate","getDate","newMember","addMember","memberName","addDirectorButtons","addDirectorButton","directorIndex","getNextDirectorIndex","updatedDirector","addDirector","directorName","focus","company_name_auto","Bloodhound","datumTokenizer","tokenizers","obj","whitespace","queryTokenizer","remote","url","wildcard","initialize","typeahead","source","display","ComboWarning","SearchDescriptionUpdater","MultiSelectBoxes","constructor","form","comboBoxes","warning","forEach","comboBox","toggleWarning","setTimeout","warning_visible","map","Boolean","toggle","updateSearchDescription","activeFilters","excludedFields","includes","fieldIsActive","is","fieldDesc","push","Set","join","boxes","box","reset","click","tab","anzsicCode","option","addTurnoverButtons","addTurnoverButton","turnoverIndex","getNextTurnoverIndex","updatedTurnover","addTurnover","turnoverName","turnoverRanges","code","low","high","turnover","matchingRange","range","DataTable","columnDefs","targets","bankIndex","getNextBankIndex","updatedBank","banks","strs","hint","highlight","minLength","name","q","cb","matches","substrRegex","RegExp","i","str","test","addBank","bankName","parentIndex","getNextParentIndex","updatedParent","days","futureDate","newwebsite","newemail","newfax_number","newphone_number","employeeRanges","count","webpackContext","req","id","webpackContextResolve","__webpack_require__","o","Error","keys","Object","resolve","module","exports","__webpack_module_cache__","moduleId","cachedModule","undefined","__webpack_modules__","prototype","hasOwnProperty","call"],"sourceRoot":""}