PageSourceSearch

https://www.marhabaservices.com/on/demandware.static/Sites-dnata-U…/js/app/global/OrderNumberInput.js

js marhabaservices.com collected 2026-10-02 11:28:37 UTC 4,266 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkapp_dnata=self.webpackChunkapp_dnata||[]).push([[972],{51704:function(t,e,n){n.r(e),n.d(e,{default:function(){return h}});var o=n(70491),r=n(60078),i=n(20058);function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function u(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,l(o.key),o)}}function l(t){var e=function(t,e){if("object"!=s(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e||"default");if("object"!=s(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==s(e)?e:e+""}function c(t,e,n){return e=f(e),function(t,e){if(e&&("object"==s(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,a()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}function a(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(a=function(){return!!t})()}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}var h=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),c(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&p(t,e)}(e,t),n=e,o=[{key:"initCache",value:function(){this.selectors.input=this.element.querySelector("input"),this.selectors.tooltip=this.element.querySelector(".js-tooltip"),this.mask=this.selectors.input.placeholder,this.maxLength=10}},{key:"initState",value:function(){var t,e,n,o=this;this.tooltip=new r.default(this.selectors.tooltip,{offset:"40px, 0",title:this.selectors.tooltip.dataset.tooltip,trigger:"hover"}),this.throttledShowTooltip=(t=function(){o.showTooltip()},e=2e3,n=0,function(){var o=Date.now();if(o-n>=e){n=o;for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];t.apply(this,i)}}),window.OrderNumberFieldConfig||(window.OrderNumberFieldConfig={validation:!0})}},{key:"bindEvents",value:function(){(0,i.on)("input",this.selectors.input,this.onInput.bind(this)),(0,i.on)("focus",this.selectors.input,this.onFocus.bind(this)),(0,i.on)("blur",this.selectors.input,this.onBlur.bind(this))}},{key:"showTooltip",value:function(){var t=this;this.tooltip.show(),setTimeout(function(){t.tooltip.hide()},2e3)}},{key:"onBlur",value:function(){var t=this.selectors.input.value;t&&t!==this.mask||(this.selectors.input.value="")}},{key:"onFocus",value:function(){var t=this.selectors.input.value,e=t.indexOf("X"),n=e>-1?e:t.length;this.selectors.input.setSelectionRange(n,n),this.onInput()}},{key:"onInput",value:function(){var t;if(null!==(t=window.OrderNumberFieldConfig)&&void 0!==t&&t.validation){var e=this.selectors.input.value.toUpperCase().substring(0,this.selectors.input.selectionStart);if(e&&e!==this.mask){/[^IN0-9]/.test(e)&&this.throttledShowTooltip(),e=e.replace(/[^IN0-9]/g,"");for(var n="",o=0;o<e.length&&n.length<this.maxLength;o++){var r=e[o],i=n.length;0===i?"I"===r&&(n+=r):1===i?"N"===r&&(n+=r):2===i||3===i?"0"===r&&(n+=r):i>=4&&/\d/.test(r)&&(n+=r)}/^\d+$/.test(e)&&0===n.length&&(n="IN00"+e);var s=n.length,u=this.mask.substring(n.length);this.selectors.input.value=(n+u).substring(0,this.maxLength),this.selectors.input.setSelectionRange(s,s)}else this.selectors.input.value=""}}}],o&&u(n.prototype,o),s&&u(n,s),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o,s}(o.A)}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.