{"version":3,"sources":["Apfco.js","IFormFile.js","ViewHomeEntryForm.js","ViewSharedLayoutPrimary.js"],"names":["Apfco","[object Object]","key","value","url","window","location","href","hash","re","RegExp","test","replace","split","separator","indexOf","milliseconds","Promise","resolve","setTimeout","inputString","findString","replaceString","IFormFile","target","thisObj","this","elLabelWrapper","parentElement","elLabelSpan","getElementsByTagName","classList","add","contains","style","lineHeight","offsetHeight","toString","$","on","filename","files","name","pop","length","substring","e","innerHTML","console","log","IFormFileList","elementsByClass","document","getElementsByClassName","i","push","item","ViewHomeEntryForm","GLOBALROOTURL","sleep","ViewHomeEntryFormList","body","ViewSharedLayoutPrimary","disableFormButtonsOnSubmit","wrapTrademarkSymbolsWithSuperscriptTag","find","each","submit","event","attr","prop","currentForm","click","type","val","insertBefore","children","first","regexp","contents","filter","nodeType","nodeValue","replaceWith","ViewSharedLayoutPrimaryList"],"mappings":"AAKA,MAAAA,MAEAC,yBAAAC,EAAAC,EAAAC,GACAA,IAAAA,EAAAC,OAAAC,SAAAC,MACA,IACAC,EADAC,EAAA,IAAAC,OAAA,SAAAR,EAAA,kBAAA,MAGA,GAAAO,EAAAE,KAAAP,GACA,OAAA,MAAAD,EACAC,EAAAQ,QAAAH,EAAA,KAAAP,EAAA,IAAAC,EAAA,SAEAK,EAAAJ,EAAAS,MAAA,KACAT,EAAAI,EAAA,GAAAI,QAAAH,EAAA,QAAAG,QAAA,UAAA,SACA,IAAAJ,EAAA,IAAA,OAAAA,EAAA,KACAJ,GAAA,IAAAI,EAAA,IACAJ,GAIA,GAAA,MAAAD,EAAA,CACA,IAAAW,GAAA,IAAAV,EAAAW,QAAA,KAAA,IAAA,IAKA,OAJAP,EAAAJ,EAAAS,MAAA,KACAT,EAAAI,EAAA,GAAAM,EAAAZ,EAAA,IAAAC,OACA,IAAAK,EAAA,IAAA,OAAAA,EAAA,KACAJ,GAAA,IAAAI,EAAA,IACAJ,EAGA,OAAAA,EAIAH,sCAAAG,GACA,OAAAA,EAAAS,MAAA,Q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a,EAAAC,SAAAC,uBAAA,iBACA,IAAA,IAAAC,EAAA,EAAAA,EAAAH,EAAAP,OAAAU,IACA8B,4BAAA7B,KAAA,IAAAO,wBAAAX,EAAAK,KAAAF","file":"site.min.js","sourcesContent":["\r\n\r\n//NOTE: The layout should have the constant GLOBALROOTURL defined - Used for transferring data from server-side to client side via APIs\r\n\r\n\r\nclass Apfco {\r\n\r\n static updateQueryString(key, value, url) { //Update query string parameters - Taken from here: https://stackoverflow.com/questions/5999118/add-or-update-query-string-parameter\r\n if (!url) url = window.location.href;\r\n var re = new RegExp(\"([?&])\" + key + \"=.*?(&|#|$)(.*)\", \"gi\"),\r\n hash;\r\n\r\n if (re.test(url)) {\r\n if (typeof value !== 'undefined' && value !== null)\r\n return url.replace(re, '$1' + key + \"=\" + value + '$2$3');\r\n else {\r\n hash = url.split('#');\r\n url = hash[0].replace(re, '$1$3').replace(/(&|\\?)$/, '');\r\n if (typeof hash[1] !== 'undefined' && hash[1] !== null)\r\n url += '#' + hash[1];\r\n return url;\r\n }\r\n }\r\n else {\r\n if (typeof value !== 'undefined' && value !== null) {\r\n var separator = url.indexOf('?') !== -1 ? '&' : '?';\r\n hash = url.split('#');\r\n url = hash[0] + separator + key + '=' + value;\r\n if (typeof hash[1] !== 'undefined' && hash[1] !== null)\r\n url += '#' + hash[1];\r\n return url;\r\n }\r\n else\r\n return url;\r\n }\r\n }\r\n\r\n static stripQueryStringAndHashFromUrl(url) { //Example, changes http://localhost:61222/?test=123#NavContent to http://localhost:61222/ - From https://stackoverflow.com/questions/2540969/remove-querystring-from-url\r\n return url.split(/[?#]/)[0];\r\n }\r\n\r\n static sleep(milliseconds) { //Use in async functions to insert a delay before continuing processing. Example: await Apfco.Sleep(2000);\r\n return new Promise(function (resolve) {\r\n setTimeout(resolve, milliseconds);\r\n });\r\n }\r\n\r\n static replaceAll(inputString, findString, replaceString) { //Replace all instances of a value in a string - native string.replace() only works on first instance\r\n let inputStringRegEscaped = inputString.replace(/([.*+?^=!:${}()|\\[\\]\\/\\\\])/g, \"\\\\$1\");\r\n return inputString.replace(new RegExp(findString, 'g'), replaceString);\r\n }\r\n\r\n}","class IFormFile {\r\n\r\n //Variables\r\n target;\r\n elLabelWrapper;\r\n elLabelSpan;\r\n\r\n //Methods\r\n constructor(target) {\r\n let thisObj = this;\r\n\r\n //Assign elements\r\n this.target = target;\r\n this.elLabelWrapper = target.parentElement;\r\n this.elLabelSpan = this.elLabelWrapper.getElementsByTagName('span')[0];\r\n\r\n\r\n //Add classes and adjust styles\r\n this.elLabelWrapper.classList.add('IFormFileWrapper');\r\n if (this.target.classList.contains('input-validation-error')) { //ASP.Net MVC - If a server-side validation error class was found on the ').attr({ //Create a hidden property for the clicked button to submit along with the form. Solves the issue with disabled buttons not getting submitted. This way you can find which button was clicked\r\n type: 'hidden',\r\n name: $(this).attr('name'),\r\n value: $(this).val()\r\n }).insertBefore($(currentForm).children().first()); //Append to the start of the current form, instead of next to the button itself or the end of the form. Otherwise it may mess with any last-child CSS selectors\r\n });\r\n }\r\n });\r\n });\r\n }\r\n\r\n wrapTrademarkSymbolsWithSuperscriptTag() {\r\n //Wrap all registered trademark symbols with , as it applies to almost every design mockup we receive - see here https://stackoverflow.com/questions/19364581/adding-superscript-sup-tags-around-all-trademark-and-registered-trademark-symb\r\n let regexp = /[\\xAE]/;\r\n $('body :not(script,sup)').contents().filter(function () {\r\n return this.nodeType === 3 && (regexp.test(this.nodeValue));\r\n }).replaceWith(function () {\r\n return this.nodeValue.replace(regexp, '$&');\r\n });\r\n $('body :not(script,sup)').contents().filter(function () {\r\n return this.nodeType === 3;\r\n }).replaceWith(function () {\r\n return this.nodeValue.replace(/[™®©]/g, '$&');\r\n });\r\n }\r\n}\r\n\r\n//On page load, take all found elements with the classname and create objects for them to initialize\r\nlet ViewSharedLayoutPrimaryList = [];\r\n$(function () {\r\n let elementsByClass = document.getElementsByClassName(\"LayoutPrimary\");\r\n for (let i = 0; i < elementsByClass.length; i++) {\r\n ViewSharedLayoutPrimaryList.push(new ViewSharedLayoutPrimary(elementsByClass.item(i)));\r\n };\r\n});"]}