{"version":3,"sources":["wwwroot/js/custom.bootstrap.js"],"names":["$","extend","fn","modal","Constructor","prototype","focus","this","isShown","fe","de","$element","find","length","onShow","dbc","db","data","val","attr","selerix","globals","guid","zi","parseInt","css","setTimeout","not","last","addClass","onShown","dcb","body","hasClass","onHide","hide","each","player","pause","onHidden","remove"],"mappings":"AASIA,EAAEC,OAAOD,EAAEE,GAAGC,MAAMC,YAAYC,UAAW,CACvCC,MAAO,WACH,GAAIC,KAAKC,QAAS,CACd,IAAwBC,EAApBC,EAAKH,KAAKI,SAKd,OAJAF,EAAKC,EAAGE,KAAK,iBACNC,QAAU,IAAGJ,EAAKC,EAAGE,KAAK,cAC7BH,EAAGI,QAAU,IAAGJ,EAAKC,GACzBD,EAAGH,QACIG,EAEX,OAAO,GAEXK,OAAQ,WACJ,IAAIJ,EAAKH,KAAKI,SACVI,EAAMf,EAAE,qBACRgB,EAAKN,EAAGE,KAAK,aAEjBF,EAAGO,KAAK,KAAMF,EAAIG,OAClBR,EAAGO,KAAK,KAAMjB,EAAE,WAEZgB,EAAGH,SACEG,EAAGG,KAAK,OAAOH,EAAGG,KAAK,KAAM,kBAAoBC,QAAQC,QAAQC,QACtEP,EAAIG,IAAIF,EAAGG,KAAK,QAGpB,IAAII,EAAKC,SAASd,EAAGe,IAAI,YAAe,GAAKzB,EAAE,kBAAkBa,OACjEH,EAAGe,IAAI,UAAWF,GAClBG,WAAW,WACP1B,EAAE,mBAAmB2B,IAAI,gBAAgBC,OAAOH,IAAI,UAAWF,EAAK,GAAGM,SAAS,gBACjF,IAEPC,QAAS,WACL,IAAIC,EAAMxB,KAAKI,SAASM,KAAK,OAEzBe,EAAOhC,EAAE,QACe,EAAxBA,EAAE,aAAaa,SAAemB,EAAKC,SAAS,eAC5CD,EAAKH,SAAS,cAGlBtB,KAAKD,QACc,mBAARyB,GAAsBA,KAErCG,OAAQ,WACJ,IAAIxB,EAAKH,KAAKI,SAEdX,EAAE,qBAAqBkB,IAAIR,EAAGO,KAAK,OAC/BP,GAAMA,EAAGO,KAAK,OAAgC,EAAvBP,EAAGO,KAAK,MAAMJ,QAAYH,EAAGO,KAAK,MAAMX,QACnEN,EAAE,uBAAuBmC,OAEzBzB,EAAGE,KAAK,SAASwB,KAAK,WACd7B,KAAK8B,QAAU9B,KAAK8B,OAAOC,WAGvCC,SAAU,WACN,IAAI7B,EAAKH,KAAKI,SACVD,EAAGO,KAAK,SAASP,EAAG8B,SAC6B,EAAjDxC,EAAE,QAAQY,KAAK,yBAAyBC,QAAcb,EAAE,QAAQ6B,SAAS","file":"custom.bootstrap.min.js","sourcesContent":["/*!\r\n * Copyright 2016, Selerix Systems, Inc. All Rights Reserved\r\n * This is unpublished proprietary source code of Selerix, Inc. The\r\n * copyright notice above does not evidence any actual or intended\r\n * publication of such source code.\r\n */\r\n\r\n// extend Bootstrap Modal functions\r\n(function () {\r\n $.extend($.fn.modal.Constructor.prototype, {\r\n focus: function () {\r\n if (this.isShown) {\r\n var de = this.$element, fe;\r\n fe = de.find('.modal-focus');\r\n if (fe.length <= 0) fe = de.find('.btn-main');\r\n if (fe.length <= 0) fe = de;\r\n fe.focus();\r\n return fe;\r\n }\r\n return false;\r\n },\r\n onShow: function () {\r\n var de = this.$element,\r\n dbc = $('#gDefaultButtonID'),\r\n db = de.find('.btn-main');\r\n\r\n de.data('pd', dbc.val());\r\n de.data('pf', $(':focus'));\r\n\r\n if (db.length) { \r\n if (!db.attr('id')) db.attr('id', 'default_button_' + selerix.globals.guid());\r\n dbc.val(db.attr('id'));\r\n }\r\n\r\n var zi = parseInt(de.css('z-index')) + (10 * $('.modal:visible').length);\r\n de.css('z-index', zi);\r\n setTimeout(function () {\r\n $('.modal-backdrop').not('.modal-stack').last().css('z-index', zi - 1).addClass('modal-stack');\r\n }, 0);\r\n },\r\n onShown: function () {\r\n var dcb = this.$element.data('dcb');\r\n\r\n var body = $('body');\r\n if ($('.modal.in').length > 0 && !body.hasClass('modal-open')) {\r\n body.addClass('modal-open');\r\n }\r\n\r\n this.focus();\r\n if (typeof dcb === 'function') { dcb(); }\r\n },\r\n onHide: function () {\r\n var de = this.$element;\r\n\r\n $('#gDefaultButtonID').val(de.data('pd'));\r\n if (de && de.data('pf') && de.data('pf').length > 0) de.data('pf').focus();\r\n $('#calendar_container').hide();\r\n\r\n de.find('video').each(function () {\r\n if (this.player) { this.player.pause(); }\r\n });\r\n },\r\n onHidden: function () {\r\n var de = this.$element;\r\n if (de.data('temp')) de.remove();\r\n if ($('body').find('.modal-dialog:visible').length > 0) { $('body').addClass('modal-open'); } // bootstrap 3.3.6 bugfix for stacked modals\r\n }\r\n });\r\n})();"]}