function scrollToTop(){$("html, body").animate({scrollTop:$("div.page").offset().top},300)}function scrollToSchedule(){window.location.pathname!=="/"?(window.location.href="/",setTimeout(function(){$("html, body").animate({scrollTop:$("#schedule").offset().top-topOffSet},300)},250)):$("html, body").animate({scrollTop:$("#schedule").offset().top-topOffSet},300)}function scrollToFullSchedule(){$("html, body").animate({scrollTop:$("#fullschedule").offset().top-topOffSet},300)}function scrollToAbout(){$("html, body").animate({scrollTop:$("#about").offset().top-topOffSet},300)}function scrollToAbout2(){$("html, body").animate({scrollTop:$("#about").offset().top-topOffSet},300)}function scrollToRegistration(){$("html, body").animate({scrollTop:$("#registration").offset().top-topOffSet},300)}function scrollToBooking(){$("html, body").animate({scrollTop:$("#booking").offset().top-topOffSet},300)}function scrollToFeatures(){$("html, body").animate({scrollTop:$("#features").offset().top-topOffSet},300)}function scrollToFaq(){$("html, body").animate({scrollTop:$("#faq").offset().top-topOffSet},300)}function scrollToProposal(){$("html, body").animate({scrollTop:$("#proposal").offset().top-topOffSet},300)}function scrollToWorkshops(){setTimeout(function(){$("html, body").animate({scrollTop:$("#workshops").offset().top-topOffSet},300)},200)}function scrollToIntro(){setTimeout(function(){$("html, body").animate({scrollTop:$("#intro").offset().top-topOffSet},300)},200)}function scrollToAgenda(){$("html, body").animate({scrollTop:$("#agenda").offset().top-topOffSet},300)}function scrollToPricing(){$("html, body").animate({scrollTop:$("#pricing").offset().top-topOffSet},300)}function scrollToDiv(n){$("html, body").animate({scrollTop:$(n).offset().top-topOffSet},300)}function showMoreSpeakers(){$("#bottomSpeakers").slideToggle("slow");$("#showMoreButton").hide()}function showSpeakerDetails(n,t,i,r,u,f){$(n).is(":visible")&&($(n).hide(),$(t).show());$(i).is(":hidden")&&($(i).slideToggle("slow"),$(r).hide(),$(u).hide(),$(f).hide())}function showFundDetails(n,t,i,r,u,f,e,o){$(n).is(":visible")&&($(n).hide(),$(t).show());$(i).is(":hidden")&&($(i).slideToggle("slow"),$(r).hide(),$(u).hide(),$(f).hide(),$(e).hide(),$(o).hide())}function handleTopNavAnimation(){var n=$(window).scrollTop();n>10?($("#site-nav").addClass("navbar-solid"),$("#rightItems  > li > a").css("color","#fff"),$(".videobutton").hide()):($("#site-nav").removeClass("navbar-solid"),window.location.pathname==="/"&&($("#rightItems  > li > a").css("color","#000"),$(".videobutton").show()))}function getUrlParameter(n){for(var u=window.location.search.substring(1),r=u.split("&"),i,t=0;t<r.length;t++)if(i=r[t].split("="),i[0]==n)return i[1]}function checkIfDebug(){return location.hostname==="localhost"||location.hostname==="127.0.0.1"?!0:!1}function loadMasks(){$(".no-spaces").keyup(function(n){if(n.which===32){var t=$(this).val();t=t.replace(/\s/g,"");$(this).val(t)}}).blur(function(){var n=$(this).val();n=n.replace(/\s/g,"");$(this).val(n)})}function roundUp(n,t){return t=Math.pow(10,t),Math.ceil(n*t)/t}function roundMultiplier(n,t){return t=t||1,Math.round(n/t)*t}var topOffSet,ImageButton;(function(){"use strict";angular.module("common.core",["ngRoute","ngCookies","base64","angularFileUpload","angularValidator","angucomplete-alt"])})(),function(){"use strict";angular.module("common.ui",["ui.bootstrap","chieffancypants.loadingBar","ngTable","ngAnimate","ngMask"])}(),function(){"use strict";angular.module("common.social",["720kb.socialshare"])}(),function(){"use strict";angular.module("common.filters",[]).filter("makeUppercase",function(){return function(n){return n.toUpperCase()}}).filter("urlEncode",function(){return function(n){var t=n;return t=t.replace(/\//g," "),t=t.replace(/\\/g," "),t=t.replace(/-/g," "),t=t.replace(/[^\w\s]/gi,""),t=t.replace(/ +(?= )/g,""),t=t.replace(/\s/g,"-"),t=t.toLowerCase(),encodeURIComponent(t)}}).filter("alphaNumeric",function(){return function(n){var t=n;return t.replace(/[^\w\s]/gi,"")}}).filter("sqlToJsDate",function(){return function(n){var t=new Date(n.replace("T"," "));return t.getFullYear()+"/"+t.getMonth()+"/"+t.getDay()}}).filter("lineBreaks",function(){return function(n){return n.replace(/\n/g,"<br />")}}).filter("percentage",["$filter",function(n){return function(t,i){return n("number")(t*100,i)+"%"}}]).filter("btcToUsd",["$filter",function(){return function(n,t){var i=roundUp(t+t*.03,0);return roundMultiplier(roundUp(n*i,0),25)}}]).filter("usdToBtc",["$filter",function(){return function(n,t){var i=roundUp(t+t*1,0);return roundUp(n/i,4)}}]).filter("numberMonth",function(){return function(n){return n==1?"January":n==2?"Febuary":n==3?"March":n==4?"April":n==5?"May":n==6?"June":n==7?"July":n==8?"August":n==9?"September":n==10?"October":n==11?"November":n==12?"December":void 0}}).filter("thumb",function(){return function(n){if(n!=null&&n!="")return n=n.replace(".jpg",".thumb.jpg"),n.replace(".jpeg",".thumb.jpg")}}).filter("countryLong",function(){return function(n){var t,i,r;if(n!=null){t=null;i={Afghanistan:"AF",Albania:"AL",Algeria:"DZ","American Samoa":"AS",Andorra:"AD",Angola:"AO",Anguilla:"AI",Antarctica:"AQ","Antigua and Barbuda":"AG",Argentina:"AR",Armenia:"AM",Aruba:"AW",Australia:"AU",Austria:"AT",Azerbaijan:"AZ",Bahamas:"BS",Bahrain:"BH",Bangladesh:"BD",Barbados:"BB",Belarus:"BY",Belgium:"BE",Belize:"BZ",Benin:"BJ",Bermuda:"BM",Bhutan:"BT","Bolivia, Plurinational State of":"BO","Bonaire, Sint Eustatius and Saba":"BQ","Bosnia and Herzegovina":"BA",Botswana:"BW","Bouvet Island":"BV",Brazil:"BR","British Indian Ocean Territory":"IO","Brunei Darussalam":"BN",Bulgaria:"BG","Burkina Faso":"BF",Burundi:"BI",Cambodia:"KH",Cameroon:"CM",Canada:"CA","Cape Verde":"CV","Cayman Islands":"KY","Central African Republic":"CF",Chad:"TD",Chile:"CL",China:"CN","Christmas Island":"CX","Cocos (Keeling) Islands":"CC",Colombia:"CO",Comoros:"KM",Congo:"CG","Congo, the Democratic Republic of the":"CD","Cook Islands":"CK","Costa Rica":"CR",Croatia:"HR",Cuba:"CU","Curaçao":"CW",Cyprus:"CY","Czech Republic":"CZ","Côte d'Ivoire":"CI",Denmark:"DK",Djibouti:"DJ",Dominica:"DM","Dominican Republic":"DO",Ecuador:"EC",Egypt:"EG","El Salvador":"SV","Equatorial Guinea":"GQ",Eritrea:"ER",Estonia:"EE",Ethiopia:"ET","Falkland Islands (Malvinas)":"FK","Faroe Islands":"FO",Fiji:"FJ",Finland:"FI",France:"FR","French Guiana":"GF","French Polynesia":"PF","French Southern Territories":"TF",Gabon:"GA",Gambia:"GM",Georgia:"GE",Germany:"DE",Ghana:"GH",Gibraltar:"GI",Greece:"GR",Greenland:"GL",Grenada:"GD",Guadeloupe:"GP",Guam:"GU",Guatemala:"GT",Guernsey:"GG",Guinea:"GN","Guinea-Bissau":"GW",Guyana:"GY",Haiti:"HT","Heard Island and McDonald Islands":"HM","Holy See (Vatican City State)":"VA",Honduras:"HN","Hong Kong":"HK",Hungary:"HU",Iceland:"IS",India:"IN",Indonesia:"ID","Iran, Islamic Republic of":"IR",Iraq:"IQ",Ireland:"IE","Isle of Man":"IM",Israel:"IL",Italy:"IT",Jamaica:"JM",Japan:"JP",Jersey:"JE",Jordan:"JO",Kazakhstan:"KZ",Kenya:"KE",Kiribati:"KI","Korea, Democratic People's Republic of":"KP","Korea, Republic of":"KR",Kuwait:"KW",Kyrgyzstan:"KG","Lao People's Democratic Republic":"LA",Latvia:"LV",Lebanon:"LB",Lesotho:"LS",Liberia:"LR",Libya:"LY",Liechtenstein:"LI",Lithuania:"LT",Luxembourg:"LU",Macao:"MO","Macedonia, the former Yugoslav Republic of":"MK",Madagascar:"MG",Malawi:"MW",Malaysia:"MY",Maldives:"MV",Mali:"ML",Malta:"MT","Marshall Islands":"MH",Martinique:"MQ",Mauritania:"MR",Mauritius:"MU",Mayotte:"YT",Mexico:"MX","Micronesia, Federated States of":"FM","Moldova, Republic of":"MD",Monaco:"MC",Mongolia:"MN",Montenegro:"ME",Montserrat:"MS",Morocco:"MA",Mozambique:"MZ",Myanmar:"MM",Namibia:"NA",Nauru:"NR",Nepal:"NP",Netherlands:"NL","New Caledonia":"NC","New Zealand":"NZ",Nicaragua:"NI",Niger:"NE",Nigeria:"NG",Niue:"NU","Norfolk Island":"NF","Northern Mariana Islands":"MP",Norway:"NO",Oman:"OM",Pakistan:"PK",Palau:"PW","Palestine, State of":"PS",Panama:"PA","Papua New Guinea":"PG",Paraguay:"PY",Peru:"PE",Philippines:"PH",Pitcairn:"PN",Poland:"PL",Portugal:"PT","Puerto Rico":"PR",Qatar:"QA",Romania:"RO","Russian Federation":"RU",Rwanda:"RW","Réunion":"RE","Saint Barthélemy":"BL","Saint Helena, Ascension and Tristan da Cunha":"SH","Saint Kitts and Nevis":"KN","Saint Lucia":"LC","Saint Martin (French part)":"MF","Saint Pierre and Miquelon":"PM","Saint Vincent and the Grenadines":"VC",Samoa:"WS","San Marino":"SM","Sao Tome and Principe":"ST","Saudi Arabia":"SA",Senegal:"SN",Serbia:"RS",Seychelles:"SC","Sierra Leone":"SL",Singapore:"SG","Sint Maarten (Dutch part)":"SX",Slovakia:"SK",Slovenia:"SI","Solomon Islands":"SB",Somalia:"SO","South Africa":"ZA","South Georgia and the South Sandwich Islands":"GS","South Sudan":"SS",Spain:"ES","Sri Lanka":"LK",Sudan:"SD",Suriname:"SR","Svalbard and Jan Mayen":"SJ",Swaziland:"SZ",Sweden:"SE",Switzerland:"CH","Syrian Arab Republic":"SY","Taiwan, Province of China":"TW",Tajikistan:"TJ","Tanzania, United Republic of":"TZ",Thailand:"TH","Timor-Leste":"TL",Togo:"TG",Tokelau:"TK",Tonga:"TO","Trinidad and Tobago":"TT",Tunisia:"TN",Turkey:"TR",Turkmenistan:"TM","Turks and Caicos Islands":"TC",Tuvalu:"TV",Uganda:"UG",Ukraine:"UA","United Arab Emirates":"AE","United Kingdom":"GB","United States":"US","United States Minor Outlying Islands":"UM",Uruguay:"UY",Uzbekistan:"UZ",Vanuatu:"VU","Venezuela, Bolivarian Republic of":"VE","Viet Nam":"VN","Virgin Islands, British":"VG","Virgin Islands, U.S.":"VI","Wallis and Futuna":"WF","Western Sahara":"EH",Yemen:"YE",Zambia:"ZM",Zimbabwe:"ZW","Åland Islands":"AX"};for(r in i)i[r]==n.toUpperCase()&&(t=r);return t}}})}(),function(){"use strict";angular.module("app.filters",[]).filter("showStatus",function(){return function(n){switch(n){case 1:return"Enabled";case 2:return"Disabled";default:return"Disabled"}}})}();jQuery(function(n){"use strict";(function(){n(".image-link").magnificPopup({type:"image",gallery:{enabled:!0}})})(),function(){n(".image-slick").slick({})}(),function(){n(window).scroll(function(){handleTopNavAnimation()});n(window).load(function(){handleTopNavAnimation()})}()});topOffSet=40;ImageButton=function(n){var t=$.summernote.ui,i=t.button({contents:'<i class="note-icon-picture"/>',tooltip:"Insert Image",click:function(){n.invoke("editor.saveRange");$("#mediaManagerModal").modal("show")}});return i.render()},function(){"use strict";function i(t,i,r,u){angular.extend(r.defaults,{maxAge:9e5});u.useTitleSuffix(!1);u.setDefaultTitle("");u.setDefaultTitleSuffix(" | The Financial Summit - Maldives");u.setDefaultTag("description","The Financial Summit");u.setDefaultTag("image","https://thefinancialsummit.com/Content/images/conferences/financialbootcamp/2021/logo.jpg");u.setDefaultTag("twittersite","@FinSummit");t.when("/",{templateUrl:"scripts/app/home/index.html",controller:"indexCtrl",controllerAs:"vm",caseInsensitiveMatch:!0,data:{meta:{title:"The Financial Summit - Maldives"}}}).when("/register",{templateUrl:"scripts/app/home/register.html",controller:"registerCtrl",controllerAs:"vm",caseInsensitiveMatch:!0,data:{meta:{title:"Conference Registration"}}}).when("/upgrade",{templateUrl:"scripts/app/home/upgrade.html",controller:"upgradeCtrl",controllerAs:"vm",caseInsensitiveMatch:!0,data:{meta:{title:"Upgrade Room"}}}).when("/bali-upgrade",{templateUrl:"scripts/app/home/baliUpgrade.html",controller:"baliUpgradeCtrl",controllerAs:"vm",caseInsensitiveMatch:!0,data:{meta:{title:"Bali Upgrade Room"}}}).when("/dubai-upgrade",{templateUrl:"scripts/app/home/dubaiUpgrade.html",controller:"dubaiUpgradeCtrl",controllerAs:"vm",caseInsensitiveMatch:!0,data:{meta:{title:"Dubai Upgrade Room"}}}).when("/dr-upgrade",{templateUrl:"scripts/app/home/drUpgrade.html",controller:"drUpgradeCtrl",controllerAs:"vm",caseInsensitiveMatch:!0,data:{meta:{title:"Dominican Republic Upgrade Room"}}}).when("/maldives",{templateUrl:"scripts/app/home/maldives.html",controller:"maldivesCtrl",controllerAs:"vm",caseInsensitiveMatch:!0,data:{meta:{title:"Financial Summit - Maldives"}}}).when("/bali",{templateUrl:"scripts/app/home/bali.html",controller:"baliCtrl",controllerAs:"vm",caseInsensitiveMatch:!0,data:{meta:{title:"Financial Summit - Bali"}}}).when("/dubai",{templateUrl:"scripts/app/home/dubai.html",controller:"dubaiCtrl",controllerAs:"vm",caseInsensitiveMatch:!0,data:{meta:{title:"Financial Summit - Dubai"}}}).when("/dr",{templateUrl:"scripts/app/home/dr.html",controller:"drCtrl",controllerAs:"vm",caseInsensitiveMatch:!0,data:{meta:{title:"Financial Summit - Dominican Republic"}}}).when("/faq",{templateUrl:"scripts/app/home/faq.html",controller:"faqCtrl",controllerAs:"vm",caseInsensitiveMatch:!0,data:{meta:{title:"FAQ"}}}).when("/promo",{templateUrl:"scripts/app/home/promo.html",controller:"promoCtrl",controllerAs:"vm",caseInsensitiveMatch:!0,data:{meta:{title:"Promo"}}}).when("/dubai-photos",{templateUrl:"scripts/app/gallery/dubaiPhotos.html",controller:"dubaiPhotosCtrl",controllerAs:"vm",caseInsensitiveMatch:!0,data:{meta:{title:"Financial Summit - Dubai Photos"}}}).when("/bali-photos",{templateUrl:"scripts/app/gallery/baliPhotos.html",controller:"baliPhotosCtrl",controllerAs:"vm",caseInsensitiveMatch:!0,data:{meta:{title:"Financial Summit - Bali Photos"}}}).when("/login",{templateUrl:"scripts/app/account/login.html",controller:"loginCtrl",controllerAs:"vm",caseInsensitiveMatch:!0,data:{meta:{title:"Login"}}}).when("/contact",{templateUrl:"scripts/app/contact/contact.html",controller:"contactCtrl",controllerAs:"vm",caseInsensitiveMatch:!0,data:{meta:{title:"Contact"}}}).when("/paypal/success",{templateUrl:"scripts/app/paypal/paypalSuccess.html",controller:"paypalSuccessCtrl",controllerAs:"vm",data:{meta:{title:"Payment Successful"}}}).when("/paypal/cancel",{templateUrl:"scripts/app/paypal/paypalCancel.html",controller:"paypalCancelCtrl",controllerAs:"vm",data:{meta:{title:"Payment Canceled"}}}).when("/auth/:method/:customerId/:invoiceId",{templateUrl:"scripts/app/auth/auth.html",controller:"authCtrl",controllerAs:"vm",data:{meta:{title:"Authenticate"}}}).when("/unsubscribe/:cid/:uid",{templateUrl:"scripts/app/unsubscribe/unsubscribe.html",controller:"unsubscribeCtrl",controllerAs:"vm",data:{meta:{title:"Unsubscribe"}}}).when("/invoice/:customerId/:invoiceId",{templateUrl:"scripts/app/invoice/invoice.html",controller:"invoiceCtrl",controllerAs:"vm",data:{meta:{title:"Invoice/Payment"}},resolve:{isAuthenticated:n}}).when("/download/:customerId/:invoiceId",{templateUrl:"scripts/app/download/download.html",controller:"downloadCtrl",controllerAs:"vm",data:{meta:{title:"Download"}},resolve:{isAuthenticated:n}}).when("/admin",{templateUrl:"scripts/app/admin/admin.html",controller:"adminCtrl",controllerAs:"vm",caseInsensitiveMatch:!0,data:{meta:{title:"Admin"}},resolve:{isAuthenticated:n}}).when("/admin/settings",{templateUrl:"scripts/app/admin/settings/settings.html",controller:"settingsCtrl",controllerAs:"vm",data:{meta:{title:"Settings"}},resolve:{isAuthenticated:n}}).when("/admin/help",{templateUrl:"scripts/app/admin/help/help.html",controller:"adminHelpCtrl",controllerAs:"vm",caseInsensitiveMatch:!0,data:{meta:{title:"Help"}},resolve:{isAuthenticated:n}}).when("/admin/account",{templateUrl:"scripts/app/admin/account/editAccount.html",controller:"editAccountCtrl",controllerAs:"vm",resolve:{isAuthenticated:n}}).when("/admin/telegram",{templateUrl:"scripts/app/admin/telegram/telegram.html",controller:"telegramAdminCtrl",controllerAs:"vm",resolve:{isAuthenticated:n}}).when("/admin/users",{templateUrl:"scripts/app/admin/users/users.html",controller:"usersAdminCtrl",controllerAs:"vm",data:{meta:{title:"Admins"}},resolve:{isAuthenticated:n}}).when("/admin/users/edit/:id",{templateUrl:"scripts/app/admin/users/editUser.html",controller:"editUserCtrl",controllerAs:"vm",data:{meta:{title:"Edit Admin"}},resolve:{isAuthenticated:n}}).when("/admin/users/add",{templateUrl:"scripts/app/admin/users/addUser.html",controller:"addUserCtrl",controllerAs:"vm",data:{meta:{title:"Add Admin"}},resolve:{isAuthenticated:n}}).when("/admin/discounts",{templateUrl:"scripts/app/admin/discounts/discounts.html",controller:"discountsCtrl",controllerAs:"vm",data:{meta:{title:"Discounts"}},resolve:{isAuthenticated:n}}).when("/admin/discounts/edit/:id",{templateUrl:"scripts/app/admin/discounts/editDiscount.html",controller:"editDiscountCtrl",controllerAs:"vm",data:{meta:{title:"Edit Discount"}},resolve:{isAuthenticated:n}}).when("/admin/discounts/add",{templateUrl:"scripts/app/admin/discounts/addDiscount.html",controller:"addDiscountCtrl",controllerAs:"vm",data:{meta:{title:"Add Discount"}},resolve:{isAuthenticated:n}}).when("/admin/paymentaddress",{templateUrl:"scripts/app/admin/paymentaddress/paymentaddresses.html",controller:"paymentAddressesCtrl",controllerAs:"vm",data:{meta:{title:"Payment Addresses"}},resolve:{isAuthenticated:n}}).when("/admin/paymentaddress/edit/:id",{templateUrl:"scripts/app/admin/paymentaddress/editPaymentAddress.html",controller:"editPaymentAddressCtrl",controllerAs:"vm",data:{meta:{title:"Edit Payment Address"}},resolve:{isAuthenticated:n}}).when("/admin/paymentaddress/add",{templateUrl:"scripts/app/admin/paymentaddress/addPaymentAddress.html",controller:"addPaymentAddressCtrl",controllerAs:"vm",data:{meta:{title:"Add Payment Address"}},resolve:{isAuthenticated:n}}).when("/admin/paymentaddress/batchadd",{templateUrl:"scripts/app/admin/paymentaddress/batchAddPaymentAddress.html",controller:"batchAddPaymentAddressCtrl",controllerAs:"vm",data:{meta:{title:"Batch Add Payment Address"}},resolve:{isAuthenticated:n}}).when("/admin/pubkeys",{templateUrl:"scripts/app/admin/pubkeys/pubKeys.html",controller:"pubKeysCtrl",controllerAs:"vm",data:{meta:{title:"Pub Keys"}},resolve:{isAuthenticated:n}}).when("/admin/pubkeys/edit/:id",{templateUrl:"scripts/app/admin/pubkeys/editPubKey.html",controller:"editPubKeyCtrl",controllerAs:"vm",data:{meta:{title:"Edit Pub Key"}},resolve:{isAuthenticated:n}}).when("/admin/pubkeys/add",{templateUrl:"scripts/app/admin/pubkeys/addPubKey.html",controller:"addPubKeyCtrl",controllerAs:"vm",data:{meta:{title:"Add Pub Key"}},resolve:{isAuthenticated:n}}).when("/admin/customers",{templateUrl:"scripts/app/admin/customers/customers.html",controller:"customersCtrl",controllerAs:"vm",data:{meta:{title:"Customers"}},resolve:{isAuthenticated:n}}).when("/admin/customers/edit/:id",{templateUrl:"scripts/app/admin/customers/editCustomer.html",controller:"editCustomerCtrl",controllerAs:"vm",data:{meta:{title:"Edit Customer"}},resolve:{isAuthenticated:n}}).when("/admin/customers/add",{templateUrl:"scripts/app/admin/customers/addCustomer.html",controller:"addCustomerCtrl",controllerAs:"vm",data:{meta:{title:"Add Customer"}},resolve:{isAuthenticated:n}}).when("/admin/orders",{templateUrl:"scripts/app/admin/orders/orders.html",controller:"ordersCtrl",controllerAs:"vm",data:{meta:{title:"Orders"}},resolve:{isAuthenticated:n}}).when("/admin/orders/edit/:id",{templateUrl:"scripts/app/admin/orders/editOrder.html",controller:"editOrderCtrl",controllerAs:"vm",data:{meta:{title:"Edit Order"}},resolve:{isAuthenticated:n}}).when("/admin/orders/add",{templateUrl:"scripts/app/admin/orders/addOrder.html",controller:"addOrderCtrl",controllerAs:"vm",data:{meta:{title:"Add Order"}},resolve:{isAuthenticated:n}}).when("/admin/workshop",{templateUrl:"scripts/app/admin/seminars/seminars.html",controller:"seminarsCtrl",controllerAs:"vm",data:{meta:{title:"Workshops"}},resolve:{isAuthenticated:n}}).when("/admin/workshops/edit/:id",{templateUrl:"scripts/app/admin/seminars/editSeminar.html",controller:"editSeminarCtrl",controllerAs:"vm",data:{meta:{title:"Edit Workshop"}},resolve:{isAuthenticated:n}}).when("/admin/workshops/add",{templateUrl:"scripts/app/admin/seminars/addSeminar.html",controller:"addSeminarCtrl",controllerAs:"vm",data:{meta:{title:"Add Workshop"}},resolve:{isAuthenticated:n}}).when("/admin/emailcampaigns",{templateUrl:"scripts/app/admin/emailcampaigns/emailCampaigns.html",controller:"emailCampaignsCtrl",controllerAs:"vm",data:{meta:{title:"Campaigns"}},resolve:{isAuthenticated:n}}).when("/admin/emailcampaigns/edit/:id",{templateUrl:"scripts/app/admin/emailcampaigns/editEmailCampaign.html",controller:"editEmailCampaignCtrl",controllerAs:"vm",data:{meta:{title:"Edit Campaign"}},resolve:{isAuthenticated:n}}).when("/admin/emailcampaigns/add",{templateUrl:"scripts/app/admin/emailcampaigns/addEmailCampaign.html",controller:"addEmailCampaignCtrl",controllerAs:"vm",data:{meta:{title:"Add Campaign"}},resolve:{isAuthenticated:n}}).when("/admin/emailcampaigns/start",{templateUrl:"scripts/app/admin/emailcampaigns/startEmailCampaign.html",controller:"startEmailCampaignCtrl",controllerAs:"vm",data:{meta:{title:"Start Campaign"}},resolve:{isAuthenticated:n}}).when("/admin/emailcampaigns/emails",{templateUrl:"scripts/app/admin/emailcampaigns/emails/campaignEmails.html",controller:"campaignEmailsCtrl",controllerAs:"vm",data:{meta:{title:"Campaign Emails"}},resolve:{isAuthenticated:n}}).when("/admin/emailcampaigns/emails/add",{templateUrl:"scripts/app/admin/emailcampaigns/emails/addCampaignEmail.html",controller:"addCampaignEmailCtrl",controllerAs:"vm",data:{meta:{title:"Add Campaign Email"}},resolve:{isAuthenticated:n}}).when("/admin/emailcampaigns/emails/edit/:id",{templateUrl:"scripts/app/admin/emailcampaigns/emails/editCampaignEmail.html",controller:"editCampaignEmailCtrl",controllerAs:"vm",data:{meta:{title:"Edit Campaign Email"}},resolve:{isAuthenticated:n}}).when("/admin/events",{templateUrl:"scripts/app/admin/events/events.html",controller:"eventsAdminCtrl",controllerAs:"vm",data:{meta:{title:"Events"}},resolve:{isAuthenticated:n}}).when("/admin/events/calendar",{templateUrl:"scripts/app/admin/events/calendar.html",controller:"eventCalendarCtrl",controllerAs:"vm",data:{meta:{title:"Event Calendar"}},resolve:{isAuthenticated:n}}).when("/admin/events/edit/:id",{templateUrl:"scripts/app/admin/events/editEvent.html",controller:"editEventCtrl",controllerAs:"vm",data:{meta:{title:"Edit Event"}},resolve:{isAuthenticated:n}}).when("/admin/events/add/:day/:time",{templateUrl:"scripts/app/admin/events/addEvent.html",controller:"addEventCtrl",controllerAs:"vm",data:{meta:{title:"Add Event"}},resolve:{isAuthenticated:n}}).when("/admin/eventprices",{templateUrl:"scripts/app/admin/events/eventPrices.html",controller:"eventPricesCtrl",controllerAs:"vm",data:{meta:{title:"Event Pricing"}},resolve:{isAuthenticated:n}}).when("/admin/eventprices/edit/:id",{templateUrl:"scripts/app/admin/events/editEventPrice.html",controller:"editEventPriceCtrl",controllerAs:"vm",data:{meta:{title:"Edit Event Price"}},resolve:{isAuthenticated:n}}).when("/admin/eventprices/add",{templateUrl:"scripts/app/admin/events/addEventPrice.html",controller:"addEventPriceCtrl",controllerAs:"vm",data:{meta:{title:"Add Event Price"}},resolve:{isAuthenticated:n}}).when("/admin/conferences",{templateUrl:"scripts/app/admin/conferences/conferences.html",controller:"conferencesCtrl",controllerAs:"vm",data:{meta:{title:"Conferences"}},resolve:{isAuthenticated:n}}).when("/admin/conferences/edit/:id",{templateUrl:"scripts/app/admin/conferences/editConference.html",controller:"editConferenceCtrl",controllerAs:"vm",data:{meta:{title:"Edit Conference"}},resolve:{isAuthenticated:n}}).when("/admin/conferences/add",{templateUrl:"scripts/app/admin/conferences/addConference.html",controller:"addConferenceCtrl",controllerAs:"vm",data:{meta:{title:"Add Conference"}},resolve:{isAuthenticated:n}}).when("/admin/conferences/products/edit/:id",{templateUrl:"scripts/app/admin/conferences/editConferenceProduct.html",controller:"editConferenceProductCtrl",controllerAs:"vm",data:{meta:{title:"Edit Conference Product"}},resolve:{isAuthenticated:n}}).when("/admin/conferences/:id/products/add",{templateUrl:"scripts/app/admin/conferences/addConferenceProduct.html",controller:"addConferenceProductCtrl",controllerAs:"vm",data:{meta:{title:"Add Conference Product"}},resolve:{isAuthenticated:n}}).when("/admin/products",{templateUrl:"scripts/app/admin/products/products.html",controller:"productsCtrl",controllerAs:"vm",data:{meta:{title:"Products"}},resolve:{isAuthenticated:n}}).when("/admin/products/edit/:id",{templateUrl:"scripts/app/admin/products/editProduct.html",controller:"editProductCtrl",controllerAs:"vm",data:{meta:{title:"Edit Product"}},resolve:{isAuthenticated:n}}).when("/admin/products/add",{templateUrl:"scripts/app/admin/products/addProduct.html",controller:"addProductCtrl",controllerAs:"vm",data:{meta:{title:"Add Product"}},resolve:{isAuthenticated:n}}).when("/admin/workshophelp",{templateUrl:"scripts/app/admin/seminarhelp/adminSeminarHelp.html",controller:"adminSeminarHelpCtrl",controllerAs:"vm",data:{meta:{title:"Workshop Help"}},resolve:{isAuthenticated:n}}).when("/admin/workshophelp/edit/:id",{templateUrl:"scripts/app/admin/seminarhelp/editSeminarHelp.html",controller:"editSeminarHelpCtrl",controllerAs:"vm",data:{meta:{title:"Edit Workshop Help"}},resolve:{isAuthenticated:n}}).when("/admin/workshophelp/add",{templateUrl:"scripts/app/admin/seminarhelp/addSeminarHelp.html",controller:"addSeminarHelpCtrl",controllerAs:"vm",data:{meta:{title:"Add Workshop Help"}},resolve:{isAuthenticated:n}}).when("/admin/pages",{templateUrl:"scripts/app/admin/pages/pages.html",controller:"pagesCtrl",controllerAs:"vm",data:{meta:{title:"Pages"}},resolve:{isAuthenticated:n}}).when("/admin/pages/edit/:id",{templateUrl:"scripts/app/admin/pages/editPage.html",controller:"editPageCtrl",controllerAs:"vm",data:{meta:{title:"Edit Page"}},resolve:{isAuthenticated:n}}).when("/admin/pages/add",{templateUrl:"scripts/app/admin/pages/addPage.html",controller:"addPageCtrl",controllerAs:"vm",data:{meta:{title:"Add Page"}},resolve:{isAuthenticated:n}}).when("/admin/media",{templateUrl:"scripts/app/admin/mediacontent/mediaContent.html",controller:"mediaContentCtrl",controllerAs:"vm",data:{meta:{title:"Media"}},resolve:{isAuthenticated:n}}).when("/admin/media/add",{templateUrl:"scripts/app/admin/mediacontent/addMediaContent.html",controller:"addMediaContentCtrl",controllerAs:"vm",data:{meta:{title:"Add Media"}},resolve:{isAuthenticated:n}}).when("/admin/emails",{templateUrl:"scripts/app/admin/emails/emails.html",controller:"emailsCtrl",controllerAs:"vm",data:{meta:{title:"Emails"}},resolve:{isAuthenticated:n}}).when("/admin/emails/edit/:id",{templateUrl:"scripts/app/admin/emails/editEmail.html",controller:"editEmailCtrl",controllerAs:"vm",data:{meta:{title:"Edit Email"}},resolve:{isAuthenticated:n}}).otherwise({redirectTo:"/"});i.html5Mode(!0)}function r(n,t,i,r,u,f,e){e.init();n.$on("$routeChangeStart",function(){t.path().indexOf("/admin/")===-1||t.path!=="/admin"&&f.cancel(n.adminTimer)});n.repository=i.get("repository")||{};n.repository.loggedUser&&(r.defaults.headers.common.Authorization=n.repository.loggedUser.authdata);$(document).ready(function(){$(".fancybox").fancybox({openEffect:"none",closeEffect:"none"});$(".fancybox-media").fancybox({openEffect:"none",closeEffect:"none",helpers:{media:{}}});$("[data-toggle=offcanvas]").click(function(){$(".row-offcanvas").toggleClass("active")});$(".image-slick").slick({})})}function n(n,t,i){n.isUserLoggedIn()||(t.previousState=i.path(),i.path("/"))}function e(){angular.element(document).ready(function(){u();o();angular.bootstrap(document,["app"])})}function u(){setTimeout(function(){$(".page-cover.page-loader").fadeOut("slow")},200)}function o(){setTimeout(function(){$(".container.top-logo, footer").css({opacity:0,visibility:"visible"}).animate({opacity:1},"slow")},200)}function s(){$(".page-cover.page-error").show();$("body").css({overflow:"hidden"},{posiiton:"relative"})}var t=angular.module("app",["common.core","common.ui","common.social","common.filters","app.filters","angular-cache","ngMeta"]).config(i).run(r),f;i.$inject=["$routeProvider","$locationProvider","CacheFactoryProvider","ngMetaProvider"];r.$inject=["$rootScope","$location","$cookieStore","$http","$window","$timeout","ngMeta"];n.$inject=["membershipService","$rootScope","$location"];f="api/sitesettings";t.constant("appConfig",null);e()}(),function(n){"use strict";function t(n,t,i,r){function u(u,f,e,o){return n.get(u,f).then(function(n){e(n)},function(n){n.status=="401"?(i.displayError("Authentication required."),r.previousState=t.path(),t.path("/")):o!=null&&o(n)})}function f(u,f,e,o){return n.post(u,f).then(function(n){e(n)},function(n){n.status=="401"?(i.displayError("Authentication required."),r.previousState=t.path(),t.path("/")):o!=null&&o(n)})}function e(t,i,r,u){return n.put(t,i).then(function(n){r(n)},function(n){u(n)})}return{get:u,post:f,put:e}}n.factory("apiService",t);t.$inject=["$http","$location","notificationService","$rootScope"]}(angular.module("common.core")),function(n){"use strict";function t(n,t){function i(i){var r=t.defer();return n.get("/api/orders",i).then(function(n){var t=n.data;r.resolve(t)},function(n){r.reject(n)}),r.promise}return{getOrders:i}}n.factory("ordersService",t);t.$inject=["$http","$q"]}(angular.module("common.core")),function(n){"use strict";function t(n,t){function i(i){var r=t.defer();return n.get("/api/customers",i).then(function(n){var t=n.data;r.resolve(t)},function(n){r.reject(n)}),r.promise}return{getCustomers:i}}n.factory("customersService",t);t.$inject=["$http","$q"]}(angular.module("common.core")),function(n){"use strict";function t(n,t){function i(i){var r=t.defer();return n.get("/api/seminars",i).then(function(n){var t=n.data;r.resolve(t)},function(n){r.reject(n)}),r.promise}return{getSeminars:i}}n.factory("seminarsService",t);t.$inject=["$http","$q"]}(angular.module("common.core")),function(n){"use strict";function t(){function n(n){toastr.success(n)}function t(n){Array.isArray(n)?n.forEach(function(n){toastr.error(n)}):toastr.error(n)}function i(n){toastr.warning(n)}function r(n){toastr.info(n)}toastr.options={debug:!1,positionClass:"toast-top-right",onclick:null,fadeIn:300,fadeOut:1e3,timeOut:3e3,extendedTimeOut:1e3};return{displaySuccess:n,displayError:t,displayWarning:i,displayInfo:r}}n.factory("notificationService",t)}(angular.module("common.core")),function(n){"use strict";function t(n,t,i,r,u,f){function e(t,i){n.post("/api/account/authenticate",t,i,p)}function o(t,i,r){n.post("/api/account/register",t,i,r)}function s(t,i,r){n.put("/api/account/update",t,i,r)}function h(t,i,r){n.put("/api/account/updatepassword",t,i,r)}function c(t,i,r){n.put("/api/account/updatepasswordbyid",t,i,r)}function l(t,i,r){n.put("/api/account/updaterole",t,i,r)}function a(t,i,r){n.post("/api/account/delete",t,i,r)}function v(n){var t=r.encode(n.username+":"+n.password);f.repository={loggedUser:{username:n.username,id:n.id,role:n.role,authdata:t}};i.defaults.headers.common.Authorization="Basic "+t;u.put("repository",f.repository)}function y(){f.repository={};u.remove("repository");i.defaults.headers.common.Authorization=""}function p(n){t.displayError(n.data)}function w(){return f.repository.loggedUser!=null}return{login:e,register:o,update:s,updatePassword:h,updatePasswordById:c,updateRole:l,remove:a,saveCredentials:v,removeCredentials:y,isUserLoggedIn:w}}n.factory("membershipService",t);t.$inject=["apiService","notificationService","$http","$base64","$cookieStore","$rootScope"]}(angular.module("common.core")),function(n){"use strict";function t(n,t,i,r,u){function f(t,i,f,e){for(var s,o=0;o<t.length;o++)s=t[o],function(t){n.upload[t]=r.upload({url:"api/"+i+"s/images/upload?"+i+"Id="+f,method:"POST",file:s}).progress(function(){}).success(function(n){e(n)}).error(function(n){u.displayError(n.Message)})}(o)}function e(t,i){for(var e,f=0;f<t.length;f++)e=t[f],function(t){n.upload[t]=r.upload({url:"api/mediacontent/images/upload",method:"POST",file:e}).progress(function(){}).success(function(n){i(n)}).error(function(n){u.displayError(n.Message)})}(f)}function o(t,i,f,e){for(var s,o=0;o<t.length;o++)s=t[o],function(t){n.upload[t]=r.upload({url:"api/products/files/upload?productId="+f,method:"POST",file:s}).progress(function(){}).success(function(n){e(n)}).error(function(n){u.displayError(n.Message)})}(o)}n.upload=[];return{uploadImage:f,uploadMediaContentImageImage:e,uploadFile:o}}n.factory("fileUploadService",t);t.$inject=["$rootScope","$http","$timeout","$upload","notificationService"]}(angular.module("common.core")),function(n){"use strict";function t(n,t,i,r){function h(n,t,i){var r={part:"snippet,contentDetails,statistics",forUsername:"WorldCryptoNetwork",key:u};n.params=r;$.get("https://www.googleapis.com/youtube/v3/channels",n.params,function(){}).done(function(n){return t(n)}).fail(function(n){return i(n)})}function c(n,t,i){var r={part:"snippet,contentDetails",id:n.playListsIds,key:u};n.params=r;$.get("https://www.googleapis.com/youtube/v3/playlists",n.params,function(){}).done(function(n){return t(n)}).fail(function(n){return i(n)})}function l(n,t,i){var r={part:"snippet,contentDetails",channelId:f,key:u};n.params=r;$.get("https://www.googleapis.com/youtube/v3/playlists",n.params,function(){}).done(function(n){return t(n)}).fail(function(n){return i(n)})}function a(n,t,i){var r={part:"snippet",order:"date",channelId:f,maxResults:n.pageSize,pageToken:n.pageToken,type:"video",key:u};n.params=r;$.get("https://www.googleapis.com/youtube/v3/search",n.params,function(){}).done(function(n){return t(n)}).fail(function(n){return i(n)})}function v(n,t,i){var r={part:"snippet",order:"relevance",channelId:f,maxResults:n.pageSize,pageToken:n.pageToken,type:"video",q:n.query,key:u};n.params=r;$.get("https://www.googleapis.com/youtube/v3/search",n.params,function(){}).done(function(n){return t(n)}).fail(function(n){return i(n)})}function y(n,t,i){var r={part:"snippet",order:"date",id:n.id,key:u};n.params=r;$.get("https://www.googleapis.com/youtube/v3/videos",n.params,function(){}).done(function(n){return t(n)}).fail(function(n){return i(n)})}function p(n,t,i){var r=new Date,e,o,h;e=r.getMonth()===0?s(new Date(r.getFullYear()-1,11,1)):s(new Date(r.getFullYear(),r.getMonth()-1,1));o="https://www.googleapis.com/youtube/v3/search";h={part:"snippet",order:"viewCount",channelId:f,maxResults:3,publishedAfter:e,key:u};n==null&&(n={});n.params=h;$.get(o,n.params,function(){}).done(function(n){return t(n)}).fail(function(n){return i(n)})}function w(n,t,i){var r={part:"snippet, contentDetails",order:"viewCount",playlistId:n.playlistId,maxResults:n.pageSize,pageToken:n.pageToken,key:u};n.params=r;$.get("https://www.googleapis.com/youtube/v3/playlistItems",n.params,function(){}).done(function(n){return t(n)}).fail(function(n){return i(n)})}function b(n,t,i){var r={part:"snippet",channelId:f,type:"video",eventType:"upcoming",key:u};typeof n!="undefined"&&(n={});n.params=r;$.get("https://www.googleapis.com/youtube/v3/search",n.params,function(){}).done(function(n){return t(n)}).fail(function(n){return i(n)})}function k(n,t,i){var r={part:"snippet",channelId:f,type:"video",eventType:"live",key:u};typeof n!="undefined"&&(n={});n.params=r;$.get("https://www.googleapis.com/youtube/v3/search",n.params,function(){}).done(function(n){return t(n)}).fail(function(n){return i(n)})}function d(){return $.get("https://www.googleapis.com/youtube/v3/liveBroadcasts",{part:"snippet, status",channelId:f,broadcastStatus:"active",key:u})}function s(n){function t(n){return n<10?"0"+n:n}return n.getUTCFullYear()+"-"+t(n.getUTCMonth()+1)+"-"+t(n.getUTCDate())+"T"+t(n.getUTCHours())+":"+t(n.getUTCMinutes())+":"+t(n.getUTCSeconds())+"Z"}var u="",f="",o,e;if(r!=null)for(o=0;o<r.length;o++)e=r[o],e.SettingName=="key"?u=e.SettingVar:e.SettingName=="channelId"&&(f=e.SettingVar);return{getChannel:h,getVideos:a,getVideosByQuery:v,getVideo:y,getPlaylistsById:c,getPlaylistsByChannel:l,getPlaylistItems:w,getLiveVideos:k,getPopularVideos:p,getUpcomingLiveVideos:b,getLiveStatus:d}}n.factory("youtubeService",t);t.$inject=["$http","apiService","notificationService","appConfig"]}(angular.module("common.core")),function(n){"use strict";function t(n){function t(t,i){return n.get("/api/orders/getbtcprice").then(function(n){t(n)},function(n){i!=null&&i(n)})}function i(t,i){return n.get("https://api.coindesk.com/v1/bpi/currentprice/USD.json").then(function(n){t(n)},function(n){i!=null&&i(n)})}function r(t,i,r){return n.get("https://api.coindesk.com/v1/bpi/historical/close.json",t).then(function(n){i(n)},function(n){r!=null&&r(n)})}function u(t,i,r,u){var f="";return f=u?"https://cors-anywhere.herokuapp.com/https://api.bitaps.com/btc/v1/blockchain/transaction/"+t:"https://api.bitaps.com/btc/v1/blockchain/transaction/"+t,n.get(f).then(function(n){i(n)},function(n){r!=null&&r(n)})}function f(t,i,r,u){var f="";return f=u?"https://cors-anywhere.herokuapp.com/https://api.bitaps.com/btc/v1/blockchain/address/transactions/"+t:"https://api.bitaps.com/btc/v1/blockchain/address/transactions/"+t,n.get(f).then(function(n){i(n)},function(n){r!=null&&r(n)})}function e(t,i,r,u){var f="";return f=u?"https://cors-anywhere.herokuapp.com/https://chain.so/api/v2/get_tx_outputs/BTC/"+t:"https://chain.so/api/v2/get_tx_outputs/BTC/"+t,n.get(f).then(function(n){i(n)},function(n){r!=null&&r(n)})}function o(t,i,r,u){var f="";return f=u?"https://cors-anywhere.herokuapp.com/https://chain.so/api/v2/get_tx_received/BTC/"+t:"https://chain.so/api/v2/get_tx_received/BTC/"+t,n.get(f).then(function(n){i(n)},function(n){r!=null&&r(n)})}function s(t,i,r,u){var f="";return f=u?"https://cors-anywhere.herokuapp.com/https://chain.so/api/v2/is_address_valid/BTC/"+t:"https://chain.so/api/v2/is_address_valid/BTC/"+t,n.get(f).then(function(n){i(n)},function(n){r!=null&&r(n)})}return{getBTCPrice:t,getPrice:i,getHistoricPrice:r,getTransaction:u,getAddressTransactions:f,getTransactionOutputs:e,getTransactionsReceived:o,isAddressValid:s}}n.factory("bitcoinService",t);t.$inject=["$http","apiService","notificationService"]}(angular.module("common.core")),function(n){"use strict";function t(n,t,i,r,u,f,e,o){function h(){l();var n="/api/pagecontent";s.cacheKey=n;sessionStorage.getItem(s.cacheKey)==null?r.get(n,null,c,a):setTimeout(function(){c(JSON.parse(sessionStorage.getItem(s.cacheKey)))},200)}function c(t){sessionStorage.getItem(s.cacheKey)==null&&sessionStorage.setItem(s.cacheKey,JSON.stringify(t));n.PageContent=t.data;o.$broadcast("pageContentLoaded");b()}function a(){l();w()}function v(){n.userData.isUserLoggedIn=f.isUserLoggedIn();n.userData.isUserLoggedIn&&(n.username=o.repository.loggedUser.username,o.$broadcast("showUsername"))}function y(){f.removeCredentials();window.location.href="/"}function p(t){for(var r,i=0;i<n.PageContent.length;i++)if(r=n.PageContent[i],r.Title==t)return r}function l(){setTimeout(function(){$(".page-cover.page-loader").fadeOut("slow");$(".container.top-logo, footer").css({opacity:0,visibility:"visible"}).animate({opacity:1},"slow")},500)}function w(){setTimeout(function(){$(".page-cover.page-error").show();$("body").css({overflow:"hidden"},{posiiton:"relative"})},250)}function b(){setTimeout(function(){$(".carousel").carousel();$(".image-link").magnificPopup({type:"image"});loadMasks()},250)}var s=this;n.userData={};n.PageContent=[];n.userData.displayUserInfo=v;n.logout=y;n.username="";n.getPageContent=p;s.query="";s.cacheKey="";s.search=function(){var n=i("alphaNumeric")(s.query);n.length>0&&(s.query="",t.path("/search/"+n))};s.enter=function(n){n.keyCode==13&&s.search()};n.loadScript=function(n,t,i){var r,u,f;return t===undefined&&(t="text/javascript"),n?(r=document.querySelector("script[src*='"+n+"']"),r||(u=document.getElementsByTagName("head"),u&&u.length&&(f=u[0],f&&(r=document.createElement("script"),r.setAttribute("src",n),r.setAttribute("type",t),i&&r.setAttribute("charset",i),f.appendChild(r)))),r):void 0};n.$on("forcePageContentLoad",function(){h()});n.userData.displayUserInfo();h()}n.controller("rootCtrl",t);t.$inject=["$scope","$location","$filter","apiService","notificationService","membershipService","appConfig","$rootScope"]}(angular.module("app")),function(n){"use strict";function t(){return{restrict:"E",replace:!1,templateUrl:"/scripts/app/layout/pageError.html",scope:{}}}n.directive("pageError",t)}(angular.module("common.ui")),function(n){"use strict";function t(n,t,i,r,u){var f=this;f.role="";u.isUserLoggedIn()&&(f.role=n.repository.loggedUser.role);f.pageLocation="";f.adminPageLocation="";f.userData=t.$parent.userData;f.logout=t.$parent.logout;f.username=t.$parent.username;t.$on("updatePageLocation",function(n,t){f.pageLocation=t});t.$on("updateAdminPageLocation",function(n,t){f.adminPageLocation=t});t.$on("showUsername",function(){f.username=t.$parent.username})}n.controller("topBarCtrl",t);t.$inject=["$rootScope","$scope","apiService","notificationService","membershipService"]}(angular.module("app")),function(n){"use strict";function t(){return{restrict:"E",replace:!1,templateUrl:"/scripts/app/layout/topBar.html",scope:{},controller:"topBarCtrl",controllerAs:"vm"}}n.directive("topBar",t)}(angular.module("common.ui")),function(n){"use strict";function t(){return{restrict:"E",replace:!1,templateUrl:"/scripts/app/layout/bottomBar.html",scope:{},controller:"bottomBarCtrl",controllerAs:"vm"}}n.directive("bottomBar",t)}(angular.module("common.ui")),function(n){"use strict";function t(n){var t=this;t.pageLocation="";t.currentYear=new Date;n.$on("updatePageLocation",function(n,i){t.pageLocation=i})}n.controller("bottomBarCtrl",t);t.$inject=["$scope"]}(angular.module("app")),function(n){"use strict";function t(){return{restrict:"E",scope:{valid:"="},template:'<input ng-model="a.value" ng-show="a.input" style="width:2em; text-align: center;"><span ng-hide="a.input">{{a.value}}<\/span>&nbsp;{{operation}}&nbsp;<input ng-model="b.value" ng-show="b.input" style="width:2em; text-align: center;"><span ng-hide="b.input">{{b.value}}<\/span>&nbsp;=&nbsp;{{result}}',controller:function(n){var t=Math.random()>.5,i=function(n){return Math.floor(n*Math.random())},r=function(n){return parseInt(n,10)};n.a={value:t?undefined:1+i(4),input:t};n.b={value:t?1+i(4):undefined,input:!t};n.operation="+";n.result=5+i(5);var u=n.a,f=n.b,o=n.result,e=function(){if(u.value&&f.value){var t=r(u.value)+r(f.value);n.valid=t==o}else n.valid=!1};n.$watch("a.value",function(){e()});n.$watch("b.value",function(){e()})}}}n.directive("captcha",t)}(angular.module("common.ui")),function(n){"use strict";function t(){return{scope:{page:"@",pagesCount:"@",totalCount:"@",searchFunc:"&",customPath:"@"},replace:!0,restrict:"E",templateUrl:"/scripts/app/directives/customPager.html",controller:["$scope",function(n){n.search=function(t){n.searchFunc&&n.searchFunc({page:t})};n.range=function(){var r,t;if(!n.pagesCount)return[];var u=2,e=u*2,f=Math.max(0,n.page-u),i=f+1+e;for(i>n.pagesCount&&(i=n.pagesCount),r=[],t=f;t!=i;++t)r.push(t);return r};n.pagePlus=function(t){return+n.page+t}}]}}n.directive("customPager",t)}(angular.module("common.ui")),function(n){"use strict";function t(){return{require:"ngModel",link:function(n,t,i,r){function u(n){if(n){var t=n.replace(/[^0-9-]/g,"");return t!==n&&(r.$setViewValue(t),r.$render()),t}return undefined}r.$parsers.push(u)}}}n.directive("numbersOnly",t)}(angular.module("common.ui")),function(n){"use strict";function t(){return{scope:{useLocalPaths:"@"},templateUrl:"/scripts/app/directives/mediaManager.html",controller:["$scope","apiService","notificationService","fileUploadService",function(n,t,i,r){function o(){n.Images=n.Images.filter(function(t){return t.ID!==n.selectedImage.ID});n.selectedImage=null;n.mediaImage=null;n.isDeleting=!1;i.displaySuccess("Successfully deleted image")}function s(n){t.post("/api/mediacontent/add/url",n,h,u)}function h(t){n.isLoading=!1;n.Images.push(t.data);var i=e(),r=i+t.data.FileName;$("#summernote").summernote("insertImage",r,function(n){n.css("width","50%")});f()}function c(){t.get("/api/mediacontent",null,l,u)}function l(t){n.Images=t.data;n.isLoading=!1}function a(t){n.isLoading=!1;n.Images.push(t);var i=e(),r=i+t.FileName;$("#summernote").summernote("insertImage",r,function(n){n.css("width","50%")});f()}function u(t){n.isLoading=!1;i.displayError(t.data.Message)}function f(){n.mediaImage=null;n.selectedImage=null;n.imageURL="";$("#library").scrollTop(0);$("#mediaManagerModal").modal("hide")}function e(){var t="https://www.thefinancialsummit.com/content/images/mediamanager/";return n.useLocalPaths=="true"&&(t="../../Content/images/mediamanager/"),t}n.isLoading=!0;n.isDeleting=!1;n.mediaImage=null;n.selectedImage=null;n.imageURL="";n.Images=[];n.prepareFiles=function(t){n.mediaImage=t};n.select=function(t){n.selectedImage=n.selectedImage!==null?n.selectedImage.ID===t.ID?null:t:t};n.insertImage=function(){var t,i,u;if($("#summernote").summernote("insertText",""),$("#summernote").summernote("restoreRange"),n.mediaImage!==null)n.isLoading=!0,r.uploadMediaContentImageImage(n.mediaImage,a);else if(n.imageURL.length>0)n.isLoading=!0,t={MediaTypeID:1,FileName:n.imageURL,CreatedDate:new Date},s(t);else if(n.selectedImage!==null)i=e(),u=i+n.selectedImage.FileName,$("#summernote").summernote("insertImage",u,function(n){n.css("width","50%")}),f();else return};n.removeImage=function(){n.isDeleting=!0;t.post("/api/mediacontent/delete",n.selectedImage,o,u)};$("#mediaManagerModal").on("hidden.bs.modal",function(){});c()}]}}n.directive("mediaManager",t)}(angular.module("common.ui")),function(n){"use strict";function t(){return{restrict:"A",link:function(n,t,i){t.raty({score:i.componentRating,halfShow:!1,readOnly:n.isReadOnly,noRatedMsg:"Not rated yet!",starHalf:"../Content/images/raty/star-half.png",starOff:"../Content/images/raty/star-off.png",starOn:"../Content/images/raty/star-on.png",hints:["Poor","Average","Good","Very Good","Excellent"],click:function(t){n.movie.Rating=t}})}}}n.directive("componentRating",t)}(angular.module("common.ui")),function(n){"use strict";function t(n,t,i,r,u){function e(){f.user.username.toLowerCase()!="customer"&&t.login(f.user,o)}function o(e){e.data.success?(f.user.id=e.data.id,f.user.role=e.data.role,t.saveCredentials(f.user),i.displaySuccess("Hello "+f.user.username),n.userData.displayUserInfo(),r.previousState?u.path(r.previousState):window.location.href="/admin"):i.displayError("Login failed. Try again.")}n.pageClass="page-login";var f=this;f.login=e;f.user={}}n.controller("loginCtrl",t);t.$inject=["$scope","membershipService","notificationService","$rootScope","$location","$http","$cookieStore"]}(angular.module("common.core")),function(n){"use strict";function t(n,t,i,r,u,f,e,o,s,h){function l(){var n="/api/orders/invoice/"+f.customerId+"/"+f.invoiceId;s.get(n,null,a,v)}function a(n){c.orderData=n.data;c.isCompleted=!1;c.isLoading=!1;c.orderData.Order.StatusID==2?c.isCompleted=!0:c.orderData.Order.StatusID==3?c.isCompleted=!0:c.isValidated=!0}function v(){c.isLoading=!1}function y(n){if(n!=""){c.isLoading=!0;c.isError=!1;var t="/api/orders/invoice/"+n;s.get(t,null,p,w)}}function p(n){var t=n.data;c.isCompleted=t.transactionId!=""?!0:!1;c.isLoading=!1;c.isValidated=!0}function w(){c.isLoading=!1;c.isCompleted=!1}function b(n){var t={InvoiceId:c.orderData.Order.InvoiceID,BTCPayInvoiceID:n};s.put("/api/orders/updateInvoice/",t,k,d)}function k(){}function d(){}i.$broadcast("updatePageLocation","payment");n.pageClass="page-payment";var c=this;c.trust=t.trustAsHtml;c.trustSrc=function(n){return t.trustAsResourceUrl(n)};c.isLoading=!0;c.isCompleted=!1;c.isValidated=!1;c.errorMessage="";c.isError=!1;c.qrCode="";c.orderData={};c.formData={};c.currentStep=1;c.cacheKey="";c.showHelp=function(){$(".divHelp").slideToggle("slow")};c.refresh=function(n){y(n)};c.updateOrderBTCPayInvoice=function(n){b(n)};l();n.$on("$locationChangeStart",function(){console.info("logged out");h.removeCredentials();sessionStorage.removeItem(c.cacheKey)})}n.controller("invoiceCtrl",t);t.$inject=["$scope","$sce","$rootScope","$location","$http","$routeParams","$filter","notificationService","apiService","membershipService","bitcoinService"]}(angular.module("app")),function(n){"use strict";function t(n,t,i,r,u,f,e,o,s){function l(){h.cacheKey=s.customerId+"|"+s.invoiceId;sessionStorage.getItem(h.cacheKey)==null?v("Error processing request."):a(JSON.parse(sessionStorage.getItem(h.cacheKey)))}function a(n){h.orderData=n;h.isLoading=!1;h.isValidated=!0}function v(n){h.isLoading=!1;h.isError=!0;h.errorMessage=n}function y(){var n="/api/orders/file/"+h.orderData.customerId+"/"+h.orderData.invoiceId;o({method:"GET",url:n,responseType:"arraybuffer"}).success(function(n,t,i){var u,f,e;i=i();var o=i["x-filename"],s=i["content-type"],r=document.createElement("a");try{u=new Blob([n],{type:s});f=window.URL.createObjectURL(u);r.setAttribute("href",f);r.setAttribute("download",o);e=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});r.dispatchEvent(e);p()}catch(h){c(h)}}).error(function(n){c(n)})}function p(){h.downloadButtonText="Download Now";h.isDownloadLoading=!1;sessionStorage.removeItem(h.cacheKey)}function c(n){h.downloadButtonText="Download Now";h.isDownloadLoading=!1;h.isError=!0;h.errorMessage=n.Message}f.$broadcast("updatePageLocation","download");n.pageClass="page-download";var h=this;h.isLoading=!0;h.isDownloadLoading=!1;h.isValidated=!1;h.errorMessage="";h.isError=!1;h.cacheKey="";h.downloadButtonText="Download Now";h.orderData={};h.download=function(){h.isDownloadLoading=!0;h.downloadButtonText="Loading...";y()};l();n.$on("$locationChangeStart",function(){r.removeCredentials()})}n.controller("downloadCtrl",t);t.$inject=["$scope","notificationService","apiService","membershipService","bitcoinService","$rootScope","$location","$http","$routeParams","$filter"]}(angular.module("app")),function(n){"use strict";function t(n,t,i,r,u){function e(){var n="/api/orders/auth/"+i.customerId+"/"+i.invoiceId;r.get(n,null,o,s)}function o(n){f.redirectURL=n.data.redirectURL;f.currencyTypeID=n.data.currencyTypeId;f.isValidated=!0;h()}function s(n){f.isLoading=!1;f.isError=!0;f.errorMessage=n.data.Message;$("#error").show()}function h(){u.login(f.user,c)}function c(n){n.data.success?(f.user.id=n.data.id,f.user.role=n.data.role,u.saveCredentials(f.user),f.currencyTypeID==1?window.location.href="/"+i.method+"/"+i.customerId+"/"+i.invoiceId:f.currencyTypeID==2&&(window.location.href=f.redirectURL)):(f.errorMessage="Error authenticating user.",f.isError=!1)}n.pageClass="page-admin-home";var f=this;f.user={username:"customer",password:"U)7wPJ`3D7a34k=N"};f.isLoading=!0;f.isValidated=!1;f.errorMessage="";f.isError=!1;f.redirectURL="";f.currencyTypeID="";e()}n.controller("authCtrl",t);t.$inject=["$scope","$rootScope","$routeParams","apiService","membershipService"]}(angular.module("app")),function(n){"use strict";function t(n,t,i,r,u,f,e){function a(t){o.loadingProposal=!1;o.proposalButtonText="Submit";o.isProposalCompleted=!0;o.isError=!1;o.errorMessage="";o.proposal=t.data;n.sForm3.$setPristine()}function v(n){o.loadingProposal=!1;o.proposalButtonText="Submit";o.isError=!0;o.errorMessage=n.data.Message}function y(t){o.loading=!1;o.submitButtonText="Submit";o.isCompleted=!0;o.isError=!1;o.errorMessage="";o.customer=t.data;n.sForm3.$setPristine()}function p(n){o.loading=!1;o.submitButtonText="Submit";o.isError=!0;o.errorMessage=n.data.Message}function w(){var n="/api/conferenceproducts/title/"+decodeURIComponent(o.title);o.cacheKey2=n;sessionStorage.getItem(o.cacheKey2)==null?f.get(n,null,h,s):h(JSON.parse(sessionStorage.getItem(o.cacheKey2)))}function s(n){e.displayError(n.data.Message)}function h(n){sessionStorage.getItem(o.cacheKey2)==null&&sessionStorage.setItem(o.cacheKey2,JSON.stringify(n));var t=n.data;t.length>0&&(o.conferenceProducts=t,o.conference=o.conferenceProducts[0].Conference,o.startDate=o.conference.StartDate,o.endDate=o.conference.EndDate,g(),o.conferenceProductsForPurchase=o.conferenceProducts.filter(function(n){return n.IsSoldOut==!1}),o.conferenceProductsForPurchase.length>0&&(o.customer.ConferenceProductId=o.conferenceProducts[0].ID,o.setDates()),o.drProducts=t.filter(function(n){return n.Conference.Title.indexOf("Republic")>-1&&n.IsSoldOut==!1}),o.drProducts.length>0&&(o.seatsLeft1=o.drProducts[0].SeatsLeft),k(),$("#VenueAddress").html(o.conference.VenueAddress),$("#VenueTitle").html(o.conference.VenueTitle))}function b(t){o.loadingRegister=!1;o.registerButtonText="";o.isError=!1;o.errorMessage="";t.data.redirectUrl!=null?window.location.href=t.data.redirectUrl:(o.isRegistered=!0,n.sForm.$setPristine(),$("html, body").animate({scrollTop:$("#registration").offset().top-30},1e3))}function k(){var n="/api/discounts/count/3";o.cacheKey4=n;sessionStorage.getItem(o.cacheKey4)==null?f.get(n,null,c,s):c(JSON.parse(sessionStorage.getItem(o.cacheKey4)))}function c(n){sessionStorage.getItem(o.cacheKey4)==null&&sessionStorage.setItem(o.cacheKey4,JSON.stringify(n));o.enabledDiscounts=n.data.count;o.loadingProduct=!1}function d(n){o.loadingRegister=!1;o.registerButtonText="Register";o.isError=!0;o.errorMessage=n.data.Message}function g(){u.setTag("description",o.conference.Title)}function nt(){var n=new Date(o.conference.Date);return n.setHours(0,0,0),new Date(n.toString())}t.$broadcast("updatePageLocation","home");n.pageClass="page-conference";var o=this;o.title="maldives-2025";o.trust=r.trustAsHtml;o.conferenceHeaderPageContent=n.$parent.getPageContent("FinancialSummitHeader");o.conferenceMainPageContent=n.$parent.getPageContent("FinancialSummitMain");o.conferenceFooterPageContent=n.$parent.getPageContent("FinancialSummitFooter");o.trustSrc=function(n){return r.trustAsResourceUrl(n)};o.datepicker={};o.enddatepicker={};o.dateOptions={formatYear:"yy",startingDay:1,showWeeks:!1,startDate:"-7d",endDate:"+7d"};o.openDatePicker=function(n){n.preventDefault();n.stopPropagation();o.datepicker.opened=!0};o.openEndDatePicker=function(n){n.preventDefault();n.stopPropagation();o.enddatepicker.opened=!0};o.submitButtonText="Submit";o.showRooms=!1;o.conference={};o.conference.Date=nt();o.conferenceProducts=[];o.conferenceProductsForPurchase=[];o.products=[];o.seatsLeft1=0;o.seatsLeft2=0;o.enabledDiscounts=0;o.loadingProduct=!0;o.startDate=new Date;o.endDate=new Date;o.upgrade=!1;o.additionalPerson=!1;o.additionalPersonName="";o.isFullScheduleExpanded=!1;o.expandFullScheduleText="Expand to Show All";o.loadingRegister=!1;o.isRegistered=!1;o.registerButtonText="Register";o.loadingProposal=!1;o.isProposalCompleted=!1;o.proposalButtonText="Submit Proposal";o.proposal={CreatedDate:new Date};o.isError=!1;o.errorMessage="";o.cacheKey="";o.cacheKey2="";o.cacheKey3="";o.cacheKey4="";o.message={CreatedDate:new Date,Contacted:!1};o.customer={CurrencyTypeID:"",ConferenceID:null,ConferenceProductId:null,Room:null};o.setDates=function(){var n=o.conferenceProducts.filter(function(n){return n.ID==o.customer.ConferenceProductId});o.conference=n[0].Conference;o.startDate=o.conference.StartDate;o.endDate=o.conference.EndDate};o.showOther=function(){$("#other").slideToggle("slow")};o.showMoreSpeakers=function(){$("#bottomSpeakers").slideToggle("slow")};o.showDates=function(){$("#additionalDates").slideToggle("slow")};o.showConsent=function(){$("#consent").slideToggle("slow");$("#readMore").hide()};o.onRoomChange=function(){};o.expandFullSchedule=function(){o.isFullScheduleExpanded?(o.isFullScheduleExpanded=!1,o.expandFullScheduleText="Expand to Show All",$(".fa-arrow-up").hide(),$(".fa-arrow-down").show()):(o.isFullScheduleExpanded=!0,o.expandFullScheduleText="Hide Full Speaker List",$(".fa-arrow-up").show(),$(".fa-arrow-down").hide())};o.showCouponCode=function(){$("#couponCode").slideToggle("slow")};o.registerContinue=function(n){if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});o.showRooms=!0;return}};o.register=function(n){var r,h;if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});return}var u=o.conferenceProducts[0].Price/o.conferenceProducts[0].PriceFiat,e=o.conferenceProducts[0].PriceFiat/o.conferenceProducts[0].Price,s=2e3,i=o.customer.Room,t=i.replace(/\D/g,"");t=t*5;i=i.replace("_"," ");i=i.replace("-"," ");var c=new Date(o.conference.StartDate),a=new Date(o.conference.EndDate),v=Math.abs(c-a),y=Math.ceil(v/864e5);o.customer.NotesToConference==undefined&&(o.customer.NotesToConference="");o.customer.Misc=o.customer.NotesToConference;o.additionalPerson?(o.customer.Misc+="*** Additional Person: ",o.customer.Misc+=o.additionalPersonName,o.customer.ConferenceCalculatedPrice=u*s,o.customer.ConferenceCalculatedFiatPrice=s,o.customer.AdditionalPerson=!0):o.customer.AdditionalPerson=!1;t>0&&(o.customer.ConferenceCalculatedPrice!=undefined?(o.customer.ConferenceCalculatedPrice+=u*t,o.customer.ConferenceCalculatedFiatPrice+=t):(o.customer.ConferenceCalculatedPrice=u*t,o.customer.ConferenceCalculatedFiatPrice=t));o.customer.Misc+=" *** Room Selected: ";o.customer.Misc+=i;o.customer.ConferenceCalculatedPrice!=undefined&&(o.customer.Misc+=" *** Additional Cost: "+parseFloat(o.customer.ConferenceCalculatedPrice.toFixed(5)),r=o.customer.ConferenceCalculatedPrice+o.conferenceProducts[0].Price,h=o.customer.ConferenceCalculatedFiatPrice+o.conferenceProducts[0].PriceFiat,o.customer.Misc+=" *** Total Cost: "+parseFloat(r.toFixed(5))+" ( "+l.format(e*r)+" )",o.customer.Misc+=" *** BTC Price: "+parseFloat(e.toFixed(2))+" ***",o.customer.ConferenceCalculatedPrice=r,o.customer.ConferenceCalculatedPrice=parseFloat(o.customer.ConferenceCalculatedPrice.toFixed(5)),o.customer.ConferenceCalculatedFiatPrice=h);o.loadingRegister=!0;o.registerButtonText="Please Wait...";f.post("/api/orders/new",o.customer,b,d)};const l=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:2});o.selectConferenceProduct=function(n){o.customer.ConferenceProductId=n};o.submit=function(n){if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});return}o.loading=!0;o.submitButtonText="Please Wait...";f.post("/api/emails/conference",o.message,y,p)};o.submitProposal=function(n){if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});return}o.loadingProposal=!0;o.proposalButtonText="Please Wait...";f.post("/api/emails/proposal",o.proposal,a,v)};n.$on("pageContentLoaded",function(){o.conferenceHeaderPageContent=n.$parent.getPageContent("FinancialSummitHeader");o.conferenceMainPageContent=n.$parent.getPageContent("FinancialSummitMain");o.conferenceFooterPageContent=n.$parent.getPageContent("FinancialSummitFooter")});w();loadMasks();setTimeout(function(){$("#VenueAddress").html(o.conference.VenueAddress);$("#VenueTitle").html(o.conference.VenueTitle)},1e3)}n.controller("indexCtrl",t);t.$inject=["$scope","$rootScope","$filter","$sce","ngMeta","apiService","notificationService"]}(angular.module("app")),function(n){"use strict";function t(n,t,i,r,u,f,e){function a(t){o.loadingProposal=!1;o.proposalButtonText="Submit";o.isProposalCompleted=!0;o.isError=!1;o.errorMessage="";o.proposal=t.data;n.sForm3.$setPristine()}function v(n){o.loadingProposal=!1;o.proposalButtonText="Submit";o.isError=!0;o.errorMessage=n.data.Message}function y(t){o.loading=!1;o.submitButtonText="Submit";o.isCompleted=!0;o.isError=!1;o.errorMessage="";o.customer=t.data;n.sForm3.$setPristine()}function p(n){o.loading=!1;o.submitButtonText="Submit";o.isError=!0;o.errorMessage=n.data.Message}function w(){var n="/api/conferenceproducts/title/"+decodeURIComponent(o.title);o.cacheKey2=n;sessionStorage.getItem(o.cacheKey2)==null?f.get(n,null,h,s):h(JSON.parse(sessionStorage.getItem(o.cacheKey2)))}function s(n){e.displayError(n.data.Message)}function h(n){sessionStorage.getItem(o.cacheKey2)==null&&sessionStorage.setItem(o.cacheKey2,JSON.stringify(n));var t=n.data;t.length>0&&(o.conferenceProducts=t,o.conference=o.conferenceProducts[0].Conference,o.startDate=o.conference.StartDate,o.endDate=o.conference.EndDate,g(),o.conferenceProductsForPurchase=o.conferenceProducts.filter(function(n){return n.IsSoldOut==!1}),o.conferenceProductsForPurchase.length>0&&(o.customer.ConferenceProductId=o.conferenceProducts[0].ID,o.setDates()),o.drProducts=t.filter(function(n){return n.Conference.Title.indexOf("Republic")>-1&&n.IsSoldOut==!1}),o.drProducts.length>0&&(o.seatsLeft1=o.drProducts[0].SeatsLeft),k(),$("#VenueAddress").html(o.conference.VenueAddress),$("#VenueTitle").html(o.conference.VenueTitle))}function b(t){o.loadingRegister=!1;o.registerButtonText="";o.isError=!1;o.errorMessage="";t.data.redirectUrl!=null?window.location.href=t.data.redirectUrl:(o.isRegistered=!0,n.sForm.$setPristine(),$("html, body").animate({scrollTop:$("#registration").offset().top-30},1e3))}function k(){var n="/api/discounts/count/3";o.cacheKey4=n;sessionStorage.getItem(o.cacheKey4)==null?f.get(n,null,c,s):c(JSON.parse(sessionStorage.getItem(o.cacheKey4)))}function c(n){sessionStorage.getItem(o.cacheKey4)==null&&sessionStorage.setItem(o.cacheKey4,JSON.stringify(n));o.enabledDiscounts=n.data.count;o.loadingProduct=!1}function d(n){o.loadingRegister=!1;o.registerButtonText="Register";o.isError=!0;o.errorMessage=n.data.Message}function g(){u.setTag("description",o.conference.Title)}function nt(){var n=new Date(o.conference.Date);return n.setHours(0,0,0),new Date(n.toString())}t.$broadcast("updatePageLocation","register");n.pageClass="page-conference";var o=this;o.title="dubai-2023";o.trust=r.trustAsHtml;o.conferenceHeaderPageContent=n.$parent.getPageContent("FinancialSummitHeader");o.trustSrc=function(n){return r.trustAsResourceUrl(n)};o.datepicker={};o.enddatepicker={};o.dateOptions={formatYear:"yy",startingDay:1,showWeeks:!1,startDate:"-7d",endDate:"+7d"};o.openDatePicker=function(n){n.preventDefault();n.stopPropagation();o.datepicker.opened=!0};o.openEndDatePicker=function(n){n.preventDefault();n.stopPropagation();o.enddatepicker.opened=!0};o.submitButtonText="Submit";o.showRooms=!1;o.conference={};o.conference.Date=nt();o.conferenceProducts=[];o.conferenceProductsForPurchase=[];o.products=[];o.seatsLeft1=0;o.seatsLeft2=0;o.enabledDiscounts=0;o.loadingProduct=!0;o.startDate=new Date;o.endDate=new Date;o.upgrade=!1;o.additionalPerson=!1;o.additionalPersonName="";o.isFullScheduleExpanded=!1;o.expandFullScheduleText="Expand to Show All";o.loadingRegister=!1;o.isRegistered=!1;o.registerButtonText="Register";o.loadingProposal=!1;o.isProposalCompleted=!1;o.proposalButtonText="Submit Proposal";o.proposal={CreatedDate:new Date};o.isError=!1;o.errorMessage="";o.cacheKey="";o.cacheKey2="";o.cacheKey3="";o.cacheKey4="";o.message={CreatedDate:new Date,Contacted:!1};o.customer={CurrencyTypeID:"",ConferenceID:null,ConferenceProductId:null,Room:null};o.setDates=function(){var n=o.conferenceProducts.filter(function(n){return n.ID==o.customer.ConferenceProductId});o.conference=n[0].Conference;o.startDate=o.conference.StartDate;o.endDate=o.conference.EndDate};o.showOther=function(){$("#other").slideToggle("slow")};o.showMoreSpeakers=function(){$("#bottomSpeakers").slideToggle("slow")};o.showDates=function(){$("#additionalDates").slideToggle("slow")};o.showConsent=function(){$("#consent").slideToggle("slow");$("#readMore").hide()};o.onRoomChange=function(){};o.expandFullSchedule=function(){o.isFullScheduleExpanded?(o.isFullScheduleExpanded=!1,o.expandFullScheduleText="Expand to Show All",$(".fa-arrow-up").hide(),$(".fa-arrow-down").show()):(o.isFullScheduleExpanded=!0,o.expandFullScheduleText="Hide Full Speaker List",$(".fa-arrow-up").show(),$(".fa-arrow-down").hide())};o.showCouponCode=function(){$("#couponCode").slideToggle("slow")};o.registerContinue=function(n){if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});o.showRooms=!0;return}};o.register=function(n){var t,u;if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});return}var e=o.conferenceProducts[0].Price/o.conferenceProducts[0].PriceFiat,i=o.conferenceProducts[0].PriceFiat/o.conferenceProducts[0].Price,r=1e3,s=new Date(o.conference.StartDate),h=new Date(o.conference.EndDate),c=Math.abs(s-h),a=Math.ceil(c/864e5);o.customer.NotesToConference==undefined&&(o.customer.NotesToConference="");o.customer.Misc=o.customer.NotesToConference;o.additionalPerson?(o.customer.Misc+="*** Additional Person: ",o.customer.Misc+=o.additionalPersonName,o.customer.ConferenceCalculatedPrice=e*r,o.customer.ConferenceCalculatedFiatPrice=r,o.customer.AdditionalPerson=!0):o.customer.AdditionalPerson=!1;o.customer.ConferenceCalculatedPrice!=undefined&&(o.customer.Misc+=" *** Additional Cost: "+parseFloat(o.customer.ConferenceCalculatedPrice.toFixed(5)),t=o.customer.ConferenceCalculatedPrice+o.conferenceProducts[0].Price,u=o.customer.ConferenceCalculatedFiatPrice+o.conferenceProducts[0].PriceFiat,o.customer.Misc+=" *** Total Cost: "+parseFloat(t.toFixed(5))+" ( "+l.format(i*t)+" )",o.customer.Misc+=" *** BTC Price: "+parseFloat(i.toFixed(2))+" ***",o.customer.ConferenceCalculatedPrice=t,o.customer.ConferenceCalculatedPrice=parseFloat(o.customer.ConferenceCalculatedPrice.toFixed(5)),o.customer.ConferenceCalculatedFiatPrice=u);o.loadingRegister=!0;o.registerButtonText="Please Wait...";f.post("/api/orders/new",o.customer,b,d)};const l=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:2});o.selectConferenceProduct=function(n){o.customer.ConferenceProductId=n};o.submit=function(n){if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});return}o.loading=!0;o.submitButtonText="Please Wait...";f.post("/api/emails/conference",o.message,y,p)};o.submitProposal=function(n){if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});return}o.loadingProposal=!0;o.proposalButtonText="Please Wait...";f.post("/api/emails/proposal",o.proposal,a,v)};n.$on("pageContentLoaded",function(){o.conferenceHeaderPageContent=n.$parent.getPageContent("FinancialSummitHeader");o.conferenceMainPageContent=n.$parent.getPageContent("FinancialSummitMain");o.conferenceFooterPageContent=n.$parent.getPageContent("FinancialSummitFooter")});w();loadMasks();setTimeout(function(){$("#VenueAddress").html(o.conference.VenueAddress);$("#VenueTitle").html(o.conference.VenueTitle)},1e3)}n.controller("registerCtrl",t);t.$inject=["$scope","$rootScope","$filter","$sce","ngMeta","apiService","notificationService"]}(angular.module("app")),function(n){"use strict";function t(n,t,i,r,u,f,e){function a(t){o.loadingProposal=!1;o.proposalButtonText="Submit";o.isProposalCompleted=!0;o.isError=!1;o.errorMessage="";o.proposal=t.data;n.sForm3.$setPristine()}function v(n){o.loadingProposal=!1;o.proposalButtonText="Submit";o.isError=!0;o.errorMessage=n.data.Message}function y(t){o.loading=!1;o.submitButtonText="Submit";o.isCompleted=!0;o.isError=!1;o.errorMessage="";o.customer=t.data;n.sForm3.$setPristine()}function p(n){o.loading=!1;o.submitButtonText="Submit";o.isError=!0;o.errorMessage=n.data.Message}function w(){var n="/api/conferenceproducts/title/"+decodeURIComponent(o.title);o.cacheKey2=n;sessionStorage.getItem(o.cacheKey2)==null?f.get(n,null,h,s):h(JSON.parse(sessionStorage.getItem(o.cacheKey2)))}function s(n){e.displayError(n.data.Message)}function h(n){sessionStorage.getItem(o.cacheKey2)==null&&sessionStorage.setItem(o.cacheKey2,JSON.stringify(n));var t=n.data;t.length>0&&(o.conferenceProducts=t,o.conference=o.conferenceProducts[0].Conference,o.startDate=o.conference.StartDate,o.endDate=o.conference.EndDate,g(),o.conferenceProductsForPurchase=o.conferenceProducts.filter(function(n){return n.IsSoldOut==!1}),o.conferenceProductsForPurchase.length>0&&(o.customer.ConferenceProductId=o.conferenceProducts[0].ID,o.setDates()),o.drProducts=t.filter(function(n){return n.Conference.Title.indexOf("Republic")>-1&&n.IsSoldOut==!1}),o.drProducts.length>0&&(o.seatsLeft1=o.drProducts[0].SeatsLeft),k(),$("#VenueAddress").html(o.conference.VenueAddress),$("#VenueTitle").html(o.conference.VenueTitle))}function b(t){o.loadingRegister=!1;o.registerButtonText="";o.isError=!1;o.errorMessage="";t.data.redirectUrl!=null?window.location.href=t.data.redirectUrl:(o.isRegistered=!0,n.sForm.$setPristine(),$("html, body").animate({scrollTop:$("#registration").offset().top-30},1e3))}function k(){var n="/api/discounts/count/3";o.cacheKey4=n;sessionStorage.getItem(o.cacheKey4)==null?f.get(n,null,c,s):c(JSON.parse(sessionStorage.getItem(o.cacheKey4)))}function c(n){sessionStorage.getItem(o.cacheKey4)==null&&sessionStorage.setItem(o.cacheKey4,JSON.stringify(n));o.enabledDiscounts=n.data.count;o.loadingProduct=!1}function d(n){o.loadingRegister=!1;o.registerButtonText="Register";o.isError=!0;o.errorMessage=n.data.Message}function g(){u.setTag("description",o.conference.Title)}function nt(){var n=new Date(o.conference.Date);return n.setHours(0,0,0),new Date(n.toString())}t.$broadcast("updatePageLocation","maldives");n.pageClass="page-conference";var o=this;o.title="maldives-2025";o.trust=r.trustAsHtml;o.conferenceHeaderPageContent=n.$parent.getPageContent("FinancialSummitMaldivesHeader");o.conferenceMainPageContent=n.$parent.getPageContent("FinancialSummitMaldivesMain");o.conferenceFooterPageContent=n.$parent.getPageContent("FinancialSummitMaldivesFooter");o.trustSrc=function(n){return r.trustAsResourceUrl(n)};o.datepicker={};o.enddatepicker={};o.dateOptions={formatYear:"yy",startingDay:1,showWeeks:!1,startDate:"-7d",endDate:"+7d"};o.openDatePicker=function(n){n.preventDefault();n.stopPropagation();o.datepicker.opened=!0};o.openEndDatePicker=function(n){n.preventDefault();n.stopPropagation();o.enddatepicker.opened=!0};o.submitButtonText="Submit";o.showRooms=!1;o.conference={};o.conference.Date=nt();o.conferenceProducts=[];o.conferenceProductsForPurchase=[];o.products=[];o.seatsLeft1=0;o.seatsLeft2=0;o.enabledDiscounts=0;o.loadingProduct=!0;o.startDate=new Date;o.endDate=new Date;o.upgrade=!1;o.additionalPerson=!1;o.additionalPersonName="";o.isFullScheduleExpanded=!1;o.expandFullScheduleText="Expand to Show All";o.loadingRegister=!1;o.isRegistered=!1;o.registerButtonText="Register";o.loadingProposal=!1;o.isProposalCompleted=!1;o.proposalButtonText="Submit Proposal";o.proposal={CreatedDate:new Date};o.isError=!1;o.errorMessage="";o.cacheKey="";o.cacheKey2="";o.cacheKey3="";o.cacheKey4="";o.message={CreatedDate:new Date,Contacted:!1};o.customer={CurrencyTypeID:"",ConferenceID:null,ConferenceProductId:null,Room:null};o.setDates=function(){var n=o.conferenceProducts.filter(function(n){return n.ID==o.customer.ConferenceProductId});o.conference=n[0].Conference;o.startDate=o.conference.StartDate;o.endDate=o.conference.EndDate};o.showOther=function(){$("#other").slideToggle("slow")};o.showMoreSpeakers=function(){$("#bottomSpeakers").slideToggle("slow")};o.showDates=function(){$("#additionalDates").slideToggle("slow")};o.showConsent=function(){$("#consent").slideToggle("slow");$("#readMore").hide()};o.onRoomChange=function(){};o.expandFullSchedule=function(){o.isFullScheduleExpanded?(o.isFullScheduleExpanded=!1,o.expandFullScheduleText="Expand to Show All",$(".fa-arrow-up").hide(),$(".fa-arrow-down").show()):(o.isFullScheduleExpanded=!0,o.expandFullScheduleText="Hide Full Speaker List",$(".fa-arrow-up").show(),$(".fa-arrow-down").hide())};o.showCouponCode=function(){$("#couponCode").slideToggle("slow")};o.registerContinue=function(n){if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});o.showRooms=!0;return}};o.register=function(n){var t,u;if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});return}var e=o.conferenceProducts[0].Price/o.conferenceProducts[0].PriceFiat,i=o.conferenceProducts[0].PriceFiat/o.conferenceProducts[0].Price,r=1e3,s=new Date(o.conference.StartDate),h=new Date(o.conference.EndDate),c=Math.abs(s-h),a=Math.ceil(c/864e5);o.customer.NotesToConference==undefined&&(o.customer.NotesToConference="");o.customer.Misc=o.customer.NotesToConference;o.additionalPerson?(o.customer.Misc+="*** Additional Person: ",o.customer.Misc+=o.additionalPersonName,o.customer.ConferenceCalculatedPrice=e*r,o.customer.ConferenceCalculatedFiatPrice=r,o.customer.AdditionalPerson=!0):o.customer.AdditionalPerson=!1;o.customer.ConferenceCalculatedPrice!=undefined&&(o.customer.Misc+=" *** Additional Cost: "+parseFloat(o.customer.ConferenceCalculatedPrice.toFixed(5)),t=o.customer.ConferenceCalculatedPrice+o.conferenceProducts[0].Price,u=o.customer.ConferenceCalculatedFiatPrice+o.conferenceProducts[0].PriceFiat,o.customer.Misc+=" *** Total Cost: "+parseFloat(t.toFixed(5))+" ( "+l.format(i*t)+" )",o.customer.Misc+=" *** BTC Price: "+parseFloat(i.toFixed(2))+" ***",o.customer.ConferenceCalculatedPrice=t,o.customer.ConferenceCalculatedPrice=parseFloat(o.customer.ConferenceCalculatedPrice.toFixed(5)),o.customer.ConferenceCalculatedFiatPrice=u);o.loadingRegister=!0;o.registerButtonText="Please Wait...";f.post("/api/orders/new",o.customer,b,d)};const l=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:2});o.selectConferenceProduct=function(n){o.customer.ConferenceProductId=n};o.submit=function(n){if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});return}o.loading=!0;o.submitButtonText="Please Wait...";f.post("/api/emails/conference",o.message,y,p)};o.submitProposal=function(n){if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});return}o.loadingProposal=!0;o.proposalButtonText="Please Wait...";f.post("/api/emails/proposal",o.proposal,a,v)};n.$on("pageContentLoaded",function(){o.conferenceHeaderPageContent=n.$parent.getPageContent("FinancialSummitMaldivesHeader");o.conferenceMainPageContent=n.$parent.getPageContent("FinancialSummitMaldivesMain");o.conferenceFooterPageContent=n.$parent.getPageContent("FinancialSummitMaldivesFooter")});w();loadMasks();setTimeout(function(){$("#VenueAddress").html(o.conference.VenueAddress);$("#VenueTitle").html(o.conference.VenueTitle)},1e3)}n.controller("maldivesCtrl",t);t.$inject=["$scope","$rootScope","$filter","$sce","ngMeta","apiService","notificationService"]}(angular.module("app")),function(n){"use strict";function t(n,t,i,r,u,f,e){function a(t){o.loadingProposal=!1;o.proposalButtonText="Submit";o.isProposalCompleted=!0;o.isError=!1;o.errorMessage="";o.proposal=t.data;n.sForm3.$setPristine()}function v(n){o.loadingProposal=!1;o.proposalButtonText="Submit";o.isError=!0;o.errorMessage=n.data.Message}function y(t){o.loading=!1;o.submitButtonText="Submit";o.isCompleted=!0;o.isError=!1;o.errorMessage="";o.customer=t.data;n.sForm3.$setPristine()}function p(n){o.loading=!1;o.submitButtonText="Submit";o.isError=!0;o.errorMessage=n.data.Message}function w(){var n="/api/conferenceproducts/title/"+decodeURIComponent(o.title);o.cacheKey2=n;sessionStorage.getItem(o.cacheKey2)==null?f.get(n,null,h,s):h(JSON.parse(sessionStorage.getItem(o.cacheKey2)))}function s(n){e.displayError(n.data.Message)}function h(n){sessionStorage.getItem(o.cacheKey2)==null&&sessionStorage.setItem(o.cacheKey2,JSON.stringify(n));var t=n.data;t.length>0&&(o.conferenceProducts=t,o.conference=o.conferenceProducts[0].Conference,o.startDate=o.conference.StartDate,o.endDate=o.conference.EndDate,g(),o.conferenceProductsForPurchase=o.conferenceProducts.filter(function(n){return n.IsSoldOut==!1}),o.conferenceProductsForPurchase.length>0&&(o.customer.ConferenceProductId=o.conferenceProducts[0].ID,o.setDates()),o.drProducts=t.filter(function(n){return n.Conference.Title.indexOf("Republic")>-1&&n.IsSoldOut==!1}),o.drProducts.length>0&&(o.seatsLeft1=o.drProducts[0].SeatsLeft),k(),$("#VenueAddress").html(o.conference.VenueAddress),$("#VenueTitle").html(o.conference.VenueTitle))}function b(t){o.loadingRegister=!1;o.registerButtonText="";o.isError=!1;o.errorMessage="";t.data.redirectUrl!=null?window.location.href=t.data.redirectUrl:(o.isRegistered=!0,n.sForm.$setPristine(),$("html, body").animate({scrollTop:$("#registration").offset().top-30},1e3))}function k(){var n="/api/discounts/count/3";o.cacheKey4=n;sessionStorage.getItem(o.cacheKey4)==null?f.get(n,null,c,s):c(JSON.parse(sessionStorage.getItem(o.cacheKey4)))}function c(n){sessionStorage.getItem(o.cacheKey4)==null&&sessionStorage.setItem(o.cacheKey4,JSON.stringify(n));o.enabledDiscounts=n.data.count;o.loadingProduct=!1}function d(n){o.loadingRegister=!1;o.registerButtonText="Register";o.isError=!0;o.errorMessage=n.data.Message}function g(){u.setTag("description",o.conference.Title)}function nt(){var n=new Date(o.conference.Date);return n.setHours(0,0,0),new Date(n.toString())}t.$broadcast("updatePageLocation","bali");n.pageClass="page-conference";var o=this;o.title="bali-2022";o.trust=r.trustAsHtml;o.conferenceHeaderPageContent=n.$parent.getPageContent("FinancialSummitBaliHeader");o.conferenceMainPageContent=n.$parent.getPageContent("FinancialSummitBaliMain");o.conferenceFooterPageContent=n.$parent.getPageContent("FinancialSummitBaliFooter");o.trustSrc=function(n){return r.trustAsResourceUrl(n)};o.datepicker={};o.enddatepicker={};o.dateOptions={formatYear:"yy",startingDay:1,showWeeks:!1,startDate:"-7d",endDate:"+7d"};o.openDatePicker=function(n){n.preventDefault();n.stopPropagation();o.datepicker.opened=!0};o.openEndDatePicker=function(n){n.preventDefault();n.stopPropagation();o.enddatepicker.opened=!0};o.submitButtonText="Submit";o.showRooms=!1;o.conference={};o.conference.Date=nt();o.conferenceProducts=[];o.conferenceProductsForPurchase=[];o.products=[];o.seatsLeft1=0;o.seatsLeft2=0;o.enabledDiscounts=0;o.loadingProduct=!0;o.startDate=new Date;o.endDate=new Date;o.upgrade=!1;o.additionalPerson=!1;o.additionalPersonName="";o.isFullScheduleExpanded=!1;o.expandFullScheduleText="Expand to Show All";o.loadingRegister=!1;o.isRegistered=!1;o.registerButtonText="Register";o.loadingProposal=!1;o.isProposalCompleted=!1;o.proposalButtonText="Submit Proposal";o.proposal={CreatedDate:new Date};o.isError=!1;o.errorMessage="";o.cacheKey="";o.cacheKey2="";o.cacheKey3="";o.cacheKey4="";o.message={CreatedDate:new Date,Contacted:!1};o.customer={CurrencyTypeID:"",ConferenceID:null,ConferenceProductId:null,Room:null};o.setDates=function(){var n=o.conferenceProducts.filter(function(n){return n.ID==o.customer.ConferenceProductId});o.conference=n[0].Conference;o.startDate=o.conference.StartDate;o.endDate=o.conference.EndDate};o.showOther=function(){$("#other").slideToggle("slow")};o.showMoreSpeakers=function(){$("#bottomSpeakers").slideToggle("slow")};o.showDates=function(){$("#additionalDates").slideToggle("slow")};o.showConsent=function(){$("#consent").slideToggle("slow");$("#readMore").hide()};o.onRoomChange=function(){};o.expandFullSchedule=function(){o.isFullScheduleExpanded?(o.isFullScheduleExpanded=!1,o.expandFullScheduleText="Expand to Show All",$(".fa-arrow-up").hide(),$(".fa-arrow-down").show()):(o.isFullScheduleExpanded=!0,o.expandFullScheduleText="Hide Full Speaker List",$(".fa-arrow-up").show(),$(".fa-arrow-down").hide())};o.showCouponCode=function(){$("#couponCode").slideToggle("slow")};o.registerContinue=function(n){if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});o.showRooms=!0;return}};o.register=function(n){var r,h;if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});return}var u=o.conferenceProducts[0].Price/o.conferenceProducts[0].PriceFiat,e=o.conferenceProducts[0].PriceFiat/o.conferenceProducts[0].Price,s=1e3,i=o.customer.Room,t=i.replace(/\D/g,"");t=t*5;i=i.replace("_"," ");i=i.replace("-"," ");var c=new Date(o.conference.StartDate),a=new Date(o.conference.EndDate),v=Math.abs(c-a),y=Math.ceil(v/864e5);o.customer.NotesToConference==undefined&&(o.customer.NotesToConference="");o.customer.Misc=o.customer.NotesToConference;o.additionalPerson?(o.customer.Misc+="*** Additional Person: ",o.customer.Misc+=o.additionalPersonName,o.customer.ConferenceCalculatedPrice=u*s,o.customer.ConferenceCalculatedFiatPrice=s,o.customer.AdditionalPerson=!0):o.customer.AdditionalPerson=!1;t>0&&(o.customer.ConferenceCalculatedPrice!=undefined?(o.customer.ConferenceCalculatedPrice+=u*t,o.customer.ConferenceCalculatedFiatPrice+=t):(o.customer.ConferenceCalculatedPrice=u*t,o.customer.ConferenceCalculatedFiatPrice=t));o.customer.Misc+=" *** Room Selected: ";o.customer.Misc+=i;o.customer.ConferenceCalculatedPrice!=undefined&&(o.customer.Misc+=" *** Additional Cost: "+parseFloat(o.customer.ConferenceCalculatedPrice.toFixed(5)),r=o.customer.ConferenceCalculatedPrice+o.conferenceProducts[0].Price,h=o.customer.ConferenceCalculatedFiatPrice+o.conferenceProducts[0].PriceFiat,o.customer.Misc+=" *** Total Cost: "+parseFloat(r.toFixed(5))+" ( "+l.format(e*r)+" )",o.customer.Misc+=" *** BTC Price: "+parseFloat(e.toFixed(2))+" ***",o.customer.ConferenceCalculatedPrice=r,o.customer.ConferenceCalculatedPrice=parseFloat(o.customer.ConferenceCalculatedPrice.toFixed(5)),o.customer.ConferenceCalculatedFiatPrice=h);o.loadingRegister=!0;o.registerButtonText="Please Wait...";f.post("/api/orders/new",o.customer,b,d)};const l=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:2});o.selectConferenceProduct=function(n){o.customer.ConferenceProductId=n};o.submit=function(n){if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});return}o.loading=!0;o.submitButtonText="Please Wait...";f.post("/api/emails/conference",o.message,y,p)};o.submitProposal=function(n){if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});return}o.loadingProposal=!0;o.proposalButtonText="Please Wait...";f.post("/api/emails/proposal",o.proposal,a,v)};n.$on("pageContentLoaded",function(){o.conferenceHeaderPageContent=n.$parent.getPageContent("FinancialSummitBaliHeader");o.conferenceMainPageContent=n.$parent.getPageContent("FinancialSummitBaliMain");o.conferenceFooterPageContent=n.$parent.getPageContent("FinancialSummitBaliFooter")});w();loadMasks();setTimeout(function(){$("#VenueAddress").html(o.conference.VenueAddress);$("#VenueTitle").html(o.conference.VenueTitle)},1e3)}n.controller("baliCtrl",t);t.$inject=["$scope","$rootScope","$filter","$sce","ngMeta","apiService","notificationService"]}(angular.module("app")),function(n){"use strict";function t(n,t,i,r,u,f,e){function a(t){o.loadingProposal=!1;o.proposalButtonText="Submit";o.isProposalCompleted=!0;o.isError=!1;o.errorMessage="";o.proposal=t.data;n.sForm3.$setPristine()}function v(n){o.loadingProposal=!1;o.proposalButtonText="Submit";o.isError=!0;o.errorMessage=n.data.Message}function y(t){o.loading=!1;o.submitButtonText="Submit";o.isCompleted=!0;o.isError=!1;o.errorMessage="";o.customer=t.data;n.sForm3.$setPristine()}function p(n){o.loading=!1;o.submitButtonText="Submit";o.isError=!0;o.errorMessage=n.data.Message}function w(){var n="/api/conferenceproducts/title/"+decodeURIComponent(o.title);o.cacheKey2=n;sessionStorage.getItem(o.cacheKey2)==null?f.get(n,null,h,s):h(JSON.parse(sessionStorage.getItem(o.cacheKey2)))}function s(n){e.displayError(n.data.Message)}function h(n){sessionStorage.getItem(o.cacheKey2)==null&&sessionStorage.setItem(o.cacheKey2,JSON.stringify(n));var t=n.data;t.length>0&&(o.conferenceProducts=t,o.conference=o.conferenceProducts[0].Conference,o.startDate=o.conference.StartDate,o.endDate=o.conference.EndDate,g(),o.conferenceProductsForPurchase=o.conferenceProducts.filter(function(n){return n.IsSoldOut==!1}),o.conferenceProductsForPurchase.length>0&&(o.customer.ConferenceProductId=o.conferenceProducts[0].ID,o.setDates()),o.drProducts=t.filter(function(n){return n.Conference.Title.indexOf("Republic")>-1&&n.IsSoldOut==!1}),o.drProducts.length>0&&(o.seatsLeft1=o.drProducts[0].SeatsLeft),k(),$("#VenueAddress").html(o.conference.VenueAddress),$("#VenueTitle").html(o.conference.VenueTitle))}function b(t){o.loadingRegister=!1;o.registerButtonText="";o.isError=!1;o.errorMessage="";t.data.redirectUrl!=null?window.location.href=t.data.redirectUrl:(o.isRegistered=!0,n.sForm.$setPristine(),$("html, body").animate({scrollTop:$("#registration").offset().top-30},1e3))}function k(){var n="/api/discounts/count/3";o.cacheKey4=n;sessionStorage.getItem(o.cacheKey4)==null?f.get(n,null,c,s):c(JSON.parse(sessionStorage.getItem(o.cacheKey4)))}function c(n){sessionStorage.getItem(o.cacheKey4)==null&&sessionStorage.setItem(o.cacheKey4,JSON.stringify(n));o.enabledDiscounts=n.data.count;o.loadingProduct=!1}function d(n){o.loadingRegister=!1;o.registerButtonText="Register";o.isError=!0;o.errorMessage=n.data.Message}function g(){u.setTag("description",o.conference.Title)}function nt(){var n=new Date(o.conference.Date);return n.setHours(0,0,0),new Date(n.toString())}t.$broadcast("updatePageLocation","dubai");n.pageClass="page-conference";var o=this;o.title="dubai-2023";o.trust=r.trustAsHtml;o.conferenceHeaderPageContent=n.$parent.getPageContent("FinancialSummitDubaiHeader");o.conferenceMainPageContent=n.$parent.getPageContent("FinancialSummitDubaiMain");o.conferenceFooterPageContent=n.$parent.getPageContent("FinancialSummitDubaiFooter");o.trustSrc=function(n){return r.trustAsResourceUrl(n)};o.datepicker={};o.enddatepicker={};o.dateOptions={formatYear:"yy",startingDay:1,showWeeks:!1,startDate:"-7d",endDate:"+7d"};o.openDatePicker=function(n){n.preventDefault();n.stopPropagation();o.datepicker.opened=!0};o.openEndDatePicker=function(n){n.preventDefault();n.stopPropagation();o.enddatepicker.opened=!0};o.submitButtonText="Submit";o.showRooms=!1;o.conference={};o.conference.Date=nt();o.conferenceProducts=[];o.conferenceProductsForPurchase=[];o.products=[];o.seatsLeft1=0;o.seatsLeft2=0;o.enabledDiscounts=0;o.loadingProduct=!0;o.startDate=new Date;o.endDate=new Date;o.upgrade=!1;o.additionalPerson=!1;o.additionalPersonName="";o.isFullScheduleExpanded=!1;o.expandFullScheduleText="Expand to Show All";o.loadingRegister=!1;o.isRegistered=!1;o.registerButtonText="Register";o.loadingProposal=!1;o.isProposalCompleted=!1;o.proposalButtonText="Submit Proposal";o.proposal={CreatedDate:new Date};o.isError=!1;o.errorMessage="";o.cacheKey="";o.cacheKey2="";o.cacheKey3="";o.cacheKey4="";o.message={CreatedDate:new Date,Contacted:!1};o.customer={CurrencyTypeID:"",ConferenceID:null,ConferenceProductId:null,Room:null};o.setDates=function(){var n=o.conferenceProducts.filter(function(n){return n.ID==o.customer.ConferenceProductId});o.conference=n[0].Conference;o.startDate=o.conference.StartDate;o.endDate=o.conference.EndDate};o.showOther=function(){$("#other").slideToggle("slow")};o.showMoreSpeakers=function(){$("#bottomSpeakers").slideToggle("slow")};o.showDates=function(){$("#additionalDates").slideToggle("slow")};o.showConsent=function(){$("#consent").slideToggle("slow");$("#readMore").hide()};o.onRoomChange=function(){};o.expandFullSchedule=function(){o.isFullScheduleExpanded?(o.isFullScheduleExpanded=!1,o.expandFullScheduleText="Expand to Show All",$(".fa-arrow-up").hide(),$(".fa-arrow-down").show()):(o.isFullScheduleExpanded=!0,o.expandFullScheduleText="Hide Full Speaker List",$(".fa-arrow-up").show(),$(".fa-arrow-down").hide())};o.showCouponCode=function(){$("#couponCode").slideToggle("slow")};o.registerContinue=function(n){if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});o.showRooms=!0;return}};o.register=function(n){var t,u;if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});return}var e=o.conferenceProducts[0].Price/o.conferenceProducts[0].PriceFiat,i=o.conferenceProducts[0].PriceFiat/o.conferenceProducts[0].Price,r=1e3,s=new Date(o.conference.StartDate),h=new Date(o.conference.EndDate),c=Math.abs(s-h),a=Math.ceil(c/864e5);o.customer.NotesToConference==undefined&&(o.customer.NotesToConference="");o.customer.Misc=o.customer.NotesToConference;o.additionalPerson?(o.customer.Misc+="*** Additional Person: ",o.customer.Misc+=o.additionalPersonName,o.customer.ConferenceCalculatedPrice=e*r,o.customer.ConferenceCalculatedFiatPrice=r,o.customer.AdditionalPerson=!0):o.customer.AdditionalPerson=!1;o.customer.ConferenceCalculatedPrice!=undefined&&(o.customer.Misc+=" *** Additional Cost: "+parseFloat(o.customer.ConferenceCalculatedPrice.toFixed(5)),t=o.customer.ConferenceCalculatedPrice+o.conferenceProducts[0].Price,u=o.customer.ConferenceCalculatedFiatPrice+o.conferenceProducts[0].PriceFiat,o.customer.Misc+=" *** Total Cost: "+parseFloat(t.toFixed(5))+" ( "+l.format(i*t)+" )",o.customer.Misc+=" *** BTC Price: "+parseFloat(i.toFixed(2))+" ***",o.customer.ConferenceCalculatedPrice=t,o.customer.ConferenceCalculatedPrice=parseFloat(o.customer.ConferenceCalculatedPrice.toFixed(5)),o.customer.ConferenceCalculatedFiatPrice=u);o.loadingRegister=!0;o.registerButtonText="Please Wait...";f.post("/api/orders/new",o.customer,b,d)};const l=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:2});o.selectConferenceProduct=function(n){o.customer.ConferenceProductId=n};o.submit=function(n){if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});return}o.loading=!0;o.submitButtonText="Please Wait...";f.post("/api/emails/conference",o.message,y,p)};o.submitProposal=function(n){if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});return}o.loadingProposal=!0;o.proposalButtonText="Please Wait...";f.post("/api/emails/proposal",o.proposal,a,v)};n.$on("pageContentLoaded",function(){o.conferenceHeaderPageContent=n.$parent.getPageContent("FinancialSummitDubaiHeader");o.conferenceMainPageContent=n.$parent.getPageContent("FinancialSummitDubaiMain");o.conferenceFooterPageContent=n.$parent.getPageContent("FinancialSummitDubaiFooter")});w();loadMasks();setTimeout(function(){$("#VenueAddress").html(o.conference.VenueAddress);$("#VenueTitle").html(o.conference.VenueTitle)},1e3)}n.controller("dubaiCtrl",t);t.$inject=["$scope","$rootScope","$filter","$sce","ngMeta","apiService","notificationService"]}(angular.module("app")),function(n){"use strict";function t(n,t,i,r,u,f,e){function a(t){o.loadingProposal=!1;o.proposalButtonText="Submit";o.isProposalCompleted=!0;o.isError=!1;o.errorMessage="";o.proposal=t.data;n.sForm3.$setPristine()}function v(n){o.loadingProposal=!1;o.proposalButtonText="Submit";o.isError=!0;o.errorMessage=n.data.Message}function y(t){o.loading=!1;o.submitButtonText="Submit";o.isCompleted=!0;o.isError=!1;o.errorMessage="";o.customer=t.data;n.sForm3.$setPristine()}function p(n){o.loading=!1;o.submitButtonText="Submit";o.isError=!0;o.errorMessage=n.data.Message}function w(){var n="/api/conferenceproducts/title/"+decodeURIComponent(o.title);o.cacheKey2=n;sessionStorage.getItem(o.cacheKey2)==null?f.get(n,null,h,s):h(JSON.parse(sessionStorage.getItem(o.cacheKey2)))}function s(n){e.displayError(n.data.Message)}function h(n){sessionStorage.getItem(o.cacheKey2)==null&&sessionStorage.setItem(o.cacheKey2,JSON.stringify(n));var t=n.data;t.length>0&&(o.conferenceProducts=t,o.conference=o.conferenceProducts[0].Conference,o.startDate=o.conference.StartDate,o.endDate=o.conference.EndDate,g(),o.conferenceProductsForPurchase=o.conferenceProducts.filter(function(n){return n.IsSoldOut==!1}),o.conferenceProductsForPurchase.length>0&&(o.customer.ConferenceProductId=o.conferenceProducts[0].ID,o.setDates()),o.drProducts=t.filter(function(n){return n.Conference.Title.indexOf("Republic")>-1&&n.IsSoldOut==!1}),o.drProducts.length>0&&(o.seatsLeft1=o.drProducts[0].SeatsLeft),k(),$("#VenueAddress").html(o.conference.VenueAddress),$("#VenueTitle").html(o.conference.VenueTitle))}function b(t){o.loadingRegister=!1;o.registerButtonText="";o.isError=!1;o.errorMessage="";t.data.redirectUrl!=null?window.location.href=t.data.redirectUrl:(o.isRegistered=!0,n.sForm.$setPristine(),$("html, body").animate({scrollTop:$("#registration").offset().top-30},1e3))}function k(){var n="/api/discounts/count/3";o.cacheKey4=n;sessionStorage.getItem(o.cacheKey4)==null?f.get(n,null,c,s):c(JSON.parse(sessionStorage.getItem(o.cacheKey4)))}function c(n){sessionStorage.getItem(o.cacheKey4)==null&&sessionStorage.setItem(o.cacheKey4,JSON.stringify(n));o.enabledDiscounts=n.data.count;o.loadingProduct=!1}function d(n){o.loadingRegister=!1;o.registerButtonText="Register";o.isError=!0;o.errorMessage=n.data.Message}function g(){u.setTag("description",o.conference.Title)}function nt(){var n=new Date(o.conference.Date);return n.setHours(0,0,0),new Date(n.toString())}t.$broadcast("updatePageLocation","dr");n.pageClass="page-conference";var o=this;o.title="dr-2022";o.trust=r.trustAsHtml;o.conferenceHeaderPageContent=n.$parent.getPageContent("FinancialSummitDRHeader");o.conferenceMainPageContent=n.$parent.getPageContent("FinancialSummitDRMain");o.conferenceFooterPageContent=n.$parent.getPageContent("FinancialSummitDRFooter");o.trustSrc=function(n){return r.trustAsResourceUrl(n)};o.datepicker={};o.enddatepicker={};o.dateOptions={formatYear:"yy",startingDay:1,showWeeks:!1,startDate:"-7d",endDate:"+7d"};o.openDatePicker=function(n){n.preventDefault();n.stopPropagation();o.datepicker.opened=!0};o.openEndDatePicker=function(n){n.preventDefault();n.stopPropagation();o.enddatepicker.opened=!0};o.submitButtonText="Submit";o.showRooms=!1;o.conference={};o.conference.Date=nt();o.conferenceProducts=[];o.conferenceProductsForPurchase=[];o.products=[];o.seatsLeft1=0;o.seatsLeft2=0;o.enabledDiscounts=0;o.loadingProduct=!0;o.startDate=new Date;o.endDate=new Date;o.upgrade=!1;o.additionalPerson=!1;o.additionalPersonName="";o.isFullScheduleExpanded=!1;o.expandFullScheduleText="Expand to Show All";o.loadingRegister=!1;o.isRegistered=!1;o.registerButtonText="Register";o.loadingProposal=!1;o.isProposalCompleted=!1;o.proposalButtonText="Submit Proposal";o.proposal={CreatedDate:new Date};o.isError=!1;o.errorMessage="";o.cacheKey="";o.cacheKey2="";o.cacheKey3="";o.cacheKey4="";o.message={CreatedDate:new Date,Contacted:!1};o.customer={CurrencyTypeID:"",ConferenceID:null,ConferenceProductId:null,Room:null};o.setDates=function(){var n=o.conferenceProducts.filter(function(n){return n.ID==o.customer.ConferenceProductId});o.conference=n[0].Conference;o.startDate=o.conference.StartDate;o.endDate=o.conference.EndDate};o.showOther=function(){$("#other").slideToggle("slow")};o.showMoreSpeakers=function(){$("#bottomSpeakers").slideToggle("slow")};o.showDates=function(){$("#additionalDates").slideToggle("slow")};o.showConsent=function(){$("#consent").slideToggle("slow");$("#readMore").hide()};o.onRoomChange=function(){};o.expandFullSchedule=function(){o.isFullScheduleExpanded?(o.isFullScheduleExpanded=!1,o.expandFullScheduleText="Expand to Show All",$(".fa-arrow-up").hide(),$(".fa-arrow-down").show()):(o.isFullScheduleExpanded=!0,o.expandFullScheduleText="Hide Full Speaker List",$(".fa-arrow-up").show(),$(".fa-arrow-down").hide())};o.showCouponCode=function(){$("#couponCode").slideToggle("slow")};o.registerContinue=function(n){if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});o.showRooms=!0;return}};o.register=function(n){var r,h;if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});return}var u=o.conferenceProducts[0].Price/o.conferenceProducts[0].PriceFiat,e=o.conferenceProducts[0].PriceFiat/o.conferenceProducts[0].Price,s=2e3,i=o.customer.Room,t=i.replace(/\D/g,"");t=t*5;i=i.replace("_"," ");i=i.replace("-"," ");var c=new Date(o.conference.StartDate),a=new Date(o.conference.EndDate),v=Math.abs(c-a),y=Math.ceil(v/864e5);o.customer.NotesToConference==undefined&&(o.customer.NotesToConference="");o.customer.Misc=o.customer.NotesToConference;o.additionalPerson?(o.customer.Misc+="*** Additional Person: ",o.customer.Misc+=o.additionalPersonName,o.customer.ConferenceCalculatedPrice=u*s,o.customer.ConferenceCalculatedFiatPrice=s,o.customer.AdditionalPerson=!0):o.customer.AdditionalPerson=!1;t>0&&(o.customer.ConferenceCalculatedPrice!=undefined?(o.customer.ConferenceCalculatedPrice+=u*t,o.customer.ConferenceCalculatedFiatPrice+=t):(o.customer.ConferenceCalculatedPrice=u*t,o.customer.ConferenceCalculatedFiatPrice=t));o.customer.Misc+=" *** Room Selected: ";o.customer.Misc+=i;o.customer.ConferenceCalculatedPrice!=undefined&&(o.customer.Misc+=" *** Additional Cost: "+parseFloat(o.customer.ConferenceCalculatedPrice.toFixed(5)),r=o.customer.ConferenceCalculatedPrice+o.conferenceProducts[0].Price,h=o.customer.ConferenceCalculatedFiatPrice+o.conferenceProducts[0].PriceFiat,o.customer.Misc+=" *** Total Cost: "+parseFloat(r.toFixed(5))+" ( "+l.format(e*r)+" )",o.customer.Misc+=" *** BTC Price: "+parseFloat(e.toFixed(2))+" ***",o.customer.ConferenceCalculatedPrice=r,o.customer.ConferenceCalculatedPrice=parseFloat(o.customer.ConferenceCalculatedPrice.toFixed(5)),o.customer.ConferenceCalculatedFiatPrice=h);o.loadingRegister=!0;o.registerButtonText="Please Wait...";f.post("/api/orders/new",o.customer,b,d)};const l=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:2});o.selectConferenceProduct=function(n){o.customer.ConferenceProductId=n};o.submit=function(n){if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});return}o.loading=!0;o.submitButtonText="Please Wait...";f.post("/api/emails/conference",o.message,y,p)};o.submitProposal=function(n){if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});return}o.loadingProposal=!0;o.proposalButtonText="Please Wait...";f.post("/api/emails/proposal",o.proposal,a,v)};n.$on("pageContentLoaded",function(){o.conferenceHeaderPageContent=n.$parent.getPageContent("FinancialSummitHeader");o.conferenceMainPageContent=n.$parent.getPageContent("FinancialSummitMain");o.conferenceFooterPageContent=n.$parent.getPageContent("FinancialSummitFooter")});w();loadMasks();setTimeout(function(){$("#VenueAddress").html(o.conference.VenueAddress);$("#VenueTitle").html(o.conference.VenueTitle)},1e3)}n.controller("drCtrl",t);t.$inject=["$scope","$rootScope","$filter","$sce","ngMeta","apiService","notificationService"]}(angular.module("app")),function(n){"use strict";function t(n,t,i,r,u,f,e){t.$broadcast("updatePageLocation","Bali upgrade");n.pageClass="page-conference";var o=this;o.title="upgrade-2022";o.trust=r.trustAsHtml;o.galleryImages=[];o.loading=!0;o.isError=!1;o.errorMessage="";o.cacheKey="";scrollToTop();setTimeout(function(){$(".image-link").magnificPopup({type:"image"})},250)}n.controller("baliupgradeCtrl",t);t.$inject=["$scope","$rootScope","$filter","$sce","ngMeta","apiService","notificationService"]}(angular.module("app")),function(n){"use strict";function t(n,t,i,r,u,f,e){t.$broadcast("updatePageLocation","Dubai Upgrade");n.pageClass="page-conference";var o=this;o.title="upgrade-2023";o.trust=r.trustAsHtml;o.galleryImages=[];o.loading=!0;o.isError=!1;o.errorMessage="";o.cacheKey="";scrollToTop();setTimeout(function(){$(".image-link").magnificPopup({type:"image"})},250)}n.controller("dubaiupgradeCtrl",t);t.$inject=["$scope","$rootScope","$filter","$sce","ngMeta","apiService","notificationService"]}(angular.module("app")),function(n){"use strict";function t(n,t,i,r,u,f,e){t.$broadcast("updatePageLocation","upgrade");n.pageClass="page-conference";var o=this;o.title="upgrade-2022";o.trust=r.trustAsHtml;o.galleryImages=[];o.loading=!0;o.isError=!1;o.errorMessage="";o.cacheKey="";scrollToTop();setTimeout(function(){$(".image-link").magnificPopup({type:"image"})},250)}n.controller("upgradeCtrl",t);t.$inject=["$scope","$rootScope","$filter","$sce","ngMeta","apiService","notificationService"]}(angular.module("app")),function(n){"use strict";function t(n,t,i,r){t.$broadcast("updatePageLocation","faq");n.pageClass="page-conference";var u=this;u.trust=r.trustAsHtml;u.faqPageContent=n.$parent.getPageContent("FinancialSummitFAQ");u.trustSrc=function(n){return r.trustAsResourceUrl(n)};n.$on("pageContentLoaded",function(){u.faqPageContent=n.$parent.getPageContent("FinancialSummitFAQ")})}n.controller("faqCtrl",t);t.$inject=["$scope","$rootScope","$filter","$sce","ngMeta","apiService","notificationService"]}(angular.module("app")),function(n){"use strict";function t(n,t,i,r){t.$broadcast("updatePageLocation","promo");n.pageClass="page-conference";var u=this;u.trust=r.trustAsHtml;u.promoPageContent=n.$parent.getPageContent("FinancialSummitPromo");u.trustSrc=function(n){return r.trustAsResourceUrl(n)};n.$on("pageContentLoaded",function(){u.promoPageContent=n.$parent.getPageContent("FinancialSummitPromo")})}n.controller("promoCtrl",t);t.$inject=["$scope","$rootScope","$filter","$sce","ngMeta","apiService","notificationService"]}(angular.module("app")),function(n){"use strict";function t(n,t,i,r){t.$broadcast("updatePageLocation","Bali photos");n.pageClass="page-conference";var u=this;u.title="upgrade-2022";u.trust=r.trustAsHtml;scrollToTop();setTimeout(function(){$(".image-link").magnificPopup({type:"image"})},250)}n.controller("dubaiPhotosCtrl",t);t.$inject=["$scope","$rootScope","$filter","$sce","ngMeta","apiService","notificationService"]}(angular.module("app")),function(n){"use strict";function t(n,t,i,r,u){function e(t){f.loading=!1;f.submitButtonText="Submit";f.isCompleted=!0;f.isError=!1;f.errorMessage="";f.customer=t.data;n.sForm2.$setPristine()}function o(n){f.loading=!1;f.submitButtonText="Submit";f.isError=!0;f.errorMessage=n.data.Message}t.$broadcast("updatePageLocation","contact");n.pageClass="page-contact";var f=this;f.isCompleted=!1;f.loading=!1;f.submitButtonText="Submit";f.isError=!1;f.errorMessage="";f.message={CreatedDate:new Date,Contacted:!1};f.submit=function(n){if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});return}f.loading=!0;f.submitButtonText="Please Wait...";u.post("/api/emails/contact",f.message,e,o)}}n.controller("contactCtrl",t);t.$inject=["$scope","$rootScope","$filter","$sce","apiService","notificationService"]}(angular.module("app")),function(n){"use strict";function t(n,t,i,r,u,f){function o(){var n=getUrlParameter("paymentId"),t=getUrlParameter("PayerID"),i=getUrlParameter("token"),r="/api/orders/paypal/"+i+"/"+n+"/"+t;f.get(r,null,s,h)}function s(){e.isValidated=!0;e.isLoading=!1}function h(n){e.isLoading=!1;e.isError=!0;e.errorMessage=n.data.Message;(e.errorMessage==null||e.errorMessage=="")&&(e.errorMessage="Something went wrong.")}t.$broadcast("updatePageLocation","products");n.pageClass="page-products";var e=this;e.isLoading=!0;e.isError=!1;e.isValidated=!1;e.errorMessage="";e.trust=r.trustAsHtml;e.pageContent=n.$parent.getPageContent("PaypalSuccess");e.trustSrc=function(n){return r.trustAsResourceUrl(n)};n.$on("pageContentLoaded",function(){e.pageContent=n.$parent.getPageContent("PaypalSuccess")});scrollToTop();o()}n.controller("paypalSuccessCtrl",t);t.$inject=["$scope","$rootScope","$filter","$sce","$routeParams","apiService","notificationService"]}(angular.module("app")),function(n){"use strict";function t(n,t,i,r,u,f){function o(){var r=getUrlParameter("paymentId"),u=getUrlParameter("PayerID"),n=getUrlParameter("id"),t=getUrlParameter("token"),i="/api/orders/paypalcancel/"+t+"/"+n;f.get(i,null,s,h)}function s(){e.isValidated=!0;e.isLoading=!1}function h(n){e.isLoading=!1;e.isError=!0;e.errorMessage=n.data.Message}t.$broadcast("updatePageLocation","products");n.pageClass="page-products";var e=this;e.isLoading=!0;e.isError=!1;e.isValidated=!1;e.errorMessage="";e.trust=r.trustAsHtml;e.pageContent=n.$parent.getPageContent("PaypalCancel");e.trustSrc=function(n){return r.trustAsResourceUrl(n)};n.$on("pageContentLoaded",function(){e.pageContent=n.$parent.getPageContent("PaypalCancel")});scrollToTop();o()}n.controller("paypalCancelCtrl",t);t.$inject=["$scope","$rootScope","$filter","$sce","$routeParams","apiService","notificationService"]}(angular.module("app")),function(n){"use strict";function t(n,t,i,r,u,f){function o(){e.isLoading=!0;var n="/api/customers/unsubscribe/"+u.cid+"/"+u.uid+"/"+e.email;f.put(n,null,s,h)}function s(){e.isLoading=!1;e.isComplete=!0}function h(n){e.isLoading=!1;e.isError=!0;e.errorMessage=n.data.Message}function c(){e.errorMessage="";e.isError=!1;e.isLoading=!1;e.isValidated=!0}function l(n){e.isLoading=!1;e.isError=!0;e.errorMessage=n.data.Message}function a(){var n="/api/customers/unsubscribe/verify/"+u.cid+"/"+u.uid;f.get(n,null,c,l)}n.pageClass="page-unsubscribe";var e=this;e.isLoading=!0;e.isValidated=!1;e.isComplete=!1;e.errorMessage="";e.isError=!1;e.email="";e.unsubscribe=function(){e.isValidated&&e.email.length>0&&o()};a()}n.controller("unsubscribeCtrl",t);t.$inject=["$scope","$rootScope","$location","$http","$routeParams","apiService","notificationService"]}(angular.module("common.core")),function(n){"use strict";function t(n,t,i,r,u,f){function s(){u.get("/api/admin/home",null,c,h)}function c(n){e.pageContent=n.data;e.isLoading=!1;t.adminTimer=i(l,3e5)}function h(n){f.displayError(n.data);e.isLoading=!1}function l(){n.pageClass=="page-admin-home"&&(e.counter=5,s(),console.info("reloaded"))}var e,o;n.pageClass="page-admin-home";t.$broadcast("updatePageLocation","admin");t.adminTimer=null;e=this;e.pageContent=[];e.isLoading=!0;e.role=t.repository.loggedUser.role;e.counter=5;e.onTimeout=function(){e.counter--;o=i(e.onTimeout,6e4)};o=i(e.onTimeout,6e4);e.username=n.$parent.username;e.logout=n.$parent.logout;e.username=="customer"?e.logout():s()}n.controller("adminCtrl",t);t.$inject=["$scope","$rootScope","$timeout","$http","apiService","notificationService"]}(angular.module("app")),function(n){"use strict";function t(n,t,i,r,u,f,e,o,s){function c(n){s.displaySuccess("Successfully added event price");h.event=n.data;sessionStorage.removeItem("/api/eventprices/public");r.path("/admin/eventprices")}function l(n){s.displayError(n.data.Message)}n.pageClass="page-admin-add-event-price";t.$broadcast("updatePageLocation","admin");var h=this;h.eventPrice={StatusId:"",EventTypeID:"",Title:"",Price:"",Minutes:"",CreatedDate:new Date};h.eventPriceStatus=[{name:"Status",id:""},{name:"Enabled",id:1},{name:"Disabled",id:2}];h.eventTypes=[{name:"Event Type",id:""},{name:"Appointment",id:1},{name:"Consultation",id:2}];h.allDayTypes=[{name:"Select",id:""},{name:"Yes",id:!0},{name:"No",id:!1}];h.allDay="";h.create=function(n){if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});return}h.allDay==!0&&(h.eventPrice.Minutes=0);f.post("/api/eventprices/add",h.eventPrice,c,l)}}n.controller("addEventPriceCtrl",t);t.$inject=["$scope","$rootScope","$routeParams","$location","$modal","apiService","bitcoinService","NgTableParams","notificationService"]}(angular.module("app")),function(n){"use strict";function t(n,t,r,u,f,e,o,s){function c(){var n="/api/eventprices/"+r.id;e.get(n,null,y,p)}function a(){e.put("/api/eventprices/update",h.eventPrice,w,l)}function v(){e.post("/api/eventprices/delete",h.eventPrice,b,l)}function y(n){h.eventPrice=n.data;h.allDay=h.eventPrice.Minutes==0?!0:!1;h.isLoading=!1}function p(n){s.displayError(n.data.Message);h.isLoading=!1}function w(){s.displaySuccess("Successfully updated event price");n.sForm.$setPristine();sessionStorage.removeItem("/api/eventprices/public");h.isLoading=!0;c()}function b(){s.displaySuccess("Successfully deleted event price");u.path("/admin/eventprices")}function l(n){s.displayError(n.data.Message)}n.pageClass="page-admin-edit-event-price";t.$broadcast("updatePageLocation","admin");var h=this;h.isLoading=!0;h.eventPrice={};h.eventPriceStatus=[{name:"Status",id:""},{name:"Enabled",id:1},{name:"Disabled",id:2}];h.eventTypes=[{name:"Event Type",id:""},{name:"Appointment",id:1},{name:"Consultation",id:2}];h.allDayTypes=[{name:"Select",id:""},{name:"Yes",id:!0},{name:"No",id:!1}];h.allDay="";h.closePage=function(){var n=window.location.href;window.history.go(-1);setTimeout(function(){window.location.href==n&&window.close()},500)};h.update=function(n){if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});return}h.allDay==!0&&(h.eventPrice.Minutes=0);a()};h.askDelete=function(){var n='<div class="modal-body">Are you sure you want to delete this?<\/div>',t;n+='<div class="modal-footer"><button class="btn btn-primary" ng-click="vm.ok()">OK<\/button><button class="btn btn-default" ng-click="vm.cancel()">Cancel<\/button><\/div>';t=f.open({template:n,controller:i,controllerAs:"vm"});t.result.then(function(){v()})};c()}function i(n,t){var i=this;i.ok=function(){t.close()};i.cancel=function(){t.dismiss("cancel")}}n.controller("editEventPriceCtrl",t);t.$inject=["$scope","$rootScope","$routeParams","$location","$modal","apiService","NgTableParams","notificationService"];i.$inject=["$scope","$modalInstance"]}(angular.module("app")),function(n){"use strict";function t(n,t,i,r,u,f,e){function s(n){n=n||0;var t={params:{page:n,pageSize:o.pageSize,filter:o.filter,statusId:o.statusId,eventTypeId:o.eventTypeId}};u.get("/api/eventprices",t,h,c)}function h(n){o.eventPrices=n.data.Items;o.pagesCount=n.data.TotalPages;o.totalCount=n.data.TotalCount;var t={page:1,count:o.pageSize,sorting:{}};o.eventPricesTable=new e(t,{counts:[],total:o.totalCount,dataset:o.eventPrices});o.isLoading=!1}function c(n){f.displayError(n.data.Message);o.isLoading=!1}function l(){n.$watch("[vm.filter, vm.statusId, vm.eventTypeId]",function(n){n!=""&&n!=undefined&&n.length>2?s():s(0)})}n.pageClass="page-admin-event-prices";t.$broadcast("updatePageLocation","admin");var o=this;o.eventPricesTable=null;o.eventPrices=[];o.isLoading=!0;o.filter="";o.statusId="";o.eventTypeId="";o.page=0;o.pageSize=10;o.pagesCount=0;o.totalCount=0;o.eventPriceStatus=[{name:"Status",id:""},{name:"Enabled",id:1},{name:"Disabled",id:2}];o.eventTypes=[{name:"Type",id:""},{name:"Appointment",id:1},{name:"Consultation",id:2}];o.edit=function(n){var t=window.location.href+"/edit/"+n.ID;window.open(t,"_blank")};o.pageChanged=function(){s(o.page-1)};o.changePageSize=function(){o.page=0;s(0)};l()}n.controller("eventPricesCtrl",t);t.$inject=["$scope","$rootScope","$filter","$location","apiService","notificationService","NgTableParams"]}(angular.module("app")),function(n){"use strict";function t(n,t,i,r,u,f,e,o,s,h){function y(n){s.displaySuccess("Successfully added event");sessionStorage.removeItem("/api/events/consultation");l?h.uploadImage(l,"event",n.data.eventId,a):a()}function p(){var t=new Date(v(c.event.DateStart)),i=new Date(v(c.event.DateEnd));i<t?n.sForm.endDate.$setValidity("valid",!1):n.sForm.endDate.$setValidity("valid",!0)}function a(){r.path("/admin/events")}function w(n){s.displayError(n.data.Message)}function b(){var t=i.day,r=i.time,u,n;t!=0&&(r!=0?(u=k(r.toLowerCase(),new Date(t)),c.event.DateStart=new Date(u),c.event.DateEnd=c.event.DateStart):(n=new Date(t),n.setHours(n.getHours()+24),c.event.DateStart=n,c.event.DateEnd=c.event.DateStart))}function v(n){return n.getMonth()+1+"/"+n.getDate()+"/"+n.getFullYear()}function k(n,t){var i,r;return n==""?null:(i=n.match(/(\d+)(:(\d\d))?\s*(p?)/i),i==null)?null:(r=parseInt(i[1],10),r!=12||i[4]?r+=r<12&&i[4]?12:0:r=0,t.setHours(r),t.setMinutes(parseInt(i[3],10)||0),t.setSeconds(0,0),t)}n.pageClass="page-admin-add-event";t.$broadcast("updatePageLocation","admin");var c=this,l=null;c.newRandom=Math.random();c.event={EventTypeID:4,Title:"",Description:"",EventURL:"",Country:"US",IsImportant:!0,DateStart:new Date,DateEnd:new Date,CreatedDate:new Date};c.eventTypes=[{name:"Event Type",id:""},{name:"Appointment",id:1},{name:"Consultation",id:2},{name:"Conference",id:4},{name:"Carnivore",id:5}];c.datepicker={};c.datepicker2={};c.dateOptions={formatYear:"yy",startingDay:1,showWeeks:!1};c.openDatePicker=function(n){n.preventDefault();n.stopPropagation();c.datepicker.opened=!0};c.openDatePicker2=function(n){n.preventDefault();n.stopPropagation();c.datepicker2.opened=!0};c.prepareImage=function(n){l=n};c.validateEndDate=function(){p()};c.create=function(n){if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});return}if(c.event.EventTypeID!=1&&c.event.EventTypeID!=2){var t=new Date(c.event.DateStart),i=new Date(c.event.DateEnd);t.setHours(8);i.setHours(8);c.event.DateStart=t;c.event.DateEnd=i}f.post("/api/events/add",c.event,y,w)};b()}n.controller("addEventCtrl",t);t.$inject=["$scope","$rootScope","$routeParams","$location","$modal","apiService","bitcoinService","NgTableParams","notificationService","fileUploadService"]}(angular.module("app")),function(n){"use strict";function t(n,t,r,u,f,e,o,s,h){function w(){var t=new Date(p(c.event.DateStart)),i=new Date(p(c.event.DateEnd));i<t?n.sForm.endDate.$setValidity("valid",!1):n.sForm.endDate.$setValidity("valid",!0)}function a(){var n="/api/events/"+r.id;e.get(n,null,k,g)}function v(){e.put("/api/events/update",c.event,nt,y)}function b(){e.post("/api/events/delete",c.event,tt,y)}function k(n){c.event=n.data;it();c.isLoading=!1}function d(){v()}function g(n){s.displayError(n.data.Message);c.isLoading=!1}function nt(){s.displaySuccess("Successfully updated event");n.sForm.$setPristine();sessionStorage.removeItem("/api/events/consultation");c.isLoading=!0;a()}function tt(){s.displaySuccess("Successfully deleted event");u.path("/admin/events")}function y(n){s.displayError(n.data.Message)}function p(n){var t=new Date(n);return t.getMonth()+1+"/"+t.getDate()+"/"+t.getFullYear()}function it(){var n={start:new Date(c.event.DateStart),title:c.event.Title,description:c.event.Description,location:"Skype or Google Hangouts"};c.event.DateStart!=c.event.DateEnd&&(n.end=new Date(c.event.DateEnd));$("#basicICal").icalendar($.extend({icons:"../../Content/images/ico/icalendar.png"},n))}n.pageClass="page-admin-edit-event";t.$broadcast("updatePageLocation","admin");var c=this,l=null;c.newRandom=Math.random();c.isLoading=!0;c.event={};c.eventTypes=[{name:"Event Type",id:""},{name:"Appointment",id:1},{name:"Consultation",id:2},{name:"Conference",id:4},{name:"Carnivore",id:5}];c.datepicker={};c.datepicker2={};c.dateOptions={formatYear:"yy",startingDay:1,showWeeks:!1};c.openDatePicker=function(n){n.preventDefault();n.stopPropagation();c.datepicker.opened=!0};c.openDatePicker2=function(n){n.preventDefault();n.stopPropagation();c.datepicker2.opened=!0};c.closePage=function(){var n=window.location.href;window.history.go(-1);setTimeout(function(){window.location.href==n&&window.close()},500)};c.prepareImage=function(n){l=n};c.validateEndDate=function(){w()};c.update=function(n){if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});return}if(c.event.EventTypeID!=1&&c.event.EventTypeID!=2){var t=new Date(c.event.DateStart),i=new Date(c.event.DateEnd);t.setHours(8);i.setHours(8);c.event.DateStart=t;c.event.DateEnd=i}l?h.uploadImage(l,"event",c.event.ID,d):v()};c.askDelete=function(){var n='<div class="modal-body">Are you sure you want to delete this?<\/div>',t;n+='<div class="modal-footer"><button class="btn btn-primary" ng-click="vm.ok()">OK<\/button><button class="btn btn-default" ng-click="vm.cancel()">Cancel<\/button><\/div>';t=f.open({template:n,controller:i,controllerAs:"vm"});t.result.then(function(){b()})};a()}function i(n,t){var i=this;i.ok=function(){t.close()};i.cancel=function(){t.dismiss("cancel")}}n.controller("editEventCtrl",t);t.$inject=["$scope","$rootScope","$routeParams","$location","$modal","apiService","NgTableParams","notificationService","fileUploadService"];i.$inject=["$scope","$modalInstance"]}(angular.module("app")),function(n){"use strict";function t(n,t,i,r,u,f,e){function s(n){n=n||0;var t={params:{page:n,pageSize:o.pageSize,filter:o.filter,eventTypeId:o.eventTypeId}};u.get("/api/events/",t,h,c)}function h(n){o.events=n.data.Items;o.pagesCount=n.data.TotalPages;o.totalCount=n.data.TotalCount;var t={page:1,count:o.pageSize,sorting:{}};o.eventsTable=new e(t,{counts:[],total:o.totalCount,dataset:o.events});o.isLoading=!1}function c(n){f.displayError(n.data.Message);o.isLoading=!1}function l(){n.$watch("[vm.filter, vm.eventTypeId]",function(n){n!=""&&n!=undefined&&n.length>2?s():s(0)})}n.pageClass="page-admin-events";t.$broadcast("updatePageLocation","admin");var o=this;o.eventsTable=null;o.events=[];o.isLoading=!0;o.filter="";o.eventTypeId="";o.page=0;o.pageSize=10;o.pagesCount=0;o.totalCount=0;o.eventTypes=[{name:"Event Type",id:""},{name:"Appointment",id:1},{name:"Consultation",id:2},{name:"Conference",id:4},{name:"Carnivore",id:5}];o.edit=function(n){var t=window.location.href+"/edit/"+n.ID;window.open(t,"_blank")};o.pageChanged=function(){s(o.page-1)};o.changePageSize=function(){o.page=0;s(0)};l()}n.controller("eventsAdminCtrl",t);t.$inject=["$scope","$rootScope","$filter","$location","apiService","notificationService","NgTableParams"]}(angular.module("app")),function(n){"use strict";function t(n,t,i,r,u,f){function y(){v();c();sessionStorage.removeItem("/api/eventavailability/consultation");f.displaySuccess("Successfully updated availability")}function c(){e.availability=[];u.get("/api/eventavailability/all",null,d,h)}function p(){u.get("/api/events/all",null,b,h)}function w(){u.get("/api/seminars/all",null,k,h)}function l(){e.eventsForCalendar=[];angular.forEach(e.events,function(n){var i=new Date(n.DateStart),t=new Date(n.DateEnd),r;t=n.DateStart==n.DateEnd?t.setHours(24):Date.parse(t);r={id:"e-"+n.ID,title:n.Title,description:n.Description,url:"/admin/events/edit/"+n.ID,"class":"event-"+n.EventType,eventTypeId:n.EventTypeID,allDay:n.DateStart==n.DateEnd?!0:!1,dateStart:o(i),timeStart:rt(i),start:Date.parse(i),end:t};e.eventsForCalendar.push(r)})}function a(){angular.forEach(e.workshops,function(n){var t=new Date(n.Date),i={id:"w-"+n.ID,title:n.Location,description:n.VenueTitle+" "+n.VenueAddress,url:"/admin/workshops/edit/"+n.ID,"class":"event-Workshop",eventTypeId:3,allDay:!0,dateStart:o(t),start:Date.parse(t),end:new Date(n.Date).setHours(24)};e.eventsForCalendar.push(i)})}function b(n){e.events=n.data;l();w()}function k(n){e.workshops=n.data;a();s()}function d(n){e.availability=n.data}function g(){$(".cal-cell1, .cal-month-day").off();$(".cal-cell1").click(function(){nt(this)});$(".cal-day-inmonth").each(function(n,t){var i=new Date($(t).find("span").attr("data-cal-date")),r;i.setDate(i.getDate()+1);i=o(i);r=e.availability.filter(function(n){return o(new Date(n.Date))===i});r.length>0?$(t).addClass("available"):$(t).addClass("unavailable")});$(".add").remove()}function v(){e.formData.isAvailability=!1;$("#calendar").html("");s()}function nt(n){$(n).find(".cal-day-inmonth").hasClass("unavailable")?$(n).find(".cal-day-inmonth").removeClass("unavailable").addClass("available"):$(n).find(".cal-day-inmonth").removeClass("available").addClass("unavailable")}function tt(){e.monthSelect==0?$(".cal-day-inmonth").each(function(){$(this).removeClass("available").addClass("unavailable")}):$(".cal-day-inmonth").each(function(){$(this).removeClass("unavailable").addClass("available")})}function s(){var t={events_source:e.eventsForCalendar,view:"month",tmpl_path:"../../Content/tmpls/admin/",tmpl_cache:!1,day:"now",modal:!1,display_week_numbers:!1,weekbox:!1,format12:!0,onAfterEventsLoad:function(){},onAfterViewLoad:function(n){n=="month"?$(".availabilityMenu").show():$(".availabilityMenu").hide();$("#hiddenView").val(n);$(".calendar h3").text(this.getTitle());$(".btn-group button").removeClass("active");$('button[data-calendar-view="'+n+'"]').addClass("active")},classes:{months:{general:"label"}}},n=$("#calendar").calendar(t);$(".btn-group button[data-calendar-nav]").each(function(){var t=$(this);t.click(function(){n.navigate(t.data("calendar-nav"))})});$(".btn-group button[data-calendar-view]").each(function(){var t=$(this);t.click(function(){n.view(t.data("calendar-view"))})});$(".events-list a").removeAttr("data-original-title");e.isLoading=!1}function h(n){f.displayError(n.data.Message);e.isLoading=!1}function it(n){f.displayError(n.data.Message)}function rt(n){var t=n.getHours(),i=n.getMinutes(),r=t>=12?"pm":"am";return t=t%12,t=t?t:12,i=i<10?"0"+i:i,t+":"+i+" "+r}function o(n){return n.getMonth()+1+"/"+n.getDate()+"/"+n.getFullYear()}n.pageClass="page-admin-events-calendar";t.$broadcast("updatePageLocation","admin");var e=this;e.events=[];e.eventsForCalendar=[];e.eventTypes=[{name:"Event Type",id:""},{name:"Appointment",id:1},{name:"Consultation",id:2},{name:"Workshop",id:3},{name:"Conference",id:4}];e.workshops=[];e.availability=[];e.isLoading=!0;e.isWorking=!1;e.monthSelect=0;e.formData={isAvailability:!1,eventTypeId:""};e.toggleAvailability=function(){e.formData.isAvailability?g():v()};e.updateAvailability=function(){var n;e.isWorking=!0;n=[];$(".cal-day-inmonth").each(function(t,i){var u=new Date($(i).find("span").attr("data-cal-date")),r;$(i).hasClass("available")&&(r={ID:0,EventTypeID:2,Date:u,CreatedDate:new Date},n.push(r))});var t=$(".cal-day-inmonth:first").find("span").attr("data-cal-date").split("-")[0],i=$(".cal-day-inmonth:first").find("span").attr("data-cal-date").split("-")[1],r=new Date(i+"/1/"+t+" 00:00:00"),f={StartDate:r,Availability:n};u.put("/api/eventavailability/update/batch",f,y,it)};e.selectUnselectMonth=function(){e.monthSelect=e.monthSelect==0?1:0;tt()};e.filterByEventTypeID=function(){e.eventsForCalendar=[];l();a();e.formData.eventTypeId!=""&&(e.eventsForCalendar=e.eventsForCalendar.filter(function(n){return n.eventTypeId===e.formData.eventTypeId}));s()};p();c()}n.controller("eventCalendarCtrl",t);t.$inject=["$scope","$rootScope","$filter","$location","apiService","notificationService","NgTableParams"]}(angular.module("app")),function(n){"use strict";function t(n,t,i,r,u,f,e,o){function h(){f.post("/api/customers/add",s.customer,c,l)}function c(){o.displaySuccess("Successfully added customer");r.path("/admin/customers")}function l(n){o.displayError(n.data.Message)}t.$broadcast("updatePageLocation","admin");n.pageClass="page-admin-add-customer";var s=this;s.customer={StatusId:1,TelegramStatusId:4,ConsultingTimeLeft:0,ReceiveEmails:!0,IndicatorAccess:!1,TradingViewAccess:!1,IsLegacy:!1,DateText:null,LastUpdated:new Date,CreatedDate:new Date};s.create=function(n){if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});return}h()}}n.controller("addCustomerCtrl",t);t.$inject=["$scope","$rootScope","$routeParams","$location","$modal","apiService","NgTableParams","notificationService"]}(angular.module("app")),function(n){"use strict";function i(n,i,r,u,f,e,o,s,h){function g(n){o.put("/api/orders/email/seminarprestreamurl",n,nt,l)}function nt(){h.displaySuccess("Successfully sent meeting link to customer")}function tt(n){o.put("/api/orders/email/seminarstreamurl",n,it,l)}function it(){h.displaySuccess("Successfully sent Youtube link to customer")}function rt(n){o.put("/api/orders/email/seminarconfirmed",n,y,l)}function ut(n){o.put("/api/orders/email/registration",n,y,l)}function ft(n){o.put("/api/orders/email/confirm",n,y,l)}function et(n){o.put("/api/orders/email/finalconfirm",n,y,l)}function y(){h.displaySuccess("Successfully re-sent email")}function ot(){var n="/api/orders/"+r.id;o.get(n,null,b,v)}function st(n){o.post("/api/orders/delete",n,d,l)}function ht(n,t){var i={OrderID:t,CurrencyTypeID:n};o.put("/api/orders/updatecurrency",i,p,l)}function ct(n,t){var i={OrderID:t,SeminarID:c.seminarId};o.put("/api/orders/updateseminar",i,p,l)}function lt(n,t){var i={OrderID:t,IsValid:n};o.put("/api/orders/updatevalidity",i,p,l)}function at(n){var t={OrderID:n,StatusId:3};o.put("/api/orders/confirm",t,fi,l)}function vt(n,t){var i={OrderID:t,IsValid:n};o.put("/api/orders/cancel",i,p,l)}function yt(n){var t={CustomerId:n.CustomerID,InvoiceId:n.InvoiceID,TransactionId:c.formData.transactionId};o.put("/api/orders/payandconfirm/",t,pt,v)}function pt(){h.displaySuccess("Successfully paid and confirmed order");c.isLoading=!0;a()}function wt(n){var t={OrderID:n.ID,DiscountAmount:parseFloat(c.formData.discountAmount)/100};o.put("/api/orders/applydiscount/",t,bt,v)}function bt(){h.displaySuccess("Successfully added discount");c.isLoading=!0;a()}function kt(n){var t={OrderID:n,DiscountAmount:0};o.put("/api/orders/removediscount/",t,dt,v)}function dt(){h.displaySuccess("Successfully removed discount");c.isLoading=!0;a()}function gt(n){var t={Action:c.formData.action,OrderID:n.ID,PaymentAddress:c.formData.paymentAddress,TransactionID:c.formData.transactionId2};o.put("/api/orders/updatepaymentaddress",t,k,l)}function ot(){var n="/api/customers/"+r.id;o.get(n,null,b,v)}function st(){o.post("/api/customers/delete",c.customer,d,l)}function ni(n){console.log(n);o.post("/api/orders/delete",n,oi,l)}function ti(){o.put("/api/customers/update",c.customer,k,l)}function w(){o.put("/api/customers/update/telegram",c.customer,ei,l)}function b(n){typeof n.data!="undefined"?(scrollToTop(),c.customer=n.data,console.info(c.customer),a()):u.path("/admin/customers")}function a(){o.get("/api/orders/customer/"+c.customer.ID,null,ii,v)}function ii(t){var r,i;c.orders=t.data;c.totalRecords=c.orders.length;r={page:1,count:10,sorting:{}};c.ordersTable=new s(n.tableParams,{counts:[],total:c.orders.length,dataset:c.orders});c.orderDetailsTable=new s(n.tableParams,{counts:[],total:c.orders.length,dataset:c.orders});c.isLoading=!1;i=u.hash();i!=""&&c.edit("Orders",80);c.isLoading=!1}function ri(){o.put("/api/orders/renewsubscription",c.customer,ui,l)}function y(){h.displaySuccess("Successfully sent email")}function ui(){h.displaySuccess("Successfully created order and sent customer registration email");a()}function v(n){h.displayError(n.data.Message);c.isLoading=!1}function k(){h.displaySuccess("Successfully updated customer");n.sForm.$setPristine()}function p(){h.displaySuccess("Successfully updated order");c.isLoading=!0;a()}function fi(){h.displaySuccess("Successfully confirmed order");n.sForm.$setPristine();c.isLoading=!0;a()}function ei(){h.displaySuccess("Successfully updated telegram information");n.sForm.$setPristine()}function d(){h.displaySuccess("Successfully deleted customer");u.path("/admin/customers")}function oi(){h.displaySuccess("Successfully deleted order");c.isLoading=!0;a()}function l(n){h.displayError(n.data.Message)}i.$broadcast("updatePageLocation","admin");n.pageClass="page-admin-edit-customer";var c=this;c.isLoading=!0;c.isLoadingTransactions=!1;c.customer={};c.orders=[];c.ordersTable=null;c.totalRecords=0;c.transactions=[];c.seminars=[];c.seminarId="0";c.formData={action:"",transactionId:"",discountAmount:"",transactionId2:"",paymentAddress:""};c.closePage=function(){var n=window.location.href;window.history.go(-1);setTimeout(function(){window.location.href==n&&window.close()},500)};c.enableTelegram=function(){c.customer.TelegramStatusId=1;w()};c.disableTelegram=function(){c.customer.TelegramStatusId=2;w()};c.emailTelegramInfo=function(){w()};c.edit=function(n,t){scrollToDiv("#"+n,t)};c.editSeminar=function(n){var t="/admin/workshops/edit/"+n.SeminarID;window.open(t,"_blank")};c.editProduct=function(n){var t="admin/products/edit/"+n.ProductID;window.open(t,"_blank")};c.editConference=function(n){var t="/admin/conferences/edit/"+n.ConferenceProductID;window.open(t,"_blank")};c.editSubscription=function(n){var t="/admin/subscriptions/edit/"+n.SubscriptionProductID;window.open(t,"_blank")};c.editEvent=function(n){var t="/admin/events/edit/"+n.EventID;window.open(t,"_blank")};c.addAccessNote=function(n){var t=c.customer.Notes!=null?c.customer.Notes+"\n":"";n=="Emails"?t+="Updated Emails to "+c.customer.ReceiveEmails.toString()+" on "+(new Date).toLocaleDateString("en-US"):n=="Indicator"?t+="Updated Indicator Access to "+c.customer.IndicatorAccess.toString()+" on "+(new Date).toLocaleDateString("en-US"):n=="TradingView"&&(t+="Updated TradingView Access to "+c.customer.TradingViewAccess.toString()+" on "+(new Date).toLocaleDateString("en-US"));c.customer.Notes=t};c.update=function(n){if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});return}ti()};c.askDelete=function(){var n='<div class="modal-body">This will also remove all of this customers orders. Are you sure?<\/div>',i;n+='<div class="modal-footer"><button class="btn btn-primary" ng-click="vm.ok()">OK<\/button><button class="btn btn-default" ng-click="vm.cancel()">Cancel<\/button><\/div>';i=e.open({template:n,controller:t,controllerAs:"vm"});i.result.then(function(){st()})};c.askDeleteOrder=function(n){var i='<div class="modal-body">Are you sure you want to delete this order?<\/div>',r;i+='<div class="modal-footer"><button class="btn btn-primary" ng-click="vm.ok()">OK<\/button><button class="btn btn-default" ng-click="vm.cancel()">Cancel<\/button><\/div>';r=e.open({template:i,controller:t,controllerAs:"vm"});r.result.then(function(){ni(n)})};c.resendFinalConfirmEmail=function(n){et(n)};c.renewSubscription=function(){ri()};c.setConfirmed=function(n){at(n)};c.setCanceled=function(n,t){vt(n,t)};c.setPaidAndConfirmed=function(n,t){yt(t)};c.resendRegistrationEmail=function(n){ut(n)};c.sendConfirmEmail=function(n){rt(n)};c.resendConfirmEmail=function(n){ft(n)};c.updateOrderCurrency=function(n,t){ht(n,t)};c.updateOrderValidity=function(n,t){lt(n,t)};c.updateOrderSeminar=function(n){ct(n)};c.emailSeminarStreamURL=function(n){tt(n)};c.emailSeminarPreStreamURL=function(n){g(n)};c.completePayment=function(n){if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});return}completePayment()};c.addDiscount=function(n,t){if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});return}wt(t)};c.removeDiscount=function(n){kt(n)};c.updatePaymentAddress=function(n,t){if(n.$invalid){angular.forEach(sForm.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});return}gt(t)};ot()}function t(n,t){var i=this;i.ok=function(){t.close()};i.cancel=function(){t.dismiss("cancel")}}n.controller("editCustomerCtrl",i);i.$inject=["$scope","$rootScope","$routeParams","$location","$filter","$modal","apiService","NgTableParams","notificationService"];t.$inject=["$scope","$modalInstance"]}(angular.module("app")),function(n){"use strict";function t(n,t,i,r,u,f,e,o,s){function c(n,t){t==!0?h.customersTable.reload():h.customersTable.page(n)}function l(){n.$watch("[vm.filter, vm.consultingTimeLeft]",function(){h.firstRun||(h.filter!=""&&h.filter.length>2?c(0,!0):h.filter==""&&c(0,!0));h.firstRun=!1})}n.pageClass="page-admin-customers";t.$broadcast("updatePageLocation","admin");var h=this;h.firstRun=!0;h.customersTable=null;h.customers=[];h.filter="";h.consultingTimeLeft="";h.page=0;h.pageSize=100;h.pagesCount=0;h.totalCount=0;h.edit=function(n){var t=window.location.href+"/edit/"+n.ID;window.open(t,"_blank")};h.pageChanged=function(){c(h.page)};h.changePageSize=function(){h.page=0;c(0,!0)};h.tableParams={page:h.page,count:h.pageSize,sorting:{}};h.customersTable=new s(h.tableParams,{counts:[],total:h.totalCount,getData:function(n){var t=n.orderBy().toString(),i=t.charAt(1).toUpperCase().length>0?t.charAt(1).toUpperCase()+t.slice(2):"",r=t.charAt(0)=="+"?"asc":"desc",u={params:{page:h.page==0?h.page:h.page-1,pageSize:h.pageSize,orderBy:i,orderByDirection:r,filter:h.filter,consultingTimeLeft:h.consultingTimeLeft}};return e.getCustomers(u).then(function(n){return h.customers=n.Items,h.pagesCount=n.TotalPages,h.totalCount=n.TotalCount,h.customers})}});l()}n.controller("customersCtrl",t);t.$inject=["$scope","$rootScope","$filter","$location","$q","apiService","customersService","notificationService","NgTableParams"]}(angular.module("app")),function(n){"use strict";function t(n,t,i,r,u,f,e){function s(n){n=n||0;var t={params:{page:n,pageSize:o.pageSize,filter:o.filter,telegramStatusId:o.telegramStatusId}};u.get("/api/customers/",t,h,c)}function h(n){o.customers=n.data.Items;o.pagesCount=n.data.TotalPages;o.totalCount=n.data.TotalCount;var t={page:1,count:o.pageSize,sorting:{name:"asc"}};o.customersTable=new e(t,{counts:[],total:o.totalCount,dataset:o.customers})}function c(n){f.displayError(n.data.Message)}function l(){n.$watch("[vm.filter, vm.telegramStatusId]",function(n){n!=""&&n!=undefined&&n.length>2?s():s(0)})}n.pageClass="page-admin-telegram";t.$broadcast("updatePageLocation","admin");var o=this;o.customersTable=null;o.customers=[];o.filter="";o.telegramStatusId="3";o.page=0;o.pageSize=10;o.pagesCount=0;o.totalCount=0;o.edit=function(n){r.path("/admin/customers/edit/"+n.ID)};o.pageChanged=function(){s(o.page-1)};l()}n.controller("telegramAdminCtrl",t);t.$inject=["$scope","$rootScope","$filter","$location","apiService","notificationService","NgTableParams"]}(angular.module("app")),function(n){"use strict";function t(n,t,i,r,u,f,e,o){function h(n){o.displaySuccess("Successfully added discount");s.discount=n.data;sessionStorage.removeItem("/api/discounts/count/1");r.path("/admin/discounts")}function c(n){o.displayError(n.data.Message)}n.pageClass="page-admin-add-discount";t.$broadcast("updatePageLocation","admin");var s=this;s.discount={StatusId:1,DiscountTypeID:2,OrderTypeID:1,CreatedDate:new Date};s.discountStatus=[{name:"Enabled",id:1},{name:"Disabled",id:2}];s.orderType=[{name:"Seminar",id:1},{name:"Product",id:2},{name:"Conference",id:3}];s.discountType=[{name:"General",id:2},{name:"Restricted",id:3}];s.create=function(n){if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});return}s.discount.DiscountAmount=parseFloat(s.discount.DiscountAmount)/100;f.post("/api/discounts/add",s.discount,h,c)}}n.controller("addDiscountCtrl",t);t.$inject=["$scope","$rootScope","$routeParams","$location","$modal","apiService","NgTableParams","notificationService"]}(angular.module("app")),function(n){"use strict";function t(n,t,r,u,f,e,o,s){function a(){e.put("/api/discounts/email",h.discount,k,c)}function l(){var n="/api/discounts/"+r.id;e.get(n,null,p,w)}function v(){h.discount.DiscountAmount=parseFloat(h.DiscountAmountPercent)/100;e.put("/api/discounts/update",h.discount,b,c)}function y(){e.post("/api/discounts/delete",h.discount,d,c)}function p(n){h.discount=n.data;h.DiscountAmountPercent=h.discount.DiscountAmount*100;sessionStorage.removeItem("/api/discounts/count/"+h.discount.OrderTypeID);h.isLoading=!1}function w(n){s.displayError(n.data.Message);h.isLoading=!1}function b(){s.displaySuccess("Successfully updated discount");n.sForm.$setPristine();h.isLoading=!0;l()}function k(){s.displaySuccess("Successfully sent email")}function d(){s.displaySuccess("Successfully deleted discount");u.path("/admin/discounts")}function c(n){s.displayError(n.data.Message)}n.pageClass="page-admin-edit-discount";t.$broadcast("updatePageLocation","admin");var h=this;h.isLoading=!0;h.discount={};h.discountStatus=[{name:"Enabled",id:1},{name:"Disabled",id:2}];h.discountType=[{name:"General",id:2},{name:"Restricted",id:3}];h.DiscountAmountPercent="";h.closePage=function(){var n=window.location.href;window.history.go(-1);setTimeout(function(){window.location.href==n&&window.close()},500)};h.emailCoupon=function(){a()};h.update=function(n){if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});return}v()};h.askDelete=function(){var n='<div class="modal-body">Are you sure you want to delete this?<\/div>',t;n+='<div class="modal-footer"><button class="btn btn-primary" ng-click="vm.ok()">OK<\/button><button class="btn btn-default" ng-click="vm.cancel()">Cancel<\/button><\/div>';t=f.open({template:n,controller:i,controllerAs:"vm"});t.result.then(function(){y()})};l()}function i(n,t){var i=this;i.ok=function(){t.close()};i.cancel=function(){t.dismiss("cancel")}}n.controller("editDiscountCtrl",t);t.$inject=["$scope","$rootScope","$routeParams","$location","$modal","apiService","NgTableParams","notificationService"];i.$inject=["$scope","$modalInstance"]}(angular.module("app")),function(n){"use strict";function t(n,t,i,r,u,f,e){function s(n){n=n||0;var t={params:{page:n,pageSize:o.pageSize,filter:o.filter,statusId:o.statusId,typeId:o.typeId,hasCoupon:o.hasCoupon}};u.get("/api/discounts/",t,h,c)}function h(n){o.discounts=n.data.Items;o.pagesCount=n.data.TotalPages;o.totalCount=n.data.TotalCount;var t={page:1,count:o.pageSize,sorting:{}};o.discountsTable=new e(t,{counts:[],total:o.totalCount,dataset:o.discounts})}function c(n){f.displayError(n.data.Message);o.isLoading=!1}function l(){n.$watch("[vm.filter, vm.statusId, vm.typeId, vm.hasCoupon]",function(n){n!=""&&n!=undefined&&n.length>2?s():s(0)})}n.pageClass="page-admin-discounts";t.$broadcast("updatePageLocation","admin");var o=this;o.discountsTable=null;o.discounts=[];o.isLoading=!0;o.filter="";o.statusId="";o.typeId="";o.hasCoupon=null;o.page=0;o.pageSize=10;o.pagesCount=0;o.totalCount=0;o.edit=function(n){var t=window.location.href+"/edit/"+n.ID;window.open(t,"_blank")};o.pageChanged=function(){s(o.page-1)};l()}n.controller("discountsCtrl",t);t.$inject=["$scope","$rootScope","$filter","$location","apiService","notificationService","NgTableParams"]}(angular.module("app")),function(n){"use strict";function t(n,t){n.pageClass="page-admin-help";t.$broadcast("updatePageLocation","admin");var i=this;setTimeout(function(){window.location.hash?($(".page-admin-help .tab-pane").removeClass("active"),$(window.location.hash).addClass("active"),$(".page-admin-help .nav-pills li").removeClass("active"),$(".page-admin-help .nav-pills a[href='"+window.location.hash+"']").parent("li").addClass("active")):($(".page-admin-help .tab-pane:first").addClass("active"),$(".page-admin-help .nav-pills a:first").parent("li").addClass("active"))},250);scrollToTop()}n.controller("adminHelpCtrl",t);t.$inject=["$scope","$rootScope","$filter","$location","apiService","notificationService","NgTableParams"]}(angular.module("app")),function(n){"use strict";function t(n,t,i,r,u,f,e,o,s){function c(n){s.displaySuccess("Successfully added payment address");h.paymentAddress=n.data;r.path("/admin/paymentaddress")}function l(n){s.displayError(n.data.Message)}n.pageClass="page-admin-batch-add-payment-address";t.$broadcast("updatePageLocation","admin");var h=this;h.paymentAddress={StatusId:1,CurrencyTypeID:1,PaymentAddressBatch:""};h.paymentAddressInput="";h.foundAddresses="";h.addressCount=0;h.validCount=0;h.invalidCount=0;h.paymentAddressStatus=[{name:"Enabled",id:1},{name:"Disabled",id:2}];h.create=function(n){if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});return}f.post("/api/paymentaddress/batchadd",h.paymentAddress,c,l)};h.processAddresses=function(){var r,i,n,t;if(h.paymentAddress.PaymentAddressBatch!=undefined){for(h.validCount=0,h.invalidCount=0,r=new RegExp("^[13][a-km-zA-HJ-NP-Z1-9]{25,34}$"),i=h.paymentAddressInput.replace(/(\r\n|\n|\r)/gm,"").replace(/,\s*$/,""),h.paymentAddress.PaymentAddressBatch=i,n=i.split(","),t=0;t<n.length;t++)n[t].match(r)?h.validCount+=1:h.invalidCount+=1;h.addressCount=n.length}else h.addressCount=0,h.validCount=0,h.invalidCount=0}}n.controller("batchAddPaymentAddressCtrl",t);t.$inject=["$scope","$rootScope","$routeParams","$location","$modal","apiService","bitcoinService","NgTableParams","notificationService"]}(angular.module("app")),function(n){"use strict";function t(n,t,i,r,u,f,e,o,s){function c(n){$("#paymentAddress").removeClass("input-loading");n.data.data.is_valid?y():p()}function l(n){$("#paymentAddress").removeClass("input-loading");s.displayError(n.data.Message)}function a(n){s.displaySuccess("Successfully added payment address");h.paymentAddress=n.data;r.path("/admin/paymentaddress")}function v(n){s.displayError(n.data.Message)}function y(){$("#paymentAddressFormGroup").removeClass("has-error");$("#paymentAddressFormGroup label.has-error").remove();n.sForm.paymentAddress.$setValidity("valid",!0)}function p(){$("#paymentAddressFormGroup").addClass("has-error");n.sForm.paymentAddress.$setValidity("valid",!1)}n.pageClass="page-admin-add-payment-address";t.$broadcast("updatePageLocation","admin");var h=this;h.paymentAddress={StatusId:1,CurrencyTypeID:1,PubIndex:0,CreatedDate:new Date};h.paymentAddressStatus=[{name:"Enabled",id:1},{name:"Disabled",id:2}];h.create=function(n){if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});return}f.post("/api/paymentaddress/add",h.paymentAddress,a,v)};h.validatePaymentAddress=function(){if(typeof h.paymentAddress.Address!="undefined")$("#paymentAddress").addClass("input-loading"),e.isAddressValid(h.paymentAddress.Address,c,l,!0);else return}}n.controller("addPaymentAddressCtrl",t);t.$inject=["$scope","$rootScope","$routeParams","$location","$modal","apiService","bitcoinService","NgTableParams","notificationService"]}(angular.module("app")),function(n){"use strict";function t(n,t,r,u,f,e,o,s,h){function v(n){$("#paymentAddress").removeClass("input-loading");n.data.data.is_valid?nt():tt()}function y(n){$("#paymentAddress").removeClass("input-loading");h.displayError(n.data.Message)}function l(){var n="/api/paymentaddress/"+r.id;e.get(n,null,b,k)}function p(){e.put("/api/paymentaddress/update",c.paymentAddress,d,a)}function w(){e.post("/api/paymentaddress/delete",c.paymentAddress,g,a)}function b(n){c.paymentAddress=n.data;c.isLoading=!1}function k(n){h.displayError(n.data.Message);c.isLoading=!1}function d(){h.displaySuccess("Successfully updated payment address");n.sForm.$setPristine();c.isLoading=!0;l()}function g(){h.displaySuccess("Successfully deleted payment address");u.path("/admin/paymentaddress")}function a(n){h.displayError(n.data.Message)}function nt(){$("#paymentAddressFormGroup").removeClass("has-error");$("#paymentAddressFormGroup label.has-error").remove();n.sForm.paymentAddress.$setValidity("valid",!0)}function tt(){$("#paymentAddressFormGroup").addClass("has-error");n.sForm.paymentAddress.$setValidity("valid",!1)}n.pageClass="page-admin-edit-payment-address";t.$broadcast("updatePageLocation","admin");var c=this;c.isLoading=!0;c.paymentAddress={};c.paymentAddressStatus=[{name:"Enabled",id:1},{name:"Disabled",id:2},{name:"Used",id:3}];c.update=function(n){if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});return}p()};c.validatePaymentAddress=function(){if(typeof c.paymentAddress.Address!="undefined")$("#paymentAddress").addClass("input-loading"),o.isAddressValid(c.paymentAddress.Address,v,y,!0);else return};c.askDelete=function(){var n='<div class="modal-body">Are you sure you want to delete this?<\/div>',t;n+='<div class="modal-footer"><button class="btn btn-primary" ng-click="vm.ok()">OK<\/button><button class="btn btn-default" ng-click="vm.cancel()">Cancel<\/button><\/div>';t=f.open({template:n,controller:i,controllerAs:"vm"});t.result.then(function(){w()})};l()}function i(n,t){var i=this;i.ok=function(){t.close()};i.cancel=function(){t.dismiss("cancel")}}n.controller("editPaymentAddressCtrl",t);t.$inject=["$scope","$rootScope","$routeParams","$location","$modal","apiService","bitcoinService","NgTableParams","notificationService"];i.$inject=["$scope","$modalInstance"]}(angular.module("app")),function(n){"use strict";function t(n,t,i,r,u,f,e){function s(n){n=n||0;var t={params:{page:n,pageSize:o.pageSize,filter:o.filter,statusId:o.statusId,pubKeyId:o.pubKeyId}};u.get("/api/paymentaddress/",t,c,h)}function c(n){o.paymentAddresses=n.data.Items;o.page==1||o.page==0?angular.forEach(o.paymentAddresses,function(n,t){n.index=t+1}):angular.forEach(o.paymentAddresses,function(n,t){n.index=o.page*o.pageSize-o.pageSize+(t+1)});o.pagesCount=n.data.TotalPages;o.totalCount=n.data.TotalCount;var t={page:1,count:o.pageSize,sorting:{}};o.paymentAddressesTable=new e(t,{counts:[],total:o.totalCount,dataset:o.paymentAddresses});o.isLoading=!1}function l(){u.get("/api/pubkeys/all",null,a,h)}function a(n){o.pubKeys=n.data;o.totalPubKeys=o.pubKeys.length;o.totalPubKeys>0&&angular.forEach(o.pubKeys,function(n){var t=n;t.Address.length>50&&(t.Address=t.Address.substr(0,50)+"...");o.pubKeysDropdown.push(t)});o.pubKeysDropdown.push({ID:"0",Address:"Pub Keys"});o.pubKeysDropdown.push({ID:"all",Address:"Any"})}function h(n){f.displayError(n.data.Message);o.isLoading=!1}function v(){n.$watch("[vm.filter, vm.statusId, vm.pubKeyId]",function(n){n!=""&&n!=undefined&&n.length>2?s():s(0)})}n.pageClass="page-admin-payment-addresses";t.$broadcast("updatePageLocation","admin");var o=this;o.paymentAddressesTable=null;o.paymentAddresses=[];o.pubKeys=[];o.pubKeysDropdown=[];o.isLoading=!0;o.filter="";o.statusId="";o.pubKeyId="0";o.hasCoupon=null;o.page=0;o.pageSize=10;o.pagesCount=0;o.totalCount=0;o.edit=function(n){r.path("/admin/paymentaddress/edit/"+n.ID)};o.editPubKey=function(n){r.path("/admin/pubkeys/edit/"+n.ID)};o.pageChanged=function(){s(o.page-1)};o.changePageSize=function(){o.page=0;s(0)};v();l()}n.controller("paymentAddressesCtrl",t);t.$inject=["$scope","$rootScope","$filter","$location","apiService","notificationService","NgTableParams"]}(angular.module("app")),function(n){"use strict";function t(n,t,i,r,u,f,e){function s(n){n=n||0;var t={params:{page:n,pageSize:o.pageSize,filter:o.filter,statusId:o.statusId}};u.get("/api/pubkeys/",t,h,c)}function h(n){o.pubKeys=n.data.Items;o.pagesCount=n.data.TotalPages;o.totalCount=n.data.TotalCount;var t={page:1,count:o.pageSize,sorting:{}};o.pubKeysTable=new e(t,{counts:[],total:o.totalCount,dataset:o.pubKeys});o.isLoading=!1}function c(n){f.displayError(n.data.Message);o.isLoading=!1}function l(){n.$watch("[vm.filter, vm.statusId]",function(n){n!=""&&n!=undefined&&n.length>2?s():s(0)})}n.pageClass="page-admin-pubkeys";t.$broadcast("updatePageLocation","admin");var o=this;o.pubKeysTable=null;o.pubKeys=[];o.pubKeysDropdown=[];o.isLoading=!0;o.filter="";o.statusId="";o.hasCoupon=null;o.page=0;o.pageSize=10;o.pagesCount=0;o.totalCount=0;o.edit=function(n){r.path("/admin/pubkeys/edit/"+n.ID)};o.pageChanged=function(){s(o.page-1)};o.changePageSize=function(){o.page=0;s(0)};l()}n.controller("pubKeysCtrl",t);t.$inject=["$scope","$rootScope","$filter","$location","apiService","notificationService","NgTableParams"]}(angular.module("app")),function(n){"use strict";function t(n,t,i,r,u,f,e,o,s){function c(n){s.displaySuccess("Successfully added pubKey");h.pubKey=n.data;r.path("/admin/pubkeys")}function l(n){s.displayError(n.data.Message)}n.pageClass="page-admin-add-pubkey";t.$broadcast("updatePageLocation","admin");var h=this;h.pubKey={OrderTypeID:1,StatusId:1,Title:"",Address:"",LastIndex:0,CreatedDate:new Date};h.orderType=[{name:"Seminar",id:1},{name:"Product",id:2},{name:"Conference",id:3}];h.paymentAddressStatus=[{name:"Enabled",id:1},{name:"Disabled",id:2}];h.create=function(n){if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});return}f.post("/api/pubKeys/add",h.pubKey,c,l)}}n.controller("addPubKeyCtrl",t);t.$inject=["$scope","$rootScope","$routeParams","$location","$modal","apiService","bitcoinService","NgTableParams","notificationService"]}(angular.module("app")),function(n){"use strict";function t(n,t,r,u,f,e,o,s,h){function l(){var n="/api/pubkeys/"+r.id;e.get(n,null,p,w)}function v(){e.put("/api/pubkeys/update",c.pubKey,b,a)}function y(){e.post("/api/pubkeys/delete",c.pubKey,k,a)}function p(n){c.pubKey=n.data;c.isLoading=!1}function w(n){h.displayError(n.data.Message);c.isLoading=!1}function b(){h.displaySuccess("Successfully updated pub key");n.sForm.$setPristine();c.isLoading=!0;l()}function k(){h.displaySuccess("Successfully deleted pub key");u.path("/admin/pubkeys")}function a(n){h.displayError(n.data.Message)}n.pageClass="page-admin-edit-pubkey";t.$broadcast("updatePageLocation","admin");var c=this;c.isLoading=!0;c.pubKey={};c.orderType=[{name:"Seminar",id:1},{name:"Product",id:2},{name:"Conference",id:3}];c.paymentAddressStatus=[{name:"Enabled",id:1},{name:"Disabled",id:2}];c.update=function(n){if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});return}v()};c.askDelete=function(){var n='<div class="modal-body">Are you sure you want to delete this?<\/div>',t;n+='<div class="modal-footer"><button class="btn btn-primary" ng-click="vm.ok()">OK<\/button><button class="btn btn-default" ng-click="vm.cancel()">Cancel<\/button><\/div>';t=f.open({template:n,controller:i,controllerAs:"vm"});t.result.then(function(){y()})};l()}function i(n,t){var i=this;i.ok=function(){t.close()};i.cancel=function(){t.dismiss("cancel")}}n.controller("editPubKeyCtrl",t);t.$inject=["$scope","$rootScope","$routeParams","$location","$modal","apiService","bitcoinService","NgTableParams","notificationService"];i.$inject=["$scope","$modalInstance"]}(angular.module("app")),function(n){"use strict";function t(n,t,i,r,u,f,e,o){function l(n){f.displaySuccess("Successfully added workshop");sessionStorage.removeItem("/api/seminars/public");h?o.uploadImage(h,"seminar",n.data.seminarId,c):c()}function c(){r.path("/admin/workshop")}function a(n){f.displayError(n.data.Message)}function v(){var t=!0;return s.address.country=="US"&&s.address.state==""?(n.sForm.state.$setValidity("valid",!1),t=!1):n.sForm.state.$setValidity("valid",!0),t}function y(){var n=s.address.city+", ";return n+(s.address.country=="US"?s.address.state+", "+s.address.country:s.address.country)}t.$broadcast("updatePageLocation","admin");n.pageClass="page-admin-add-seminar";var s=this,h=null;s.newRandom=Math.random();s.address={city:"",state:"",country:""};s.seminar={StatusId:2,SeatsLeft:0,SeatsTotal:20,Date:new Date,CreatedDate:new Date,LastUpdated:new Date};s.seminarStatus=[{name:"Confirmed",id:1},{name:"Unconfirmed",id:2},{name:"Preregister",id:4},{name:"Disabled",id:3}];s.datepicker={};s.dateOptions={formatYear:"yy",startingDay:1,showWeeks:!1};s.openDatePicker=function(n){n.preventDefault();n.stopPropagation();s.datepicker.opened=!0};s.create=function(n){if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});return}v()!=!1&&(s.seminar.Location=y(),u.post("/api/seminars/add",s.seminar,l,a))};s.prepareFiles=function(n){h=n}}n.controller("addSeminarCtrl",t);t.$inject=["$scope","$rootScope","$routeParams","$location","apiService","notificationService","bitcoinService","fileUploadService"]}(angular.module("app")),function(n){"use strict";function t(n,t,r,u,f,e,o,s,h,c,l){function p(){var n="/api/seminars/"+r.id;o.get(n,null,rt,b)}function k(){o.get("/api/orders/seminar/"+a.seminar.ID,null,ut,b)}function w(){o.put("/api/seminars/update",a.seminar,et,v)}function d(){o.post("/api/seminars/delete",a.seminar,ot,v)}function g(){o.put("/api/orders/email/seminarconfirmed/batch",a.seminar,it,v)}function nt(){o.put("/api/orders/email/seminarvenue",a.seminar,tt,v)}function tt(){l.displaySuccess("Successfully sent venue information")}function it(){l.displaySuccess("Successfully sent email to all pre-registered customers")}function rt(n){a.seminar=n.data;a.address=ct(a.seminar.Location);k()}function ut(n){a.orders=n.data;a.totalRecords=a.orders.length;var t={page:1,count:a.orders.length,sorting:{}};a.ordersTable=new c(t,{counts:[],total:a.orders.length,dataset:a.orders});a.containsPreregistered=e("filter")(a.seminar.Orders,{StatusId:4},!0);a.isLoading=!1}function b(n){l.displayError(n.data.Message);a.isLoading=!1}function ft(){w()}function et(){l.displaySuccess("Successfully updated workshop");n.sForm.$setPristine();sessionStorage.removeItem("/api/seminars/public");a.isLoading=!0;p()}function ot(){l.displaySuccess("Successfully deleted workshop");u.path("/admin/workshop")}function v(n){l.displayError(n.data.Message)}function st(){var t=!0;return a.address.country=="US"&&a.address.state==""?(n.sForm.state.$setValidity("valid",!1),t=!1):n.sForm.state.$setValidity("valid",!0),t}function ht(){var n=a.address.city+", ";return n+(a.address.country=="US"?a.address.state+", "+a.address.country:a.address.country)}function ct(n){var i={city:"",state:"",country:""},t=n.split(",");return t.length==3?(i.city=t[0],i.state=t[1].replace(/[\. ,:-]+/g,""),i.country=t[2].replace(/[\. ,:-]+/g,"")):t.length==2?(i.city=t[0],i.country=t[1].replace(/[\. ,:-]+/g,"")):t.length==1&&(i.country=t[0].replace(/[\. ,:-]+/g,"")),i}t.$broadcast("updatePageLocation","admin");n.pageClass="page-admin-edit-seminar";var a=this,y=null;a.isLoading=!0;a.newRandom=Math.random();a.address={city:"",state:"",country:""};a.seminar={};a.seminarStatus=[{name:"Confirmed",id:1},{name:"Unconfirmed",id:2},{name:"Pregister",id:4},{name:"Completed",id:5},{name:"Disabled",id:3}];a.orders=[];a.ordersTable=null;a.totalRecords=0;a.containsPreregistered=[];a.datepicker={};a.dateOptions={formatYear:"yy",startingDay:1,showWeeks:!1};a.closePage=function(){var n=window.location.href;window.history.go(-1);setTimeout(function(){window.location.href==n&&window.close()},500)};a.edit=function(n){var t=location.protocol+"//"+location.hostname+(location.port?":"+location.port:""),i=t+"/admin/orders/edit/"+n.ID;window.open(i,"_blank")};a.editCustomer=function(n){var t=location.protocol+"//"+location.hostname+(location.port?":"+location.port:""),i=t+"/admin/customers/edit/"+n.CustomerID;window.open(i,"_blank")};a.openDatePicker=function(n){n.preventDefault();n.stopPropagation();a.datepicker.opened=!0};a.update=function(n){if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});return}st()!=!1&&(a.seminar.Location=ht(),y?h.uploadImage(y,"seminar",a.seminar.ID,ft):w())};a.askDelete=function(){var n='<div class="modal-body">Are you sure you want to delete this?<\/div>',t;n+='<div class="modal-footer"><button class="btn btn-primary" ng-click="vm.ok()">OK<\/button><button class="btn btn-default" ng-click="vm.cancel()">Cancel<\/button><\/div>';t=f.open({template:n,controller:i,controllerAs:"vm"});t.result.then(function(){d()})};a.prepareFiles=function(n){y=n};a.emailPreregisteredCustomers=function(){g()};a.emailVenueInformation=function(){nt()};p()}function i(n,t){var i=this;i.ok=function(){t.close()};i.cancel=function(){t.dismiss("cancel")}}n.controller("editSeminarCtrl",t);t.$inject=["$scope","$rootScope","$routeParams","$location","$modal","$filter","apiService","bitcoinService","fileUploadService","NgTableParams","notificationService"];i.$inject=["$scope","$modalInstance"]}(angular.module("app")),function(n){"use strict";function t(n,t,i,r,u,f,e,o){function h(n,t){t==!0?s.seminarsTable.reload():s.seminarsTable.page(n)}function c(){n.$watch("[vm.filter, vm.statusId]",function(){s.firstRun||(s.filter!=""&&s.filter.length>2?h(0,!0):s.filter==""&&h(0,!0));s.firstRun=!1})}n.pageClass="page-admin-seminars";t.$broadcast("updatePageLocation","admin");var s=this;s.firstRun=!0;s.seminarsTable=null;s.seminars=[];s.filter="";s.statusId="";s.page=0;s.pageSize=10;s.pagesCount=0;s.totalCount=0;s.edit=function(n){var t=window.location.href+"/edit/"+n.ID;t=t.replace("workshop","workshops");window.open(t,"_blank")};s.pageChanged=function(){h(s.page)};s.changePageSize=function(){s.page=0;h(0,!0)};s.tableParams={page:s.page,count:s.pageSize,sorting:{}};s.seminarsTable=new o(s.tableParams,{counts:[],total:s.totalCount,getData:function(n){var t=n.orderBy().toString(),i=t.charAt(1).toUpperCase().length>0?t.charAt(1).toUpperCase()+t.slice(2):"",r=t.charAt(0)=="+"?"asc":"desc",u={params:{page:s.page==0?s.page:s.page-1,pageSize:s.pageSize,orderBy:i,orderByDirection:r,filter:s.filter,statusId:s.statusId}};return f.getSeminars(u).then(function(n){return s.seminars=n.Items,s.pagesCount=n.TotalPages,s.totalCount=n.TotalCount,s.seminars})}});c()}n.controller("seminarsCtrl",t);t.$inject=["$scope","$rootScope","$filter","$location","$q","seminarsService","notificationService","NgTableParams"]}(angular.module("app")),function(n){"use strict";function t(n,t,i,r,u,f,e){function s(n){e.displaySuccess("Successfully added campaign");o.emailCampaign=n.data;r.path("/admin/emailcampaigns")}function h(n){e.displayError(n.data.Message)}function c(){f.get("/api/emails/type/2",null,l,a)}function l(n){o.emails=n.data;o.emails.push({ID:"0",Subject:"Select Email"});o.isLoading=!1}function a(n){e.displayError(n.data.Message);o.isLoading=!1}n.pageClass="page-admin-add-email-campaign";t.$broadcast("updatePageLocation","admin");var o=this;o.isLoading=!0;o.emailCampaign={StatusId:1,EmailID:"0",SentDate:null,CreatedDate:new Date};o.trust=u.trustAsHtml;o.emails=[];o.create=function(n){if(n.$invalid){angular.forEach(n.$error,function(n){console.info(n);angular.forEach(n,function(n){console.info(n);n.$setDirty()})});return}f.post("/api/emailcampaigns/add",o.emailCampaign,s,h)};c()}n.controller("addEmailCampaignCtrl",t);t.$inject=["$scope","$rootScope","$routeParams","$location","$sce","apiService","notificationService"]}(angular.module("app")),function(n){"use strict";function t(n,t,r,u,f,e,o,s,h){function v(){s.put("/api/emailcampaigns/update",c.emailCampaign,d,a)}function y(){s.get("/api/emails/type/2",null,p,l)}function p(n){c.emails=n.data;c.emails.push({ID:null,Subject:"Select Email"});w()}function w(){var n="/api/emailcampaigns/"+r.id;s.get(n,null,k,l)}function b(){s.post("/api/emailcampaigns/delete",c.emailCampaign,g,a)}function k(n){c.emailCampaign=n.data;var t=f("filter")(c.emails,{ID:c.emailCampaign.EmailID},!0);t.length&&(c.selectedEmail=t[0]);c.isLoading=!1}function l(n){h.displayError(n.data.Message);c.isLoading=!1}function d(){h.displaySuccess("Successfully updated email");n.sForm.$setPristine()}function g(){h.displaySuccess("Successfully deleted campaign");u.path("/admin/emailcampaigns")}function a(n){h.displayError(n)}n.pageClass="page-admin-edit-email-campaign";t.$broadcast("updatePageLocation","admin");var c=this;c.isLoading=!0;c.emailCampaign={};c.selectedEmail={};c.trust=o.trustAsHtml;c.emails=[];c.update=function(n){if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});return}v()};c.askDelete=function(){var n='<div class="modal-body">Are you sure you want to delete this?<\/div>',t;n+='<div class="modal-footer"><button class="btn btn-primary" ng-click="vm.ok()">OK<\/button><button class="btn btn-default" ng-click="vm.cancel()">Cancel<\/button><\/div>';t=e.open({template:n,controller:i,controllerAs:"vm"});t.result.then(function(){b()})};y()}function i(n,t){var i=this;i.ok=function(){t.close()};i.cancel=function(){t.dismiss("cancel")}}n.controller("editEmailCampaignCtrl",t);t.$inject=["$scope","$rootScope","$routeParams","$location","$filter","$modal","$sce","apiService","notificationService"];i.$inject=["$scope","$modalInstance"]}(angular.module("app")),function(n){"use strict";function t(n,t,i,r,u,f,e){function s(n){n=n||0;var t={params:{page:n,pageSize:o.pageSize,filter:o.filter,statusId:o.statusId}};u.get("/api/emailcampaigns/",t,h,c)}function h(n){o.campaigns=n.data.Items;o.pagesCount=n.data.TotalPages;o.totalCount=n.data.TotalCount;var t={page:1,count:o.pageSize,sorting:{name:"asc"}};o.campaignsTable=new e(t,{counts:[],total:o.totalCount,dataset:o.campaigns})}function c(n){f.displayError(n.data.Message)}function l(){n.$watch("[vm.filter, vm.statusId]",function(n){n!=""&&n!=undefined&&n.length>2?s():s(0)})}n.pageClass="page-admin-email-campaigns";t.$broadcast("updatePageLocation","admin");var o=this;o.campaignsTable=null;o.campaigns=[];o.filter="";o.statusId="";o.page=0;o.pageSize=10;o.pagesCount=0;o.totalCount=0;o.edit=function(n){r.path("/admin/emailcampaigns/edit/"+n.ID)};o.pageChanged=function(){s(o.page-1)};l()}n.controller("emailCampaignsCtrl",t);t.$inject=["$scope","$rootScope","$filter","$location","apiService","notificationService","NgTableParams"]}(angular.module("app")),function(n){"use strict";function t(n,t,i,r,u,f,e,o,s){function l(){e.get("/api/emailcampaigns/ready",null,w,c);a()}function a(){e.get("/api/conferences/all",null,v,c)}function v(n){h.conferences=n.data;h.conferences.push({ID:"0",Title:"All Conferences"})}function y(){var n=f("filter")(h.emailCampaigns,{ID:h.query.EmailCampaignID},!0);n.length&&(h.emailCampaign=n[0])}function p(){h.isSending=!0;h.startButtonText="Sending...";e.put("/api/emailcampaigns/start",h.query,b,k)}function w(n){h.emailCampaigns=n.data;h.emailCampaigns.push({ID:"0",Title:"Select Ready Campaign"});h.isLoading=!1}function c(n){s.displayError(n.data.Message);h.isLoading=!1}function b(){s.displaySuccess("Successfully sent emails");r.path("/admin/emailcampaigns/edit/"+h.query.EmailCampaignID)}function k(n){h.isSending=!1;h.startButtonText="Start Email Campaign";s.displayError(n.data.Message)}n.pageClass="page-admin-start-email-campaign";t.$broadcast("updatePageLocation","admin");var h=this;h.isLoading=!0;h.isSending=!1;h.startButtonText="Start Email Campaign";h.emailCampaign={};h.emailCampaigns=[];h.conferences=[];h.query={EmailCampaignID:"0",ConferenceID:"0"};h.selectEmailCampaign=function(){y()};h.startEmailCampaign=function(){if(h.query.AllCustomers||h.query.SeminarCustomers||h.query.ProductCustomers||h.query.ConferenceCustomers)p();else return};h.selectAllCustomers=function(){h.query.AllCustomers&&(h.query.SeminarCustomers=!1,h.query.ProductCustomers=!1,h.query.ConferenceCustomers=!1)};l()}n.controller("startEmailCampaignCtrl",t);t.$inject=["$scope","$rootScope","$routeParams","$location","$modal","$filter","apiService","NgTableParams","notificationService"]}(angular.module("app")),function(n){"use strict";function t(n,t,i,r,u,f,e){function s(){u.get("/api/emails/type/2",null,h,c)}function h(n){o.emails=n.data;o.totalRecords=o.emails.length;o.isLoading=!1;o.emailContentTable=new e({page:1,count:10,sorting:{}},{counts:[],total:o.emails.length,dataset:o.emails})}function c(n){f.displayError(n.data.Message);o.isLoading=!1}n.pageClass="page-admin-campaign-emails";t.$broadcast("updatePageLocation","admin");var o=this;o.emailContentTable=null;o.emails=[];o.isLoading=!0;o.totalRecords=0;o.edit=function(n){r.path("/admin/emailcampaigns/emails/edit/"+n.ID)};s()}n.controller("campaignEmailsCtrl",t);t.$inject=["$scope","$rootScope","$filter","$location","apiService","notificationService","NgTableParams"]}(angular.module("app")),function(n){"use strict";function t(n,t,i,r,u,f,e,o){function h(){$(document).ready(function(){setTimeout(function(){$("#loadingSummerNote").hide();$("#summernote").summernote({toolbar:[["header",["style"]],["style",["bold","underline","italic","strikethrough"]],["font",["fontsize","color"]],["para",["ul","ol","paragraph"]],["table",["table"]],["insert",["imageButton","video","link"]],["misc",["undo","redo"]],["fullscreen",["fullscreen","codeview","help"]],],buttons:{imageButton:ImageButton}});$(".note-btn").removeAttr("data-original-title")},1e3)})}function c(n){o.displaySuccess("Successfully added campaign email");s.emailCampaign=n.data;u.path("/admin/emailcampaigns/emails")}function l(n){o.displayError(n.data.Message)}n.pageClass="page-admin-add-campaign-email";t.$broadcast("updatePageLocation","admin");var s=this;s.email={EmailTypeId:2,CreatedDate:new Date};s.trust=r.trustAsHtml;s.create=function(n){if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});return}s.email.Body=$("#summernote").summernote("code");f.post("/api/emails/add",s.email,c,l)};h()}n.controller("addCampaignEmailCtrl",t);t.$inject=["$scope","$rootScope","$routeParams","$sce","$location","apiService","NgTableParams","notificationService"]}(angular.module("app")),function(n){"use strict";function t(n,t,r,u,f,e,o,s,h){function a(){c.emailCampaigns=c.email.EmailCampaigns;c.totalCount=c.emailCampaigns.length;c.isLoading=!1;c.emailCampaignsTable=new s(n.tableParams,{counts:[],total:c.emailCampaigns.length,dataset:c.emailCampaigns})}function v(){var n="/api/emails/"+r.id;o.get(n,null,y,d)}function y(n){c.email=n.data;p();c.email.EmailCampaigns.length>0&&a();c.isLoading=!1}function p(){$(document).ready(function(){setTimeout(function(){$("#loadingSummerNote").hide();$("#summernote").summernote({toolbar:[["header",["style"]],["style",["bold","underline","italic","strikethrough"]],["font",["fontsize","color"]],["para",["ul","ol","paragraph"]],["table",["table"]],["insert",["imageButton","video","link"]],["misc",["undo","redo"]],["fullscreen",["fullscreen","codeview","help"]],],buttons:{imageButton:ImageButton}});$(".note-btn").removeAttr("data-original-title")},1e3)})}function w(){o.put("/api/emails/update",c.email,nt,l)}function b(){o.post("/api/emails/delete",c.email,tt,l)}function k(){o.put("/api/emailcampaigns/sendtest",c.email,g,l)}function d(n){h.displayError(n.data.Message);c.isLoading=!1}function g(){h.displaySuccess("Successfully sent email")}function nt(){h.displaySuccess("Successfully updated email");n.sForm.$setPristine()}function tt(){h.displaySuccess("Successfully deleted email");e.path("/admin/emailcampaigns/emails")}function l(n){h.displayError(n)}n.pageClass="page-admin-edit-campaign-email";t.$broadcast("updatePageLocation","admin");var c=this;c.isLoading=!0;c.email={};c.trust=u.trustAsHtml;c.emailCampaignsTable=null;c.emailCampaigns=[];c.totalCount=0;c.edit=function(n){e.path("/admin/emailcampaigns/edit/"+n.ID)};c.sendTest=function(){k()};c.update=function(n){if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});return}c.email.Body=$("#summernote").summernote("code");w()};c.askDelete=function(){var n='<div class="modal-body">Are you sure you want to delete this?<\/div>',t;n+='<div class="modal-footer"><button class="btn btn-primary" ng-click="vm.ok()">OK<\/button><button class="btn btn-default" ng-click="vm.cancel()">Cancel<\/button><\/div>';t=f.open({template:n,controller:i,controllerAs:"vm"});t.result.then(function(){b()})};v()}function i(n,t){var i=this;i.ok=function(){t.close()};i.cancel=function(){t.dismiss("cancel")}}n.controller("editCampaignEmailCtrl",t);t.$inject=["$scope","$rootScope","$routeParams","$sce","$modal","$location","apiService","NgTableParams","notificationService"];i.$inject=["$scope","$modalInstance"]}(angular.module("app")),function(n){"use strict";function t(n,t,i,r,u,f,e,o,s){function a(){o.getBTCPrice(v,c,!0)}function v(n){var i=JSON.parse(n.data),t=roundUp(i.data.last,0);h.conferenceProduct.CurrencyConversionTypeID==1?h.conferenceProduct.PriceFiat=u("btcToUsd")(h.conferenceProduct.Price,t):h.conferenceProduct.CurrencyConversionTypeID==2&&(h.conferenceProduct.Price=u("usdToBtc")(h.conferenceProduct.PriceFiat,t));e.post("/api/conferenceproducts/add",h.conferenceProduct,l,c)}function l(n){s.displaySuccess("Successfully added rate");h.conferenceProduct=n.data;r.path("/admin/conferences/edit/"+i.id)}function c(n){s.displayError(n.data.Message)}t.$broadcast("updatePageLocation","admin");n.pageClass="page-admin-add-conference-product";scrollToTop();var h=this;h.trust=f.trustAsHtml;h.conferenceProduct={StatusId:1,CurrencyConversionTypeID:0,ConferenceID:i.id,EndDate:new Date,CreatedDate:new Date};h.datepicker={};h.dateOptions={formatYear:"yy",startingDay:1,showWeeks:!1};h.productStatus=[{name:"Enabled",id:1},{name:"Disabled",id:2}];h.currencyConversionType=[{name:"Manual",id:0},{name:"Peg To BTC",id:1},{name:"Peg To USD",id:2}];h.exchange="bitstamp";h.openDatePicker=function(n){n.preventDefault();n.stopPropagation();h.datepicker.opened=!0};h.create=function(n){if(n.$invalid){angular.forEach(n.$error,function(n){console.info(n);angular.forEach(n,function(n){console.info(n);n.$setDirty()})});return}h.conferenceProduct.Description=$("#summernote").summernote("code");h.conferenceProduct.CurrencyConversionTypeID>0?a():e.post("/api/conferenceproducts/add",h.conferenceProduct,l,c)}}n.controller("addConferenceProductCtrl",t);t.$inject=["$scope","$rootScope","$routeParams","$location","$filter","$sce","apiService","bitcoinService","notificationService","fileUploadService"]}(angular.module("app")),function(n){"use strict";function t(n,t,r,u,f,e,o,s,h,c,l,a){function k(){c.getBTCPrice(d,y,!0)}function d(n){var i=JSON.parse(n.data),t=roundUp(i.data.last,0);v.conferenceProduct.CurrencyConversionTypeID==1?v.conferenceProduct.PriceFiat=f("btcToUsd")(v.conferenceProduct.Price,t):v.conferenceProduct.CurrencyConversionTypeID==2&&(v.conferenceProduct.Price=f("usdToBtc")(v.conferenceProduct.PriceFiat,t));w()}function g(){h.get("/api/orders/conferenceproduct/"+v.conferenceProduct.ID,null,rt,b)}function p(){var n="/api/conferenceproducts/"+r.id;h.get(n,null,it,b)}function w(){h.put("/api/conferenceproducts/update",v.conferenceProduct,tt,y)}function nt(){h.post("/api/conferenceproducts/delete",v.conferenceProduct,ut,y)}function tt(){a.displaySuccess("Successfully updated rate");n.sForm.$setPristine();v.isLoading=!0;p()}function it(n){v.conferenceProduct=n.data;g()}function rt(n){v.orders=n.data;v.totalRecords=v.orders.length;var t={page:1,count:v.orders.length,sorting:{}};v.ordersTable=new l(t,{counts:[],total:v.orders.length,dataset:v.orders});v.isLoading=!1}function b(n){a.displayError(n.data.Message);v.isLoading=!1}function ut(){a.displaySuccess("Successfully deleted rate");u.path("/admin/conferences/edit/"+v.conferenceProduct.Conference.ID)}function y(n){a.displayError(n.data.Message)}t.$broadcast("updatePageLocation","admin");n.pageClass="page-admin-edit-conference-product";scrollToTop();var v=this;v.trust=s.trustAsHtml;v.isLoading=!0;v.conferenceProduct={};v.datepicker={};v.dateOptions={formatYear:"yy",startingDay:1,showWeeks:!1};v.productStatus=[{name:"Enabled",id:1},{name:"Disabled",id:2}];v.currencyConversionType=[{name:"Manual",id:0},{name:"Peg To BTC",id:1},{name:"Peg To USD",id:2}];v.exchange="bitstamp";v.openDatePicker=function(n){n.preventDefault();n.stopPropagation();v.datepicker.opened=!0};v.edit=function(n){var t=location.protocol+"//"+location.hostname+(location.port?":"+location.port:""),i=t+"/admin/orders/edit/"+n.ID;window.open(i,"_blank")};v.editCustomer=function(n){var t=location.protocol+"//"+location.hostname+(location.port?":"+location.port:""),i=t+"/admin/customers/edit/"+n.CustomerID;window.open(i,"_blank")};v.update=function(n){if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});return}v.conferenceProduct.Description=$("#summernote").summernote("code");v.conferenceProduct.CurrencyConversionTypeID>0?k():w()};v.askDelete=function(){var n='<div class="modal-body">Are you sure you want to delete this?<\/div>',t;n+='<div class="modal-footer"><button class="btn btn-primary" ng-click="vm.ok()">OK<\/button><button class="btn btn-default" ng-click="vm.cancel()">Cancel<\/button><\/div>';t=e.open({template:n,controller:i,controllerAs:"vm"});t.result.then(function(){nt()})};v.goToConference=function(){u.path("/admin/conferences/edit/"+v.conferenceProduct.ConferenceID)};p()}function i(n,t){var i=this;i.ok=function(){t.close()};i.cancel=function(){t.dismiss("cancel")}}n.controller("editConferenceProductCtrl",t);t.$inject=["$scope","$rootScope","$routeParams","$location","$filter","$modal","$http","$sce","apiService","bitcoinService","NgTableParams","notificationService","fileUploadService"];i.$inject=["$scope","$modalInstance"]}(angular.module("app")),function(n){"use strict";function t(n,t,i,r,u,f,e,o){function l(n){f.displaySuccess("Successfully added conference");s.conference=n.data;sessionStorage.removeItem("/api/conferences");h?o.uploadImage(h,"conference",s.conference.ID,c):c()}function c(){r.path("/admin/conferences")}function a(){var n=s.address.city+", ";return n+(s.address.country=="US"?s.address.state+", "+s.address.country:s.address.country)}function v(n){f.displayError(n.data.Message)}t.$broadcast("updatePageLocation","admin");n.pageClass="page-admin-add-conference";var s=this,h=null;s.newRandom=Math.random();s.address={city:"",state:"",country:""};s.conference={StatusId:2,StartDate:new Date,EndDate:new Date,CreatedDate:new Date};s.conferenceStatus=[{name:"Confirmed",id:1},{name:"Unconfirmed",id:2},{name:"Disabled",id:3}];s.datepicker={};s.datepicker2={};s.dateOptions={formatYear:"yy",startingDay:1,showWeeks:!1};s.openDatePicker=function(n){n.preventDefault();n.stopPropagation();s.datepicker.opened=!0};s.openDatePicker2=function(n){n.preventDefault();n.stopPropagation();s.datepicker2.opened=!0};s.create=function(n){if(n.$invalid){angular.forEach(n.$error,function(n){console.info(n);angular.forEach(n,function(n){console.info(n);n.$setDirty()})});return}s.conference.Location=a();u.post("/api/conferences/add",s.conference,l,v)};s.prepareFiles=function(n){h=n}}n.controller("addConferenceCtrl",t);t.$inject=["$scope","$rootScope","$routeParams","$location","apiService","notificationService","bitcoinService","fileUploadService"]}(angular.module("app")),function(n){"use strict";function t(n,t,r,u,f,e,o,s,h){function p(){var n="/api/conferenceproducts/conference/"+c.conference.ID;e.get(n,null,w,l)}function w(t){c.conferenceProducts=t.data;c.totalCount=c.conferenceProducts.length;c.isLoading=!1;c.conferenceProductsTable=new s(n.tableParams,{counts:[],total:c.conferenceProducts.length,dataset:c.conferenceProducts})}function a(){var n="/api/conferences/"+r.id;e.get(n,null,nt,l)}function b(){e.get("/api/orders/conference/"+c.conference.ID,null,tt,l)}function k(){var n="/api/orders/validate/3/"+r.id;e.get(n,null,it,l)}function d(){e.put("/api/conferences/update",c.conference,ft,v)}function g(){e.post("/api/conferences/delete",c.conference,et,v)}function nt(n){c.conference=n.data;c.address=ut(c.conference.Location);p();k();b()}function tt(n){c.orders=n.data;c.totalRecords=c.orders.length;var t={page:1,count:c.orders.length,sorting:{}};c.ordersTable=new s(t,{counts:[],total:c.orders.length,dataset:c.orders});c.isLoading=!1}function it(n){c.orderObjectResult=n.data}function l(n){h.displayError(n.data.Message);c.isLoading=!1}function rt(){var n=c.address.city+", ";return n+(c.address.country=="US"?c.address.state+", "+c.address.country:c.address.country)}function ut(n){var i={city:"",state:"",country:""},t=n.split(",");return t.length==3?(i.city=t[0],i.state=t[1].replace(/[\. ,:-]+/g,""),i.country=t[2].replace(/[\. ,:-]+/g,"")):t.length==2?(i.city=t[0],i.country=t[1].replace(/[\. ,:-]+/g,"")):t.length==1&&(i.country=t[0].replace(/[\. ,:-]+/g,"")),i}function ft(){h.displaySuccess("Successfully confirmed conference");n.sForm.$setPristine();sessionStorage.removeItem("/api/conferences/all");c.isLoading=!0;a()}function et(){h.displaySuccess("Successfully deleted conference");u.path("/admin/conferences")}function v(n){h.displayError(n.data.Message)}t.$broadcast("updatePageLocation","admin");n.pageClass="page-admin-edit-conference";var c=this,y=null;c.isLoading=!0;c.newRandom=Math.random();c.conference={};c.conferenceStatus=[{name:"Confirmed",id:1},{name:"Unconfirmed",id:2},{name:"Disabled",id:3}];c.currencyConversionType=[{name:"Manual",id:0},{name:"Peg To BTC",id:1},{name:"Peg To USD",id:2}];c.conferenceProductsTable=null;c.conferenceProducts=[];c.totalCount=0;c.orderObjectResult={};c.datepicker={};c.datepicker2={};c.dateOptions={formatYear:"yy",startingDay:1,showWeeks:!1};c.openDatePicker=function(n){n.preventDefault();n.stopPropagation();c.datepicker.opened=!0};c.openDatePicker2=function(n){n.preventDefault();n.stopPropagation();c.datepicker2.opened=!0};c.closePage=function(){var n=window.location.href;window.history.go(-1);setTimeout(function(){window.location.href==n&&window.close()},500)};c.edit=function(n){u.path("/admin/conferences/products/edit/"+n.ID)};c.update=function(n){if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});return}c.conference.Location=rt();d()};c.askDelete=function(){var n='<div class="modal-body">Are you sure you want to delete this?<\/div>',t;n+='<div class="modal-footer"><button class="btn btn-primary" ng-click="vm.ok()">OK<\/button><button class="btn btn-default" ng-click="vm.cancel()">Cancel<\/button><\/div>';t=f.open({template:n,controller:i,controllerAs:"vm"});t.result.then(function(){g()})};c.prepareFiles=function(n){y=n};c.editCustomer=function(n){var t=location.protocol+"//"+location.hostname+(location.port?":"+location.port:""),i=t+"/admin/customers/edit/"+n.CustomerID;window.open(i,"_blank")};a()}function i(n,t){var i=this;i.ok=function(){t.close()};i.cancel=function(){t.dismiss("cancel")}}n.controller("editConferenceCtrl",t);t.$inject=["$scope","$rootScope","$routeParams","$location","$modal","apiService","bitcoinService","NgTableParams","notificationService"];i.$inject=["$scope","$modalInstance"]}(angular.module("app")),function(n){"use strict";function t(n,t,i,r,u,f,e){function s(n){n=n||0;var t={params:{page:n,pageSize:o.pageSize,filter:o.filter,statusId:o.statusId}};u.get("/api/conferences/",t,h,c)}function h(n){o.conferences=n.data.Items;o.pagesCount=n.data.TotalPages;o.totalCount=n.data.TotalCount;var t={page:1,count:o.pageSize,sorting:{name:"asc"}};o.conferencesTable=new e(t,{counts:[],total:o.totalCount,dataset:o.conferences})}function c(n){f.displayError(n.data.Message)}function l(){n.$watch("[vm.filter, vm.statusId]",function(n){n!=""&&n!=undefined&&n.length>2?s():s(0)})}t.$broadcast("updatePageLocation","admin");n.pageClass="page-admin-conferences";var o=this;o.conferencesTable=null;o.conferences=[];o.filter="";o.statusId="";o.page=0;o.pageSize=10;o.pagesCount=0;o.totalCount=0;o.edit=function(n){var t=window.location.href+"/edit/"+n.ID;window.open(t,"_blank")};o.pageChanged=function(){s(o.page-1)};l()}n.controller("conferencesCtrl",t);t.$inject=["$scope","$rootScope","$filter","$location","apiService","notificationService","NgTableParams"]}(angular.module("app")),function(n){"use strict";function t(n,t,i,r,u,f,e,o){function a(n){$("#paymentAddress").removeClass("input-loading");n.data.is_valid?b():k()}function v(n){$("#paymentAddress").removeClass("input-loading");f.displayError(n.data.Message)}function y(n){f.displaySuccess("Successfully added product");s.product=n.data;sessionStorage.removeItem("/api/products");l?o.uploadImage(l,"product",s.product.ID,p):h?o.uploadFile(h,"product",s.product.ID,c):c()}function p(){h?o.uploadFile(h,"product",s.product.ID,c):c()}function c(){r.path("/admin/products")}function w(n){f.displayError(n.data.Message)}function b(){$("#paymentAddressFormGroup").addClass("has-error");n.sForm.paymentAddress.$setValidity("valid",!1)}function k(){$("#paymentAddressFormGroup").removeClass("has-error");$("#paymentAddressFormGroup label.has-error").remove();n.sForm.paymentAddress.$setValidity("valid",!0)}t.$broadcast("updatePageLocation","admin");n.pageClass="page-admin-add-product";var s=this,l=null,h=null;s.newRandom=Math.random();s.product={StatusId:2,Date:new Date,CreatedDate:new Date,LastUpdated:new Date};s.productStatus=[{name:"Enabled",id:1},{name:"Disabled",id:2}];s.create=function(n){if(n.$invalid){angular.forEach(n.$error,function(n){console.info(n);angular.forEach(n,function(n){console.info(n);n.$setDirty()})});return}u.post("/api/products/add",s.product,y,w)};s.prepareImage=function(n){l=n};s.prepareFile=function(n){h=n};s.validatePaymentAddress=function(){if(typeof s.product.PaymentAddress!="undefined")$("#paymentAddress").addClass("input-loading"),e.getPrice(a,v);else return}}n.controller("addProductCtrl",t);t.$inject=["$scope","$rootScope","$routeParams","$location","apiService","notificationService","bitcoinService","fileUploadService"]}(angular.module("app")),function(n){"use strict";function t(n,t,r,u,f,e,o,s,h,c,l){function d(){v?l.uploadFile(v,"product",a.product.ID,y):y()}function g(){var n="/api/products/file/"+a.product.ID;e({method:"GET",url:n,responseType:"arraybuffer"}).success(function(n,t,i){var u,f,e;i=i();var o=i["x-filename"],s=i["content-type"],r=document.createElement("a");try{u=new Blob([n],{type:s});f=window.URL.createObjectURL(u);r.setAttribute("href",f);r.setAttribute("download",o);e=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});r.dispatchEvent(e)}catch(h){}}).error(function(){})}function b(){var n="/api/products/"+r.id;o.get(n,null,tt,it)}function y(){o.put("/api/products/update",a.product,rt,k)}function nt(){o.post("/api/products/delete",a.product,ut,k)}function tt(n){a.product=n.data;w(0,!0)}function w(n,t){t==!0?a.ordersTable.reload():a.ordersTable.page(n)}function it(n){c.displayError(n.data.Message);a.isLoading=!1}function rt(){c.displaySuccess("Successfully confirmed product");n.sForm.$setPristine();sessionStorage.removeItem("/api/products/public");a.isLoading=!0;b()}function ut(){c.displaySuccess("Successfully deleted product");u.path("/admin/products")}function k(n){c.displayError(n.data.Message)}t.$broadcast("updatePageLocation","admin");n.pageClass="page-admin-edit-product";var p=null,v=null,a=this;a.isLoading=!0;a.newRandom=Math.random();a.product={};a.orders=[];a.productStatus=[{name:"Enabled",id:1},{name:"Disabled",id:2}];a.page=0;a.pageSize=10;a.pagesCount=0;a.totalCount=0;a.edit=function(n){var t=location.protocol+"//"+location.hostname+(location.port?":"+location.port:""),i=t+"/admin/orders/edit/"+n.ID;window.open(i,"_blank")};a.editCustomer=function(n){var t=location.protocol+"//"+location.hostname+(location.port?":"+location.port:""),i=t+"/admin/customers/edit/"+n.CustomerID;window.open(i,"_blank")};a.pageChanged=function(){w(a.page)};a.changePageSize=function(){a.page=0;w(0,!0)};a.closePage=function(){var n=window.location.href;window.history.go(-1);setTimeout(function(){window.location.href==n&&window.close()},500)};a.update=function(n){if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});return}p?l.uploadImage(p,"product",a.product.ID,d):v?l.uploadFile(v,"product",a.product.ID,y):y()};a.askDelete=function(){var n='<div class="modal-body">Are you sure you want to delete this?<\/div>',t;n+='<div class="modal-footer"><button class="btn btn-primary" ng-click="vm.ok()">OK<\/button><button class="btn btn-default" ng-click="vm.cancel()">Cancel<\/button><\/div>';t=f.open({template:n,controller:i,controllerAs:"vm"});t.result.then(function(){nt()})};a.prepareImage=function(n){p=n};a.prepareFile=function(n){v=n};a.download=function(){g()};a.tableParams={page:a.page,count:a.pageSize,sorting:{}};a.ordersTable=new h(a.tableParams,{counts:[],total:a.totalCount,getData:function(n){var t=n.orderBy().toString(),i=t.charAt(1).toUpperCase().length>0?t.charAt(1).toUpperCase()+t.slice(2):"",r=t.charAt(0)=="+"?"asc":"desc",u={params:{page:a.page==0?a.page:a.page-1,pageSize:a.pageSize,orderBy:i,orderByDirection:r,productId:a.product.ID}};return s.getOrders(u).then(function(n){return a.orders=n.Items,a.pagesCount=n.TotalPages,a.totalCount=n.TotalCount,a.isLoading=!1,a.orders})}});b()}function i(n,t){var i=this;i.ok=function(){t.close()};i.cancel=function(){t.dismiss("cancel")}}n.controller("editProductCtrl",t);t.$inject=["$scope","$rootScope","$routeParams","$location","$modal","$http","apiService","ordersService","NgTableParams","notificationService","fileUploadService"];i.$inject=["$scope","$modalInstance"]}(angular.module("app")),function(n){"use strict";function t(n,t,i,r,u,f,e){function s(n){n=n||0;var t={params:{page:n,pageSize:o.pageSize,filter:o.filter,statusId:o.statusId}};u.get("/api/products/",t,h,c)}function h(n){o.products=n.data.Items;o.pagesCount=n.data.TotalPages;o.totalCount=n.data.TotalCount;var t={page:1,count:o.pageSize,sorting:{name:"asc"}};o.productsTable=new e(t,{counts:[],total:o.totalCount,dataset:o.products})}function c(n){f.displayError(n.data)}function l(){n.$watch("[vm.filter, vm.statusId]",function(n){n!=""&&n!=undefined&&n.length>2?s():s(0)})}n.pageClass="page-admin-products";t.$broadcast("updatePageLocation","admin");var o=this;o.productsTable=null;o.products=[];o.filter="";o.statusId="";o.page=0;o.pageSize=10;o.pagesCount=0;o.totalCount=0;o.edit=function(n){var t=window.location.href+"/edit/"+n.ID;window.open(t,"_blank")};o.pageChanged=function(){s(o.page-1)};l()}n.controller("productsCtrl",t);t.$inject=["$scope","$rootScope","$filter","$location","apiService","notificationService","NgTableParams"]}(angular.module("app")),function(n){"use strict";function t(n,t,i,r,u,f){function o(n){f.displaySuccess("Successfully added seminar help");e.seminarHelp=n.data;r.path("/admin/seminarhelp")}function s(n){f.displayError(n.data.Message)}function h(){var n="/api/customers/all";e.cacheKey=n;u.get(n,null,c,l)}function c(n){e.customers=n.data;e.customers.push({ID:"",FullName:"Select Customer"});e.seminarHelp.CustomerID="";e.loading=!1}function l(n){f.displayError(n.data)}t.$broadcast("updatePageLocation","admin");n.pageClass="page-admin-add-seminar-help";var e=this;e.loading=!0;e.seminarHelp={CustomerID:"",Contacted:!1,CreatedDate:new Date};e.customers=[];e.create=function(n){if(n.$invalid){angular.forEach(n.$error,function(n){console.info(n);angular.forEach(n,function(n){console.info(n);n.$setDirty()})});return}u.post("/api/seminarhelp/add",e.seminarHelp,o,s)};h()}n.controller("addSeminarHelpCtrl",t);t.$inject=["$scope","$rootScope","$routeParams","$location","apiService","notificationService"]}(angular.module("app")),function(n){"use strict";function t(n,t,r,u,f,e,o,s){function c(){h.isLoading=!0;var n="/api/seminarhelp/"+r.id;e.get(n,null,y,p)}function l(){e.put("/api/seminarhelp/update",h.seminarHelp,w,a)}function v(){e.post("/api/seminarhelp/delete",h.seminarHelp,b,a)}function y(n){h.isLoading=!1;h.seminarHelp=n.data}function p(n){h.isLoading=!1;s.displayError(n.data)}function w(){s.displaySuccess("Successfully updated seminar help");n.sForm.$setPristine();c()}function b(){s.displaySuccess("Successfully deleted seminar help");u.path("/admin/workshophelp")}function a(n){s.displayError(n.data)}t.$broadcast("updatePageLocation","admin");n.pageClass="page-admin-edit-seminar-help";var h=this;h.isLoading=!0;h.seminarHelp={};h.update=function(n){if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});return}l()};h.setContacted=function(n){h.seminarHelp.Contacted=n;l()};h.askDelete=function(){var n='<div class="modal-body">Are you sure you want to delete this?<\/div>',t;n+='<div class="modal-footer"><button class="btn btn-primary" ng-click="vm.ok()">OK<\/button><button class="btn btn-default" ng-click="vm.cancel()">Cancel<\/button><\/div>';t=f.open({template:n,controller:i,controllerAs:"vm"});t.result.then(function(){v()})};c()}function i(n,t){var i=this;i.ok=function(){t.close()};i.cancel=function(){t.dismiss("cancel")}}n.controller("editSeminarHelpCtrl",t);t.$inject=["$scope","$rootScope","$routeParams","$location","$modal","apiService","NgTableParams","notificationService"];i.$inject=["$scope","$modalInstance"]}(angular.module("app")),function(n){"use strict";function t(n,t,i,r,u,f,e){function s(n){n=n||0;var t={params:{page:n,pageSize:o.pageSize,filter:o.filter,isVenue:o.isVenue?o.isVenue:null,isCatering:o.isCatering?o.isCatering:null,isLodging:o.isLodging?o.isLodging:null,isMeetup:o.isMeetup?o.isMeetup:null,isOther:o.isOther?o.isOther:null}};u.get("/api/seminarhelp/",t,h,c)}function h(n){o.seminarHelp=n.data.Items;o.pagesCount=n.data.TotalPages;o.totalCount=n.data.TotalCount;var t={page:1,count:o.pageSize,sorting:{name:"asc"}};o.seminarHelpTable=new e(t,{counts:[],total:o.totalCount,dataset:o.seminarHelp})}function c(n){f.displayError(n.data)}function l(){n.$watch("[vm.filter, vm.isVenue, vm.isCatering, vm.isLodging, vm.isMeetup, vm.isOther]",function(n){n!=""&&n!=undefined&&n.length>2?s():s(0)})}n.pageClass="page-admin-seminar-help";t.$broadcast("updatePageLocation","admin");var o=this;o.seminarHelpTable=null;o.seminarHelp=[];o.filter="";o.isVenue="";o.isCatering="";o.isLodging="";o.isMeetup="";o.isOther="";o.page=0;o.pageSize=10;o.pagesCount=0;o.totalCount=0;o.edit=function(n){r.path("/admin/workshophelp/edit/"+n.ID)};o.pageChanged=function(){s(o.page-1)};l()}n.controller("adminSeminarHelpCtrl",t);t.$inject=["$scope","$rootScope","$filter","$location","apiService","notificationService","NgTableParams"]}(angular.module("app")),function(n){"use strict";function t(n,t,i,r,u,f,e,o,s){function l(){h.isError=!1;console.info("got here 2");h.CurrencyTypeID==1&&(h.order.StatusId==2||h.order.StatusId==3)&&((h.order.TransactionID==null||h.order.TransactionID=="")&&(h.errorMessage="Transaction ID Required.",h.isError=!0),h.order.PaymentAddressID==""&&(h.order.Address==null||h.order.Address=="")&&(h.errorMessage="Payment Address Required.",h.isError=!0),h.order.PaymentAddressID!=""&&h.order.Address!=null&&h.order.Address!=""&&(h.errorMessage="Can't select both Custom and Existing Payment Addresses",h.isError=!0),h.order.PaymentAddressID==3&&(h.order.Address="generate",h.isError=!0));h.formData.orderTypeId==0?(h.errorMessage="Order Type Required.",h.isError=!0):h.formData.orderTypeId==1&&h.order.SeminarID=="0"?(h.errorMessage="Workshop Required.",h.isError=!0):h.formData.orderTypeId==2&&h.order.ProductID=="0"?(h.errorMessage="Product Required.",h.isError=!0):h.formData.orderTypeId==3&&h.order.ConferenceProductID=="0"?(h.errorMessage="Conference Rate Required.",h.isError=!0):h.formData.orderTypeId==5&&(h.order.EventID=="0"||h.order.EventPriceID=="0")&&(h.errorMessage="Event and Price Required.",h.isError=!0);h.formData.discountTypeId==1&&(h.formData.discountAmount.length==0||h.formData.discountAmount==0)?(h.errorMessage="Discount Amount Required.",h.isError=!0):h.formData.discountTypeId==2&&h.order.DiscountID=="0"&&(h.errorMessage="Discount Required.",h.isError=!0);console.info(h.errorMessage);h.isError}function a(){e.post("/api/orders/add",h.order,v,y)}function v(){s.displaySuccess("Successfully added order");r.path("/admin/orders")}function y(n){s.displayError(n.data.Message)}function p(){e.get("/api/customers/all",null,rt,c)}function w(){e.get("/api/seminars/all",null,ut,c)}function b(){e.get("/api/products/all",null,ft,c)}function k(){e.get("/api/conferences/all",null,et,c)}function d(){e.get("/api/conferenceproducts/all",null,ot,c)}function g(){e.get("/api/events/type/2",null,st,c)}function nt(){e.get("/api/eventprices/type/2",null,ht,c)}function tt(){e.get("/api/discounts/all",null,ct,c)}function it(){var n,t;for(h.discounts=[],n=0;n<h.allDiscounts.length;n++)t=h.allDiscounts[n],t.OrderTypeID==h.formData.orderTypeId&&t.DiscountTypeID==2&&h.discounts.push(t);h.discounts.push({ID:"0",Title:"Discounts"})}function rt(n){h.customers=n.data;w();b();k();d();g();nt();tt()}function ut(n){h.seminars=n.data;h.seminars.push({ID:"0",Location:"Workshops"})}function ft(n){h.products=n.data;h.products.push({ID:"0",Title:"Products"})}function et(n){h.isLoading=!1;h.conferences=n.data;h.conferences.push({ID:"0",Title:"Conferences"})}function ot(n){h.conferenceProducts=n.data}function st(n){h.events=n.data;h.events.push({ID:"0",Title:"Events"})}function ht(n){h.eventPrices=n.data;h.eventPrices.push({ID:"0",TitleWithPrice:"Event Prices"})}function ct(n){h.allDiscounts=n.data}function c(n){s.displayError(n.data.Message)}t.$broadcast("updatePageLocation","admin");n.pageClass="page-admin-add-order";var h=this;h.isLoading=!0;h.isError=!1;h.errorMessage="";h.customer=undefined;h.customers=[];h.seminars=[];h.allDiscounts=[];h.discounts=[];h.products=[];h.conferences=[];h.conferenceProducts=[];h.conferenceProductsByConferenceId=[];h.events=[];h.eventPrices=[];h.isWorkshop=!1;h.isProduct=!1;h.isConference=!1;h.isEvent=!1;h.formData={conferenceId:"0",discountTypeId:"",discountAmount:0,orderTypeId:0};h.order={StatusId:"",InvoiceID:null,Address:null,TransactionID:null,ConfirmID:null,CustomerID:"",SeminarID:"0",ProductID:"0",DiscountID:"0",EventID:"0",EventPriceID:"0",DiscountAmount:0,TotalAmount:0,TotalDiscount:0,TotalPaid:0,Description:null,PaymentAddressID:"",PaidDate:null,ConfirmedDate:null,ConferenceProductID:"0",CurrencyTypeID:1,CreatedDate:new Date};h.create=function(n){if(console.info("got here 1"),n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});return}l(n);h.order.CurrencyTypeID==2&&(h.order.PaymentAddressID=1,console.info("set"));h.isError||a()};h.selectCustomer=function(n){h.customer=n;h.order.CustomerID=h.customer.ID};h.selectOrderType=function(n){n=="workshop"?(h.formData.orderTypeId=1,h.isProduct=!1,h.isConference=!1,h.isEvent=!1,h.order.ProductID="0",h.order.ConferenceProductID="0",h.formData.conferenceId="0",h.order.EventID="0",h.order.EventPriceID="0"):n=="product"?(h.formData.orderTypeId=2,h.isWorkshop=!1,h.isConference=!1,h.isEvent=!1,h.order.SeminarID="0",h.order.ConferenceProductID="0",h.formData.conferenceId="0",h.order.EventID="0",h.order.EventPriceID="0"):n=="conferece"?(h.formData.orderTypeId=3,h.isWorkshop=!1,h.isProduct=!1,h.isEvent=!1,h.order.SeminarID="0",h.order.ProductID="0",h.order.EventID="0",h.order.EventPriceID="0"):n=="event"&&(h.formData.orderTypeId=5,h.isWorkshop=!1,h.isProduct=!1,h.isConference=!1,h.order.ConferenceProductID="0",h.formData.conferenceId="0",h.order.SeminarID="0",h.order.ProductID="0")};h.loadConferenceProducts=function(){h.conferenceProductsByConferenceId=[];var n=f("filter")(h.conferences,{ID:h.formData.conferenceId},!0);n.length&&(h.conferenceProductsByConferenceId=h.conferenceProducts.filter(function(n){return n.ConferenceID===h.formData.conferenceId}),h.conferenceProductsByConferenceId.push({ID:"0",TitleWithPrice:"Rates"}))};h.processAmount=function(){var n;h.order.TotalAmount=0;h.formData.orderTypeId==1?(n=f("filter")(h.seminars,{ID:h.order.SeminarID},!0),n.length&&(h.order.TotalAmount=h.order.CurrencyTypeID==1?n[0].Price:n[0].PriceFiat,h.order.Description=n[0].Location)):h.formData.orderTypeId==2?(n=f("filter")(h.products,{ID:h.order.ProductID},!0),n.length&&(h.order.TotalAmount=h.order.CurrencyTypeID==1?n[0].Price:n[0].PriceFiat,h.order.Description=n[0].Title)):h.formData.orderTypeId==3?(n=f("filter")(h.conferenceProducts,{ID:h.order.ConferenceProductID},!0),n.length&&(h.order.TotalAmount=h.order.CurrencyTypeID==1?n[0].Price:n[0].PriceFiat,h.order.Description=n[0].Title)):h.formData.orderTypeId==5&&(n=f("filter")(h.eventPrices,{ID:h.order.EventPriceID},!0),n.length&&(h.order.TotalAmount=h.order.CurrencyTypeID==1?n[0].Price:n[0].PriceFiat,h.order.Description=n[0].Title));h.order.TotalPaid=h.order.TotalAmount;h.order.StatusId==2?h.order.PaidDate=new Date:h.order.StatusId==3?(h.order.PaidDate=new Date,h.order.ConfirmedDate=new Date):(h.order.PaidDate=null,h.order.ConfirmedDate=null);it()};h.processDiscount=function(){if(h.order.DiscountAmount=0,h.order.TotalDiscount=0,h.order.TotalPaid=h.order.TotalAmount,h.formData.discountTypeId=="1")h.order.DiscountAmount=parseFloat(h.formData.discountAmount)/100;else if(h.formData.discountTypeId=="2"){var n=f("filter")(h.discounts,{ID:h.order.DiscountID},!0);n.length&&(h.order.DiscountAmount=n[0].DiscountAmount)}h.order.TotalDiscount=h.order.TotalAmount*h.order.DiscountAmount;h.order.TotalPaid=h.order.TotalAmount-h.order.TotalDiscount};h.clearDiscount=function(){h.order.DiscountAmount=0;h.order.TotalDiscount=0;h.order.TotalPaid=0};h.clearTransaction=function(){h.order.TransactionID=null;h.order.Address=null;h.order.PaymentAddressID="";h.order.SeminarID="0";h.order.ProductID="0";h.order.DiscountID="0";h.order.EventID="0";h.order.EventPriceID="0";h.order.TotalAmount=0;h.clearDiscount()};p()}n.controller("addOrderCtrl",t);t.$inject=["$scope","$rootScope","$routeParams","$location","$modal","$filter","apiService","NgTableParams","notificationService"]}(angular.module("app")),function(n){"use strict";function t(n,t,r,u,f,e,o,s,h,c){function b(){o.put("/api/orders/email/seminarprestreamurl",l.orderData.Order,k,a)}function k(){c.displaySuccess("Successfully sent meeting link to customer")}function d(){o.put("/api/orders/email/seminarstreamurl",l.orderData.Order,g,a)}function g(){c.displaySuccess("Successfully sent Youtube link to customer")}function nt(){o.put("/api/orders/email/seminarconfirmed",l.orderData.Order,w,a)}function tt(){o.put("/api/orders/email/registration",l.orderData.Order,w,a)}function it(){o.put("/api/orders/email/confirm",l.orderData.Order,w,a)}function rt(){o.put("/api/orders/email/finalconfirm",l.orderData.Order,w,a)}function w(){c.displaySuccess("Successfully re-sent email")}function v(){var n="/api/orders/"+r.id;o.get(n,null,dt,y)}function ut(){var n="/api/seminars/location/"+l.orderData.Seminar.Location;o.get(n,null,ft,y)}function ft(n){l.seminars=n.data;l.seminars.push({ID:"0",LocationAndDate:"Workshops"});l.isSeminarsLoaded=!0}function et(){o.post("/api/orders/delete",l.orderData.Order,ii,a)}function ot(n){var t={OrderID:l.orderData.Order.ID,CurrencyTypeID:n};o.put("/api/orders/updatecurrency",t,p,a)}function st(){var n={OrderID:l.orderData.Order.ID,SeminarID:l.seminarId};o.put("/api/orders/updateseminar",n,p,a)}function ht(n){var t={OrderID:l.orderData.Order.ID,IsValid:n};o.put("/api/orders/updatevalidity",t,p,a)}function ct(){var n={OrderID:l.orderData.Order.ID,StatusId:3};o.put("/api/orders/confirm",n,ti,a)}function lt(n){var t={OrderID:l.orderData.Order.ID,IsValid:n};o.put("/api/orders/cancel",t,p,a)}function at(){var n={CustomerId:l.orderData.CustomerID,InvoiceId:l.orderData.Order.InvoiceID,TransactionId:l.formData.transactionId};o.put("/api/orders/payandconfirm/",n,vt,y)}function vt(){c.displaySuccess("Successfully paid and confirmed order");n.sForm.$setPristine();l.isLoading=!0;v()}function yt(){var n={OrderID:l.orderData.Order.ID,DiscountAmount:parseFloat(l.formData.discountAmount)/100};o.put("/api/orders/applydiscount/",n,pt,y)}function pt(){c.displaySuccess("Successfully added discount");n.sForm2.$setPristine();l.isLoading=!0;v()}function wt(){var n={OrderID:l.orderData.Order.ID,DiscountAmount:0};o.put("/api/orders/removediscount/",n,bt,y)}function bt(){c.displaySuccess("Successfully removed discount");n.sForm2.$setPristine();l.isLoading=!0;v()}function kt(){var n={Action:l.formData.action,OrderID:l.orderData.Order.ID,PaymentAddress:l.formData.paymentAddress,TransactionID:l.formData.transactionId2};o.put("/api/orders/updatepaymentaddress",n,p,a)}function dt(n){typeof n.data!="undefined"?(l.orderData=n.data,l.orderData.Order.StatusId!=3&&l.orderData.Order.StatusId!=6&&l.orderData.Order.CurrencyTypeID==1&&l.orderData.Order.Address!=null&&ri(),l.orderData.OrderTypeID==1&&l.orderData.Seminar.IsOnline==!1&&ut()):u.path("/admin/orders");l.isLoading=!1;gt();ni()}function gt(){$(".modal").modal("hide")}function ni(){n.sForm.$setPristine();n.sForm2.$setPristine();n.sForm3.$setPristine();l.formData.action="";l.formData.transactionId="";l.formData.discountAmount="";l.formData.transactionId2="";l.formData.paymentAddress=""}function y(n){c.displayError(n.data.Message);l.isLoading=!1}function ti(){c.displaySuccess("Successfully confirmed order");n.sForm.$setPristine();l.isLoading=!0;v()}function p(){c.displaySuccess("Successfully updated order");l.isLoading=!0;v()}function ii(){c.displaySuccess("Successfully deleted order");u.path("/admin/orders")}function a(n){c.displayError(n.data.Message)}function ri(){l.isLoadingTransactions=!0;s.getAddressTransactions(l.orderData.Order.Address,ui,fi,!0)}function ui(n){l.isLoadingTransactions=!1;l.transactions=n.data.data.list}function fi(){}t.$broadcast("updatePageLocation","admin");n.pageClass="page-admin-edit-order";var l=this;l.hasHistory=!1;l.trust=e.trustAsHtml;l.trustSrc=function(n){return e.trustAsResourceUrl(n)};l.isLoading=!0;l.isLoadingTransactions=!1;l.orderData={};l.transactions=[];l.seminars=[];l.seminarId="0";l.formData={action:"",transactionId:"",discountAmount:"",transactionId2:"",paymentAddress:""};l.closePage=function(){var n=window.location.href;window.history.go(-1);setTimeout(function(){window.location.href==n&&window.close()},500)};l.editSeminar=function(){u.path("/admin/workshops/edit/"+l.orderData.Seminar.ID)};l.editProduct=function(){u.path("/admin/products/edit/"+l.orderData.Product.ID)};l.editConference=function(){u.path("/admin/conferences/edit/"+l.orderData.ConferenceProduct.ConferenceID)};l.editSubscription=function(){u.path("/admin/subscriptions/edit/"+l.orderData.SubscriptionProduct.SubscriptionID)};l.editEvent=function(){u.path("/admin/events/edit/"+l.orderData.Event.ID)};l.setConfirmed=function(){ct()};l.setCanceled=function(n){lt(n)};l.setPaidAndConfirmed=function(){at()};l.resendRegistrationEmail=function(){tt()};l.sendConfirmEmail=function(){nt()};l.resendConfirmEmail=function(){it()};l.resendFinalConfirmEmail=function(){rt()};l.updateOrderCurrency=function(n){ot(n)};l.updateOrderValidity=function(n){ht(n)};l.updateOrderSeminar=function(){st()};l.emailSeminarStreamURL=function(){d()};l.emailSeminarPreStreamURL=function(){b()};l.completePayment=function(n){if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});return}completePayment()};l.addDiscount=function(n){if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});return}yt()};l.removeDiscount=function(){wt()};l.updatePaymentAddress=function(n){if(n.$invalid){angular.forEach(sForm.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});return}kt()};l.askDelete=function(){var n='<div class="modal-body">Are you sure you want to delete this?<\/div>',t;n+='<div class="modal-footer"><button class="btn btn-primary" ng-click="vm.ok()">OK<\/button><button class="btn btn-default" ng-click="vm.cancel()">Cancel<\/button><\/div>';t=f.open({template:n,controller:i,controllerAs:"vm"});t.result.then(function(){et()})};v()}function i(n,t){var i=this;i.ok=function(){t.close()};i.cancel=function(){t.dismiss("cancel")}}n.controller("editOrderCtrl",t);t.$inject=["$scope","$rootScope","$routeParams","$location","$modal","$sce","apiService","bitcoinService","NgTableParams","notificationService"];i.$inject=["$scope","$modalInstance"]}(angular.module("app")),function(n){"use strict";function t(n,t,i,r,u,f,e,o,s,h){function p(n){var t=n.data,i=location.protocol+"//"+location.hostname+(location.port?":"+location.port:""),r=i+"/Content/temp/"+t.fileName;window.open(r)}function w(){e.get("/api/seminars/all/withorders",null,rt,l)}function b(){e.get("/api/products/all/withorders",null,ut,l)}function k(){e.get("/api/conferences/all",null,ft,l)}function d(){var n="/api/conferenceproducts/conference/"+c.conferenceId;e.get(n,null,et,l)}function g(){e.get("/api/subscriptions/all",null,ot,l)}function nt(){var n="/api/subscriptionproducts/subscription/"+c.subscriptionId;e.get(n,null,st,l)}function tt(){e.get("/api/eventprices/all",null,ht,l)}function it(){e.get("/api/discounts/all/withorders",null,ct,l)}function a(n,t){t==!0?c.ordersTable.reload():c.ordersTable.page(n)}function rt(n){var t=n.data;c.seminars=t.filter(function(n){return n.IsOnline==!1&&n.IsOnDemand==!1});c.webinars=t.filter(function(n){return n.IsOnline==!0&&n.IsOnDemand==!1});c.onDemand=t.filter(function(n){return n.IsOnline==!1&&n.IsOnDemand==!0});c.seminars.push({ID:"0",LocationAndId:"Workshops"});c.webinars.push({ID:"0",LocationAndId:"Webinars"});c.onDemand.push({ID:"0",TitleAndId:"OnDemand"});c.isSeminarsLoaded=!0}function ut(n){c.products=n.data;c.products.push({ID:"0",Title:"Products"});c.isProductsLoaded=!0}function ft(n){c.conferences=n.data;c.conferences.push({ID:"0",Title:"Conferences"});c.isConferencesLoaded=!0}function et(n){c.conferenceProducts=n.data;c.conferenceProducts.push({ID:"0",Title:"Conf Rates"})}function ot(n){c.subscriptions=n.data;c.subscriptions.push({ID:"0",Title:"Subscriptions"});c.isSubscriptionsLoaded=!0}function st(n){c.subscriptionProducts=n.data;c.subscriptionProducts.push({ID:"0",Title:"Sub Plans"})}function ht(n){c.eventPrices=n.data;c.eventPrices.push({ID:"0",Title:"Event Prices"});c.isEventPricesLoaded=!0}function ct(n){c.discounts=n.data;c.discounts.push({ID:"*",Title:"From Database"});c.discounts.push({ID:"Manual",Title:"Manual"});c.discounts.push({ID:"0",Title:"Discounts"});c.isDiscountsLoaded=!0}function lt(){if(c.currencyTypeId==1)e.get("/api/pubkeys/all",null,at,l)}function at(n){c.pubKeys=n.data;c.pubKeys.length>0&&angular.forEach(c.pubKeys,function(n){var t=n;t.Address.length>50&&(t.Address=t.Address.substr(0,50)+"...");c.pubKeysDropdown.push(t)});c.pubKeysDropdown.push({ID:"0",Title:"Pub Keys"});c.pubKeysDropdown.push({ID:"all",Title:"Any"});c.pubKeysDropdown.push({ID:"none",Title:"None"})}function l(n){s.displayError(n.data.Message)}function vt(){e.put("/api/orders/email/registration/batch",null,yt,v)}function yt(){s.displaySuccess("Successfully sent registration emails")}function v(n){s.displayError(n.data.Message)}function pt(){e.put("/api/orders/cancelpending",null,wt,v)}function wt(){s.displaySuccess("Successfully canceled pending orders");y()}function y(){n.$watch("[vm.filter, vm.statusId, vm.seminarId, vm.productId, vm.conferenceId, vm.conferenceProductId, vm.subscriptionId, vm.subscriptionProductId, vm.eventPriceId, vm.discountId, vm.orderTypeId, vm.currencyTypeId, vm.pubKeyId, vm.fromDate, vm.toDate]",function(){c.firstRun||(c.filter!=""&&c.filter.length>1?a(0,!0):c.filter==""&&a(0,!0));c.firstRun=!1})}n.pageClass="page-admin-orders";t.$broadcast("updatePageLocation","admin");var c=this;c.firstRun=!0;c.ordersTable=null;c.orders=[];c.seminars=[];c.webinars=[];c.onDemand=[];c.isSeminarsLoaded=!1;c.products=[];c.isProductsLoaded=!1;c.conferences=[];c.conferenceProducts=[];c.isConferencesLoaded=!1;c.subscriptions=[];c.subscriptionProducts=[];c.isSubscriptionsLoaded=!1;c.eventPrices=[];c.isEventPricesLoaded=!1;c.discounts=[];c.isDiscountsLoaded=!1;c.pubKeys=[];c.pubKeysDropdown=[];c.filter="";c.statusId="";c.orderTypeId="";c.currencyTypeId="";c.seminarId="0";c.productId="0";c.conferenceId="0";c.conferenceProductId="0";c.subscriptionId="0";c.subscriptionProductId="0";c.eventPriceId="0";c.discountId="0";c.fromDate="";c.toDate="";c.pubKeyId="0";c.page=0;c.pageSize=100;c.pagesCount=0;c.totalCount=0;c.orderBy="";c.orderByDirection="";c.datepicker={};c.datepicker2={};c.dateOptions={formatYear:"yy",startingDay:1,showWeeks:!1};c.openDatePicker=function(n){n.preventDefault();n.stopPropagation();c.datepicker.opened=!0};c.openDatePicker2=function(n){n.preventDefault();n.stopPropagation();c.datepicker2.opened=!0};c.resendRegistrationEmailBatch=function(){vt()};c.cancelPendingOrders=function(){pt()};c.edit=function(n){var t=window.location.href.replace("orders","customers")+"/edit/"+n.CustomerID;window.open(t,"_blank")};c.goToOrdersAdd=function(){r.path("/admin/orders/add")};c.pageChanged=function(){a(c.page)};c.changePageSize=function(){c.page=0;a(0,!0)};c.downloadFile=function(){var n={params:{orderBy:c.orderBy,orderByDirection:c.orderByDirection,filter:c.filter,statusId:c.statusId,seminarId:c.seminarId,productId:c.productId,conferenceId:c.conferenceId,conferenceProductId:c.conferenceProductId,eventPriceId:c.eventPriceId,discountId:c.discountId,typeId:c.orderTypeId,currencyTypeId:c.currencyTypeId,fromDate:c.fromDate,toDate:c.toDate,pubKeyId:c.pubKeyId}};e.get("/api/orders/export",n,p,l)};c.loadOrderType=function(){c.orderTypeId==""?(c.seminarId="0",c.productId="0",c.conferenceId="0",c.conferenceProductId="0",c.subscriptionId="0",c.subscriptionProductId="0",c.eventPriceId="0"):c.orderTypeId==1||c.orderTypeId==7||c.orderTypeId==8?(c.productId="0",c.conferenceId="0",c.conferenceProductId="0",c.subscriptionId="0",c.subscriptionProductId="0",c.eventPriceId="0",c.isSeminarsLoaded||w()):c.orderTypeId==2?(c.seminarId="0",c.conferenceId="0",c.conferenceProductId="0",c.eventPriceId="0",c.subscriptionId="0",c.subscriptionProductId="0",c.isProductsLoaded||b()):c.orderTypeId==3?(c.seminarId="0",c.productId="0",c.eventPriceId="0",c.isConferencesLoaded||k()):c.orderTypeId==5?(c.seminarId="0",c.productId="0",c.conferenceId="0",c.conferenceProductId="0",c.subscriptionId="0",c.subscriptionProductId="0",c.isEventPricesLoaded||tt()):c.orderTypeId==6&&(c.seminarId="0",c.productId="0",c.eventPriceId="0",c.conferenceId="0",c.conferenceProductId="0",c.isSubscriptionsLoaded||g())};c.loadDiscounts=function(){c.isDiscountsLoaded||it()};c.loadConferenceProducts=function(){d()};c.loadSubscriptionProducts=function(){nt()};c.loadPubkeys=function(){lt()};c.tableParams={page:c.page,count:c.pageSize,sorting:{}};c.ordersTable=new h(c.tableParams,{counts:[],total:c.totalCount,getData:function(n){var t=n.orderBy().toString(),i;return c.orderBy=t.charAt(1).toUpperCase().length>0?t.charAt(1).toUpperCase()+t.slice(2):"",c.orderByDirection=t.charAt(0)=="+"?"asc":"desc",i={params:{page:c.page==0?c.page:c.page-1,pageSize:c.pageSize,orderBy:c.orderBy,orderByDirection:c.orderByDirection,filter:c.filter,statusId:c.statusId,seminarId:c.seminarId,productId:c.productId,conferenceId:c.conferenceId,conferenceProductId:c.conferenceProductId,subscriptionId:c.subscriptionId,subscriptionProductId:c.subscriptionProductId,eventPriceId:c.eventPriceId,discountId:c.discountId,typeId:c.orderTypeId,currencyTypeId:c.currencyTypeId,fromDate:c.fromDate,toDate:c.toDate,pubKeyId:c.pubKeyId}},o.getOrders(i).then(function(n){return c.orders=n.Items,c.pagesCount=n.TotalPages,c.totalCount=n.TotalCount,c.orders})}});y();c.discounts.push({ID:"*",Title:"From Database"});c.discounts.push({ID:"Manual",Title:"Manual"});c.discounts.push({ID:"0",Title:"Discounts"})}n.controller("ordersCtrl",t);t.$inject=["$scope","$rootScope","$filter","$location","$q","$http","apiService","ordersService","notificationService","NgTableParams"]}(angular.module("app")),function(n){"use strict";function t(t,i,r,u,f,e,o,s){function v(){var n=null,t=r("filter")(h.siteSettings,{SettingName:"qr"});return t.length&&(n=t[0].ID),n}function l(n){typeof n!="undefined"&&(h.formData.qr=n.FileName,h.showAlert=!0);var t=w();t.SiteSettings.length>0?f.post("/api/sitesettings/updatebatch",t,a,y):a()}function a(){e.displaySuccess("Successfully updated settings");t.sForm.$setPristine();n.constant("appConfig",h.siteSettings);sessionStorage.setItem("api/sitesettings",JSON.stringify(h.siteSettings))}function y(n){e.displayError(n)}function p(){var n=r("filter")(h.siteSettings,{SettingName:"key"});n.length&&(h.formData.key=n[0].SettingVar);n=r("filter")(h.siteSettings,{SettingName:"channelId"});n.length&&(h.formData.channelId=n[0].SettingVar);n=r("filter")(h.siteSettings,{SettingName:"qr"});n.length&&(h.formData.qr=n[0].SettingVar);n=r("filter")(h.siteSettings,{SettingName:"address"});n.length&&(h.formData.address=n[0].SettingVar);n=r("filter")(h.siteSettings,{SettingName:"email"});n.length&&(h.formData.email=n[0].SettingVar);n=r("filter")(h.siteSettings,{SettingName:"host"});n.length&&(h.formData.host=n[0].SettingVar);n=r("filter")(h.siteSettings,{SettingName:"emailusername"});n.length&&(h.formData.emailusername=n[0].SettingVar);n=r("filter")(h.siteSettings,{SettingName:"emailpassword"});n.length&&(h.formData.emailpassword=n[0].SettingVar)}function w(){for(var e=JSON.stringify(h.siteSettings),u=JSON.parse(e),f=[],t,i,r,n=0;n<h.siteSettings.length;n++)t=h.siteSettings[n],t.SettingName=="key"?h.siteSettings[n].SettingVar=h.formData.key:t.SettingName=="channelId"?h.siteSettings[n].SettingVar=h.formData.channelId:t.SettingName=="qr"?h.siteSettings[n].SettingVar=h.formData.qr:t.SettingName=="address"?h.siteSettings[n].SettingVar=h.formData.address:t.SettingName=="email"?h.siteSettings[n].SettingVar=h.formData.email:t.SettingName=="host"?h.siteSettings[n].SettingVar=h.formData.host:t.SettingName=="emailusername"?h.siteSettings[n].SettingVar=h.formData.emailusername:t.SettingName=="emailpassword"&&(h.siteSettings[n].SettingVar=h.formData.emailpassword);for(n=0;n<u.length;n++)i=u[n],r=h.siteSettings[n],i.SettingName!="qr"&&i.SettingVar!=r.SettingVar&&f.push(r);return{ID:0,LastUpdated:null,SettingName:null,SettingVar:null,SettingsTypeId:0,SiteSettings:f}}i.$broadcast("updatePageLocation","admin");t.pageClass="page-admin-settings";var h=this,c=null;h.siteSettings=o;h.showAlert=!1;h.formData={key:"",channelId:"",qr:"",address:"",email:"",host:"",emailusername:"",emailpassword:""};h.update=function(n){if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});return}var t=v();c?s.uploadDonationImage(c,t,l):l()};h.prepareFiles=function(n){c=n};h.hideAlert=function(){h.showAlert=!1};p()}n.controller("settingsCtrl",t);t.$inject=["$scope","$rootScope","$filter","$location","apiService","notificationService","appConfig","fileUploadService"]}(angular.module("app")),function(n){"use strict";function t(n,t,i,r,u,f,e){function s(){u.get("/api/pagecontent",null,h,c)}function h(n){o.pageContent=n.data;o.totalRecords=o.pageContent.length;o.isLoading=!1;o.pageContentTable=new e({page:1,count:100,sorting:{}},{counts:[],total:o.pageContent.length,dataset:o.pageContent})}function c(n){f.displayError(n.data.Message);o.isLoading=!1}n.pageClass="page-admin-pages";t.$broadcast("updatePageLocation","admin");var o=this;o.pageContentTable=null;o.pageContent=[];o.isLoading=!0;o.totalRecords=0;o.edit=function(n){r.path("/admin/pages/edit/"+n.ID)};s()}n.controller("pagesCtrl",t);t.$inject=["$scope","$rootScope","$filter","$location","apiService","notificationService","NgTableParams"]}(angular.module("app")),function(n){"use strict";function t(n,t,i,r,u,f){function o(){var n="/api/pagecontent/"+i.id;r.get(n,null,s,c)}function s(n){e.page=n.data;h();e.isLoading=!1}function h(){$(document).ready(function(){setTimeout(function(){$("#loadingSummerNote").hide();$("#summernote").summernote({toolbar:[["header",["style"]],["style",["bold","underline","italic","strikethrough"]],["font",["fontsize","color"]],["para",["ul","ol","paragraph"]],["table",["table"]],["insert",["imageButton","video","link"]],["misc",["undo","redo"]],["fullscreen",["fullscreen","codeview","help"]],],buttons:{imageButton:ImageButton}});$(".note-btn").removeAttr("data-original-title");$(".note-editor a").click(function(){return window.open(this.href),!1})},1e3)})}function c(n){u.displayError(n.data.Message);e.isLoading=!1}function l(){u.displaySuccess("Successfully updated page");n.sForm.$setPristine();sessionStorage.removeItem("/api/pagecontent");n.$emit("forcePageContentLoad")}function a(n){u.displayError(n)}n.pageClass="page-admin-edit-page";t.$broadcast("updatePageLocation","admin");var e=this;e.isLoading=!0;e.page={};e.trust=f.trustAsHtml;e.update=function(n){if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});return}e.page.Content=$("#summernote").summernote("code");r.put("/api/pagecontent/update",e.page,l,a)};o()}n.controller("editPageCtrl",t);t.$inject=["$scope","$rootScope","$routeParams","apiService","notificationService","$sce"]}(angular.module("app")),function(n){"use strict";function t(n,t,r,u,f,e,o,s){function l(n){e.post("/api/mediacontent/delete",n,a,v)}function a(){c();o.displaySuccess("Successfully deleted image")}function v(n){o.displayError(n.data.Message)}function c(){e.get("/api/mediacontent",null,y,p)}function y(n){h.mediaContent=n.data;h.totalRecords=h.mediaContent.length;h.isLoading=!1;h.mediaContentTable=new s({page:1,count:30,sorting:{}},{counts:[],total:h.mediaContent.length,dataset:h.mediaContent})}function p(n){o.displayError(n.data.Message);h.isLoading=!1}n.pageClass="page-admin-emails";t.$broadcast("updatePageLocation","admin");var h=this;h.mediaContentTable=null;h.mediaContent=[];h.isLoading=!0;h.totalRecords=0;h.askDelete=function(n){var t='<div class="modal-body">Are you sure you want to delete this?<\/div>',r;t+='<div class="modal-footer"><button class="btn btn-primary" ng-click="vm.ok()">OK<\/button><button class="btn btn-default" ng-click="vm.cancel()">Cancel<\/button><\/div>';r=f.open({template:t,controller:i,controllerAs:"vm"});r.result.then(function(){l(n)})};c()}function i(n,t){var i=this;i.ok=function(){t.close()};i.cancel=function(){t.dismiss("cancel")}}n.controller("mediaContentCtrl",t);t.$inject=["$scope","$rootScope","$filter","$location","$modal","apiService","notificationService","NgTableParams"];i.$inject=["$scope","$modalInstance"]}(angular.module("app")),function(n){"use strict";function t(n,t,i,r,u,f,e,o,s){function c(){s.displaySuccess("Successfully added media content");r.path("/admin/media")}n.pageClass="page-admin-add-media-content";t.$broadcast("updatePageLocation","admin");var h=this;h.mediaImage=null;h.mediaContent={MediaTypeID:1,CreatedDate:new Date};h.prepareFiles=function(n){h.mediaImage=n};h.create=function(){o.uploadMediaContentImageImage(h.mediaImage,c)}}n.controller("addMediaContentCtrl",t);t.$inject=["$scope","$rootScope","$routeParams","$location","$modal","apiService","NgTableParams","fileUploadService","notificationService"]}(angular.module("app")),function(n){"use strict";function t(n,t,i,r,u,f,e){function s(){u.get("/api/emails/type/1",null,h,l)}function h(n){o.emails=n.data;o.totalRecords=o.emails.length;o.isLoading=!1;c();var t={page:1,count:o.emails.length,sorting:{}};o.emailContentTable=new e(t,{counts:[],total:o.emails.length,dataset:o.emails})}function c(){angular.forEach(o.emails,function(n){n.Title.indexOf("Workshop")>-1&&(n.EmailType=n.Title.indexOf("OnDemand")>-1?"OnDemand":n.Title.indexOf("Online")>-1||n.Description.indexOf("Webinar")>-1?"Webinar":"Workshop");n.Title.indexOf("Product")>-1&&(n.EmailType="Product");n.Title.indexOf("Conference")>-1&&(n.EmailType="Conference");n.Title.indexOf("Video")>-1&&(n.EmailType="Video");n.Title.indexOf("Event")>-1&&(n.EmailType="Event");n.Title.indexOf("Telegram")>-1&&(n.EmailType="Telegram");n.Title.indexOf("Order")>-1&&(n.EmailType="Order");n.Title.indexOf("Coupon")>-1&&(n.EmailType="Coupon");n.Title.indexOf("Account")>-1&&(n.EmailType="Account");n.Title.indexOf("Subscription")>-1&&(n.EmailType="Subscription")})}function l(n){f.displayError(n.data.Message);o.isLoading=!1}n.pageClass="page-admin-emails";t.$broadcast("updatePageLocation","admin");var o=this;o.emailContentTable=null;o.emails=[];o.isLoading=!0;o.totalRecords=0;o.edit=function(n){r.path("/admin/emails/edit/"+n.ID)};s()}n.controller("emailsCtrl",t);t.$inject=["$scope","$rootScope","$filter","$location","apiService","notificationService","NgTableParams"]}(angular.module("app")),function(n){"use strict";function t(n,t,r,u,f,e,o,s){function l(){var n="/api/emails/"+r.id;o.get(n,null,y,p)}function a(){o.post("/api/emails/delete",h.email,w,c)}function v(){s.displaySuccess("Successfully sent email")}function y(n){h.email=n.data;b();h.isLoading=!1}function p(n){s.displayError(n.data.Message);h.isLoading=!1}function w(){s.displaySuccess("Successfully deleted automated email");u.path("/admin/emails")}function b(){$(document).ready(function(){setTimeout(function(){$("#loadingSummerNote").hide();$("#summernote").summernote({toolbar:[["header",["style"]],["style",["bold","underline","italic","strikethrough"]],["font",["fontsize","color"]],["para",["ul","ol","paragraph"]],["table",["table"]],["insert",["imageButton","video","link"]],["misc",["undo","redo"]],["fullscreen",["fullscreen","codeview","help"]],],buttons:{imageButton:ImageButton}});$(".note-btn").removeAttr("data-original-title")},1e3)})}function k(){s.displaySuccess("Successfully updated email");n.sForm.$setPristine()}function c(n){s.displayError(n)}n.pageClass="page-admin-edit-email";t.$broadcast("updatePageLocation","admin");var h=this;h.isLoading=!0;h.email={};h.trust=e.trustAsHtml;h.update=function(n){if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});return}h.email.Body=$("#summernote").summernote("code");o.put("/api/emails/update",h.email,k,c)};h.sendTest=function(){o.put("/api/emails/sendtest",h.email,v,c)};h.askDelete=function(){var n='<div class="modal-body">Are you sure you want to delete this?<\/div>',t;n+='<div class="modal-footer"><button class="btn btn-primary" ng-click="vm.ok()">OK<\/button><button class="btn btn-default" ng-click="vm.cancel()">Cancel<\/button><\/div>';t=f.open({template:n,controller:i,controllerAs:"vm"});t.result.then(function(){a()})};l()}function i(n,t){var i=this;i.ok=function(){t.close()};i.cancel=function(){t.dismiss("cancel")}}n.controller("editEmailCtrl",t);t.$inject=["$scope","$rootScope","$routeParams","$location","$modal","$sce","apiService","notificationService"];i.$inject=["$scope","$modalInstance"]}(angular.module("app")),function(n){"use strict";function t(n,t,i,r,u,f,e){function s(){u.get("/api/account/all",null,h,c)}function h(t){o.users=t.data;o.users=o.users.filter(function(n){return n.Username!=="customer"});o.totalRecords=o.users.length;o.isLoading=!1;o.usersTable=new e(n.tableParams,{counts:[],total:o.users.length,dataset:o.users})}function c(n){f.displayError(n.data.Message);o.isLoading=!1}t.$broadcast("updatePageLocation","admin");n.pageClass="page-admin-users";var o=this;o.usersTable=null;o.users=[];o.isLoading=!0;o.totalRecords=0;o.edit=function(n){r.path("/admin/users/edit/"+n.ID)};s()}n.controller("usersAdminCtrl",t);t.$inject=["$scope","$rootScope","$filter","$location","apiService","notificationService","NgTableParams"]}(angular.module("app")),function(n){"use strict";function t(n,t,r,u,f,e,o,s){function v(){var n="/api/account/"+r.id;e.get(n,null,b,l)}function y(){e.get("/api/account/roles",null,k,l)}function p(){o.remove(h.user,nt,c)}function w(){var n={id:h.user.ID,username:h.user.Username,password:h.user.Password};typeof h.user.Password!="undefined"&&h.user.Password!=""&&o.updatePasswordById(n,g,d);h.roleId!=h.user.RoleId&&(h.user.RoleId=h.roleId,o.updateRole(h.user,a,c));o.update(h.user,a,c);h.user.ID==t.repository.loggedUser.id&&o.saveCredentials(n)}function b(n){typeof n.data!="undefined"?(h.user=n.data,h.roleId=h.user.RoleId,h.showWarning=h.user.ID==t.repository.loggedUser.id):u.path("/admin/users");h.isLoading=!1}function l(n){s.displayError(n.data.Message);h.isLoading=!1}function k(n){h.roles=n.data.roles;h.roles=h.roles.filter(function(n){return n.Name!=="Customer"});h.isLoading=!1}function d(n){s.displayError(n.data.Message)}function g(){s.displaySuccess("Successfully updated password");h.user.Password="";n.sForm.$setPristine()}function a(){s.displaySuccess("Successfully updated user");n.sForm.$setPristine()}function nt(){s.displaySuccess("Successfully deleted user");u.path("/admin/users")}function c(n){s.displayError(n.data.Message)}t.$broadcast("updatePageLocation","admin");n.pageClass="page-admin-edit-user";var h=this;h.isLoading=!0;h.user={};h.roles=[];h.update=function(n){if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});return}w()};h.lockUser=function(){h.user.IsLocked=!0};h.unlockUser=function(){h.user.IsLocked=!1};h.askDelete=function(){var n,r;t.repository.loggedUser.username==h.user.Username?s.displayError("You can't delete your own account"):(n='<div class="modal-body">Are you sure you want to delete this?<\/div>',n+='<div class="modal-footer"><button class="btn btn-primary" ng-click="vm.ok()">OK<\/button><button class="btn btn-default" ng-click="vm.cancel()">Cancel<\/button><\/div>',r=f.open({template:n,controller:i,controllerAs:"vm"}),r.result.then(function(){p()}))};h.showWarning=!1;y();v()}function i(n,t){var i=this;i.ok=function(){t.close()};i.cancel=function(){t.dismiss("cancel")}}n.controller("editUserCtrl",t);t.$inject=["$scope","$rootScope","$routeParams","$location","$modal","apiService","membershipService","notificationService"];i.$inject=["$scope","$modalInstance"]}(angular.module("app")),function(n){"use strict";function t(n,t,i,r,u,f,e,o){function l(){var n="/api/account/"+t.repository.loggedUser.id;f.get(n,null,v,y)}function a(){if(typeof s.user.Password=="undefined"||s.user.Password=="")e.update(s.user,h,c);else{var n={id:t.repository.loggedUser.id,username:s.user.Username,password:s.user.Password};e.updatePassword(n,w,p);e.update(s.user,h,c);e.saveCredentials(n)}}function v(n){typeof n.data!="undefined"?s.user=n.data:r.path("/admin");s.isLoading=!1}function y(n){o.displayError(n.data.Message);s.isLoading=!1}function p(n){o.displayError(n.data.Message)}function w(){o.displaySuccess("Successfully updated password");s.user.Password="";n.sForm.$setPristine()}function h(){o.displaySuccess("Successfully updated user");n.sForm.$setPristine()}function c(n){o.displayError(n.data.Message)}n.pageClass="page-admin-edit-account";t.$broadcast("updatePageLocation","admin");var s=this;s.isLoading=!0;s.user={};s.update=function(n){if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});return}a()};l()}function i(n,t){var i=this;i.ok=function(){t.close()};i.cancel=function(){t.dismiss("cancel")}}n.controller("editAccountCtrl",t);t.$inject=["$scope","$rootScope","$routeParams","$location","$modal","apiService","membershipService","notificationService"];i.$inject=["$scope","$modalInstance"]}(angular.module("app")),function(n){"use strict";function t(n,t,i,r,u,f,e){function s(){u.get("/api/account/roles",null,c,h)}function h(n){e.displayError(n.data.Message);o.isLoading=!1}function c(n){o.roles=n.data.roles;o.roles=o.roles.filter(function(n){return n.Name!=="Customer"});o.isLoading=!1}function l(){f.register(o.user,a,v)}function a(){e.displaySuccess("Successfully added user");r.path("/admin/users")}function v(n){e.displayError(n.data.Message)}t.$broadcast("updatePageLocation","admin");n.pageClass="page-admin-add-user";var o=this;o.isLoading=!0;o.roles=[];o.user={FirstName:"",LastName:"",RoleId:1,Username:"",Email:"",Password:""};o.create=function(n){if(n.$invalid){angular.forEach(n.$error,function(n){angular.forEach(n,function(n){n.$setDirty()})});return}l()};setTimeout(function(){$("form input").val("")},200);s()}n.controller("addUserCtrl",t);t.$inject=["$scope","$rootScope","$routeParams","$location","apiService","membershipService","notificationService"]}(angular.module("app"))