/*! Ideal Postcodes jQuery Plugin - v3.0.8 - 2020-01-29 * https://github.com/ideal-postcodes/jquery.postcodes 2020 Ideal Postcodes; Licensed MIT */ !function(e){"use strict";function t(t){this.config={},e.extend(this,r),t&&e.extend(this,t);var o={};for(var s in this.output_fields)void 0!==this.output_fields[s]&&(o[s]=e(this.output_fields[s]));this.$output_fields=o}var o=[],s={},r={api_key:"",output_fields:{line_1:"#line_1",line_2:"#line_2",line_3:"#line_3",post_town:"#post_town",postcode:"#postcode"},endpoint:"https://api.ideal-postcodes.co.uk/v1",input_label:"Please enter your postcode",placeholder_label:"",input_muted_style:"color:#CBCBCB;",input_class:"",input_id:"idpc_input",button_id:"idpc_button",button_label:"Find my Address",button_class:"",button_disabled_message:"Looking up postcode...",dropdown_id:"idpc_dropdown",dropdown_select_message:"Please select your address",dropdown_class:"",error_message_id:"idpc_error_message",error_message_invalid_postcode:"Please check your postcode, it seems to be incorrect",error_message_not_found:"Your postcode could not be found. Please type in your address",error_message_address_not_found:"We could not find a match for your address. Please type in your address",error_message_default:"Sorry, we weren't able to get the address you were looking for. Please type your address manually",error_message_class:"",address_search:!1,last_lookup:"",disable_interval:1e3,debug_mode:!1,check_key:!1,remove_organisation:!1,licensee:null,address_formatters:{postcode_search:function(e){var t=[e.line_1];return""!==e.line_2&&t.push(e.line_2),t.join(" ")},address_search:function(e){var t=[e.line_1];return""!==e.line_2&&t.push(e.line_2),t.push(e.post_town),t.push(e.postcode_outward),t.join(", ")}}},n=function(e){return 0!==e.organisation_name.length&&e.line_1===e.organisation_name&&(e.line_1=e.line_2,e.line_2=e.line_3,e.line_3=""),e};t.prototype.setupPostcodeInput=function(e){this.$context=e,this.setupInputField(),this.setupLookupButton()},t.prototype.setupInputField=function(){var t=this;return e(this.input).length?this.$input=e(this.input).first():this.$input=e("",{type:"text",id:this.input_id,value:this.input_label,placeholder:this.placeholder_label}).appendTo(this.$context).addClass(this.input_class).val(this.input_label).attr("style",this.input_muted_style).submit(function(){return!1}).keypress(function(e){if(13===e.which)return t.$button.trigger("click"),e.preventDefault(),!1}).focus(function(){t.$input.removeAttr("style").val("")}).blur(function(){t.$input.val()||(t.$input.val(t.input_label),t.$input.attr("style",t.input_muted_style))}),this.$input},t.prototype.setupLookupButton=function(){var t=this;return e(t.button).length?t.$button=e(t.button).first():t.$button=e("