PageSourceSearch

https://www.kester.com/DesktopModules/ForemostMedia/FM_Distributor/Scripts/application.js?cdv=363

js kester.com collected 2026-09-24 21:22:06 UTC 9,705 bytes, 1 lines download raw bytes

1function DistributorViewModel(e){var t=this;function o(o){t.isLoading(!0);var s={type:t.selectedType()<0?"":t.selectedType(),country:void 0===t.selectedState()||parseInt(t.selectedState())<0?void 0===t.selectedCountry()||parseInt(t.selectedCountry())<0?"":t.selectedCountry():"US",state:void 0===t.selectedState||parseInt(t.selectedState())<0?"":t.selectedState(),portal:e.PortalId,module:e.ModuleId,pagesize:e.PageSize,usfirst:e.UsFirst,company:t.selectedCompany()};s.pagenum=o===t?1:o,t.selectedPage()!==s.pagenum&&t.selectedPage(s.pagenum);var i=s.type,n=t.totalPages();fmDistributor.api.searchLocations(s,(function(e){if(i!==e.Type&&""!==$.trim(i)&&(t.selectedType(e.Type.toString()),t.disableToast||toastr.warning("Searching default category","No results found")),t.locations(e.Locations),t.totalPages(e.Pages),n!==t.totalPages()){t.pages([]);for(var o=1;o<=t.totalPages();o++)t.pages.push(o)}}),(function(){t.showPager(t.totalPages()>1),t.isLoading(!1)}))}function s(){$.each(JSON.parse(e.TypeOptions),(function(e,o){t.types.push(new Option(o.Name,o.Id))})),$.each(JSON.parse(e.StateOptions),(function(e,o){t.states.push(new Option(o.Text,o.Value))})),$.each(JSON.parse(e.CountryOptions),(function(e,o){t.countries.push(new Option(o.Text,o.Value))})),t.selectedType(e.QueryType),e.RestrictedType>0&&(t.selectedType(e.RestrictedType),t.restrictType(!0))}t.disableToast=e.DisableToast,t.isLoading=ko.observable(!1),t.selectedCompany=ko.observable(""),t.selectedType=ko.observable(),t.selectedCountry=ko.observable(),t.selectedState=ko.observable(),t.pagenum=ko.observable(1),t.locations=ko.observableArray(),t.btnText=e.BtnText,t.restrictType=ko.observable(!1),t.types=ko.observableArray(),t.typeList=e.TypeList,t.states=ko.observableArray(),t.stateList=e.StateList,t.countries=ko.observableArray(),t.countryList=e.CountryList,t.isEditable=e.IsEditable,t.pageNumber=ko.observable(),t.pages=ko.observableArray(),t.selectedPage=ko.observable(),t.showPager=ko.observable(!1),t.totalPages=ko.observable(0),t.init=function(o){void 0!==o&&void 0!==o.elementId&&(s(),ko.applyBindings(t,document.getElementById(o.elementId),{}),e.DisplayOnLoad&&t.searchLocations(1))},t.searchLocations=o,t.populateDropdowns=s,t.selectedPage.subscribe((function(e){t.isLoading()||o(e)})),t.selectedState.subscribe((function(e){t.isLoading()||(t.isLoading(!0),t.selectedCountry("-1"),t.isLoading(!1))})),t.selectedCountry.subscribe((function(e){t.isLoading()||(t.isLoading(!0),t.selectedState("-1"),t.isLoading(!1))}))}!function(e){e(["jquery"],(function(e){return function(){var t,o,s,i=0,n="error",a="info",r="success",c="warning",l={clear:function(o,s){var i=g();t||u(i);d(o,i,s)||function(o){for(var s=t.children(),i=s.length-1;i>=0;i--)d(e(s[i]),o)}(i)},remove:function(o){var s=g();t||u(s);if(o&&0===e(":focus",o).length)return void m(o);t.children().length&&t.remove()},error:function(e,t,o){return f({type:n,iconClass:g().iconClasses.error,message:e,optionsOverride:o,title:t})},getContainer:u,info:function(e,t,o){return f({type:a,iconClass:g().iconClasses.info,message:e,optionsOverride:o,title:t})},options:{},subscribe:function(e){o=e},success:function(e,t,o){return f({type:r,iconClass:g().iconClasses.success,message:e,optionsOverride:o,title:t})},version:"2.1.4",warning:function(e,t,o){return f({type:c,iconClass:g().iconClasses.warning,message:e,optionsOverride:o,title:t})}};return l;function u(o,s){return o||(o=g()),(t=e("#"+o.containerId)).length||s&&(t=function(o){return t=e("<div/>").attr("id",o.containerId).addClass(o.positionClass),t.appendTo(e(o.target)),t}(o)),t}function d(t,o,s){var i=!(!s||!s.force)&&s.force;return!(!t||!i&&0!==e(":focus",t).length)&&(t[o.hideMethod]({duration:o.hideDuration,easing:o.hideEasing,complete:function(){m(t)}}),!0)}function p(e){o&&o(e)}function f(o){var n=g(),a=o.iconClass||n.iconClass;if(void 0!==o.optionsOverride&&(n=e.extend(n,o.optionsOverride),a=o.optionsOverride.iconClass||a),!function(e,t){if(e.preventDuplicates){if(t.message===s)return!0;s=t.message}return!1}(n,o)){i++,t=u(n,!0);var r=null,c=e("<div/>"),l=e("<div/>"),d=e("<div/>"),f=e("<div/>"),v=e(n.closeHtml),b={intervalId:null,hideEta:null,maxHideTime:null},h={toastId:i,state:"visible",startTime:new Date,options:n,map:o};return o.iconClass&&c.addClass(n.toastClass).addClass(a),function(){if(o.title){var e=o.title;n.escapeHtml&&(e=y(o.title)),l.append(e).addClass(n.titleClass),c.append(l)}}(),function(){if(o.message){var e=o.message;n.escapeHtml&&(e=y(o.message)),d.append(e).addClass(n.messageClass),c.append(d)}}(),n.closeButton&&(v.addClass(n.closeClass).attr("role","button"),c.prepend(v)),n.progressBar&&(f.addClass(n.progressClass),c.prepend(f)),n.rtl&&c.addClass("rtl"),n.newestOnTop?t.prepend(c):t.append(c),function(){var e="";switch(o.iconClass){case"toast-success":case"toast-info":e="polite";break;default:e="assertive"}c.attr("aria-live",e)}
1(),c.hide(),c[n.showMethod]({duration:n.showDuration,easing:n.showEasing,complete:n.onShown}),n.timeOut>0&&(r=setTimeout(C,n.timeOut),b.maxHideTime=parseFloat(n.timeOut),b.hideEta=(new Date).getTime()+b.maxHideTime,n.progressBar&&(b.intervalId=setInterval(D,10))),function(){n.closeOnHover&&c.hover(T,w);!n.onclick&&n.tapToDismiss&&c.click(C);n.closeButton&&v&&v.click((function(e){e.stopPropagation?e.stopPropagation():void 0!==e.cancelBubble&&!0!==e.cancelBubble&&(e.cancelBubble=!0),n.onCloseClick&&n.onCloseClick(e),C(!0)}));n.onclick&&c.click((function(e){n.onclick(e),C()}))}(),p(h),n.debug&&console&&console.log(h),c}function y(e){return null==e&&(e=""),e.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function C(t){var o=t&&!1!==n.closeMethod?n.closeMethod:n.hideMethod,s=t&&!1!==n.closeDuration?n.closeDuration:n.hideDuration,i=t&&!1!==n.closeEasing?n.closeEasing:n.hideEasing;if(!e(":focus",c).length||t)return clearTimeout(b.intervalId),c[o]({duration:s,easing:i,complete:function(){m(c),clearTimeout(r),n.onHidden&&"hidden"!==h.state&&n.onHidden(),h.state="hidden",h.endTime=new Date,p(h)}})}function w(){(n.timeOut>0||n.extendedTimeOut>0)&&(r=setTimeout(C,n.extendedTimeOut),b.maxHideTime=parseFloat(n.extendedTimeOut),b.hideEta=(new Date).getTime()+b.maxHideTime)}function T(){clearTimeout(r),b.hideEta=0,c.stop(!0,!0)[n.showMethod]({duration:n.showDuration,easing:n.showEasing})}function D(){var e=(b.hideEta-(new Date).getTime())/b.maxHideTime*100;f.width(e+"%")}}function g(){return e.extend({},{tapToDismiss:!0,toastClass:"toast",containerId:"toast-container",debug:!1,showMethod:"fadeIn",showDuration:300,showEasing:"swing",onShown:void 0,hideMethod:"fadeOut",hideDuration:1e3,hideEasing:"swing",onHidden:void 0,closeMethod:!1,closeDuration:!1,closeEasing:!1,closeOnHover:!0,extendedTimeOut:1e3,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},iconClass:"toast-info",positionClass:"toast-top-right",timeOut:5e3,titleClass:"toast-title",messageClass:"toast-message",escapeHtml:!1,target:"body",closeHtml:'<button type="button">&times;</button>',closeClass:"toast-close-button",newestOnTop:!0,preventDuplicates:!1,progressBar:!1,progressClass:"toast-progress",rtl:!1},l.options)}function m(e){t||(t=u()),e.is(":visible")||(e.remove(),e=null,0===t.children().length&&(t.remove(),s=void 0))}}()}))}("function"==typeof define&&define.amd?define:function(e,t){"undefined"!=typeof module&&module.exports?module.exports=t(require("jquery")):window.toastr=t(window.jQuery)}),function(e){"undefined"==typeof fmDistributor&&(fmDistributor={}),fmDistributor.api={searchLocations:function(t,o,s){!function(t,o,s,i,n){"function"==typeof s&&(n=i,i=s,s={});e.ajax({type:t,url:fmDistributor.baseServicepath+o,data:s,beforeSend:fmDistributor.serviceFramework.setModuleHeaders}).done((function(e){"function"==typeof i&&i(e)})).always((function(e){"function"==typeof n&&n(e)}))}("GET","Locations",t,o,s)},savePriorityGroups:function(t,o,s){!function(t,o,s,i,n){"function"==typeof s&&(n=i,i=s,s={});e.ajax({type:t,url:fmDistributor.baseServicepath+o,data:s,beforeSend:fmDistributor.serviceFramework.setModuleHeaders,dataType:"json",contentType:"application/json; charset=utf-8"}).done((function(e){"function"==typeof i&&i(e)})).always((function(e){"function"==typeof n&&n(e)}))}("POST","PriorityGroup",t,o,s)}},fmDistributor.serviceFramework=e.ServicesFramework(fmDistributor.moduleId),fmDistributor.baseServicepath=fmDistributor.serviceFramework.getServiceRoot("ForemostMedia/FM_Distributor")}(jQuery),jQuery,"undefined"==typeof fmDistributor&&(fmDistributor={}),$(document).ajaxError((function(e,t,o){var s,i=JSON.parse(t.responseText);void 0!==i.Url&&(s=function(){window.location=i.Url}),fmDistributor.alertError(i.ExceptionMessage||i.Message,void 0,s)})),fmDistributor.alertError=function(e,t,o){fmDistributor.alert(e,t,"danger",o)},fmDistributor.alertSuccess=function(e,t,o){fmDistributor.alert(e,t,"success",o)},fmDistributor.alert=function(e,t,o,s){var i="";switch(o){case"success":i="Success!";break;case"danger":i="There was an error!"}(void 0===t||t.length<1)&&(t=e,e=void 0),$.dnnAlert({title:e||i,text:t,callback:s,dialogClass:"dnnFormPopup dnnClear alert alert-"+(o||"default")})},fmDistributor.sort={generic:function(e){return function(t,o){if(void 0===t)return 0;var s="function"==typeof t[e]?t[e]():t[e],i="function"==typeof o[e]?o[e]():o[e];return void 0===s?0:void 0===i||(s=isNaN(s)?s.toLowerCase():parseFloat(s,10))>(i=isNaN(i)?i.toLowerCase():parseFloat(i,10))?1:-1}}},toastr.options={closeButton:!0,debug:!1,newestOnTop:!0,positionClass:"toast-top-right",preventDuplicates:!1,onclick:null,showDuration:300,hideDuration:1e3,timeOut:4e3,progressBar:!0};var Option=function(e,t){this.key=e,this.value=t};

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.