var Microsoft,__extends,WindowsFeedback,Feedback;(function(n){var t;(function(t){"use strict";function e(n){for(var u=null,i,t,r=0;r0){u=t;break}}return u}function p(t){var r=t.querySelectorAll('input[type="radio"][required][name]'),i=!0;return n.Core.ForEach(r,function(n){var r=n.getAttribute("name"),u='input[type="radio"][required][name="'+r+'"]:checked',f=t.querySelector(u)!==null;i=i&&f}),i}function l(t,i){var r,u;return t===window?t.document.documentElement["client"+i]:t.nodeType===9?(r=t.documentElement,u=t.body,Math.max(u["scroll"+i],u["offset"+i],r["scroll"+i],r["offset"+i],r["client"+i])):parseFloat(n.Core.GetComputedStyle(t)[i.toLowerCase()])}function a(n,t,i){var u={},f;for(var r in t)u[r]=n.style[r],n.style[r]=t[r];f=i(n);for(r in t)n.style[r]=u[r];return f}function w(){y(!1)}function v(n){y(!0,n)}function y(t,i){n.Core.ForEach(_d.querySelectorAll('input[type="text"], input[type="search"]'),function(n){n.hasAttribute("data-depends-on")||t&&n===i||(n.disabled=t)})}function i(n){var t=String(n);return t.length===1&&(t="0"+t),t}var f,r,o,s,h,c,u;t.selectedElementClass="hlsrc";t.menuListClass="hlselcxmnlist";t.menuButtonClass="hlselcxmnbt";t.verbatimTxtId="fbpgdgtx";f=_d.documentElement.matches||_d.documentElement.webkitMatchesSelector||_d.documentElement.mozMatchesSelector||_d.documentElement.oMatchesSelector||_d.documentElement.msMatchesSelector;r=document.compatMode==="CSS1Compat";t.spokenQuery=null;n.Core.GenerateString=function(n){for(var i="",r="abcdefghijklmnopqrstuvwxyz0123456789",t=0;t0&&(i+=","),i+=n.Core.Stringify(t[r]);i+="]"}else if(t instanceof Boolean||t instanceof Date||t instanceof Number||t instanceof String)i=t.toString();else{i+="{";for(r in t)t.hasOwnProperty(r)&&(u>0&&(i+=","),i+='"'+r+'":'+n.Core.Stringify(t[r]),u++);i+="}"}return i;case"boolean":case"number":return t;case"string":return'"'+t.replace(/[\\]/g,"\\\\").replace(/[\"]/g,'\\"').replace(/[\/]/g,"\\/").replace(/[\b]/g,"\\b").replace(/[\f]/g,"\\f").replace(/[\n]/g,"\\n").replace(/[\r]/g,"\\r").replace(/[\t]/g,"\\t")+'"';default:return null}};n.Core.FetchLocalStorage=function(){try{if(_w.localStorage){var n="CB47C15FA3044AB884F7E32B9FD32ED2";return _w.localStorage.setItem(n,"1"),_w.localStorage.removeItem(n),_w.localStorage}}catch(t){return undefined}};o=[{name:"page",provide:function(){var n=_ge("sb_form_q");return n&&n.value}},{name:"threshold",provide:function(){return typeof ThresholdUtilities!="undefined"&&ThresholdUtilities.getDecodedQuery&&ThresholdUtilities.getDecodedQuery()}},{name:"cortana",provide:function(){return typeof SearchAppWrapper!="undefined"&&SearchAppWrapper.CortanaApp&&SearchAppWrapper.CortanaApp.searchBox&&SearchAppWrapper.CortanaApp.searchBox.getQueryText&&SearchAppWrapper.CortanaApp.searchBox.getQueryText().queryText}},{name:"spokenquery",provide:function(){return t.spokenQuery}},{name:"urlparam",provide:function(){var n;return typeof URL=="function"&&(n=new URL(t.GetLocation()))&&n.search&&decodeURI(n.search.match(/[?&]q=([^?&#]*)/i)[1])}}];n.Core.GetUserQuery=function(){return e(o)};s=[{name:"locmet",provide:function(){var n="sj_locmet";return typeof _w[n]=="object"&&_w[n].GetCurrentUrl()}},{name:"miniSerp",provide:function(){var t=window.self!==window.top,n;return t?(n=_d.querySelector("base[href]"),n&&n.href):null}},{name:"location",provide:function(){return location.href}}];n.Core.GetLocation=function(){return e(s)};n.Core.GetISODate=function(n){return Date.prototype.toISOString?n.toISOString():n.getUTCFullYear()+"-"+i(n.getUTCMonth()+1)+"-"+i(n.getUTCDate())+"T"+i(n.getUTCHours())+":"+i(n.getUTCMinutes())+":"+i(n.getUTCSeconds())+"."+String((n.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"};n.Core.AddUrlParam=function(n,t,i){var r=n;return t&&t.length>0&&i&&(r=r+(r.indexOf("?")>=0?"&":"?")+t+"="+encodeURIComponent(i)),r};n.Core.IsEmptyObject=function(n){for(var t in n)return!1;return!0};h=/\s+$/;c=/^\s+/;n.Core.Trim=function(n){return n.trim?n.trim():n.replace(c,"").replace(h,"")};n.Core.IndexOf=function(n,t){var i;if(n.indexOf)i=n.indexOf(t);else{for(i=0;i0&&_ge(e),s=f.value;(!o||o.checked)&&(o||!f.getAttribute("data-optional"))&&(f.id===n.Core.verbatimTxtId&&n.CheckboxMenus&&n.CheckboxMenus.IsAtLeastOneItemChecked()||((t.GetTextInputValue(f).length===0||n.Core.Trim(s)==="")&&(Lib.CssClass.add(f,"error"),f.value=f.getAttribute("data-err"),r=!1),r=r&&p(i)))}),r};n.Core.GetTextInputValue=function(n){if(!n)return"";var t=n.value;return(t===n.getAttribute("data-txt")||t===n.getAttribute("data-err"))&&(t=""),t};n.Core.ForEach=function(n,t){for(var r,u,i=0;i=this.maxSendTries?this.OnOnlineSendFailure(n,t,r):(typeof _G!="undefined"&&_G.IG?Log2.LogEvent("ClientInst",{error:"Will need to retry sending the payload because not all of them reached the live bing.com servers"},"Feedback.Error",null,null,_G.IG,null,null):Log2.LogEvent("ClientInst",{error:"_G.IG was not available when we wanted to log that we will resend the payload"},"Feedback.Error",null,null,null,null,null),this.SendAttempt(n,t,++i,r,u)))}.bind(this);f.send(JSON.stringify(n))},n.prototype.OnSendSuccess=function(n,t,i){i===void 0&&(i=undefined);delete n.html;typeof _G!="undefined"&&_G.IG?Log2.LogEvent("ClientInst",JSON.stringify(n),"Feedback.Online",null,null,_G.IG,null,null):Log2.LogEvent("ClientInst",{error:"_G.IG was not available when submitting feedback online"},"Feedback.Error",null,null,null,null,null);typeof i!="undefined"&&i(t)},n.prototype.OnOnlineSendFailure=function(n,t,i){i===void 0&&(i=undefined);delete n.html;typeof _G!="undefined"&&_G.IG?Log2.LogEvent("ClientInst",JSON.stringify(n),"Feedback.Offline",null,null,_G.IG,null,null):Log2.LogEvent("ClientInst",{error:"_G.IG was not available when submitting feedback offline"},"Feedback.Error",null,null,null,null,null);typeof i!="undefined"&&i(t)},n}();_w.WindowsFeedbackProtocol=new n}(WindowsFeedback||(WindowsFeedback={})),function(n){var t;(function(n){"use strict";var t=function(){function n(n){this.base64ImageBlobs=this.GetImageBlobsAsBase64(n)}return n.prototype.Manipulate=function(n){if(n instanceof HTMLImageElement){var t=n;t.src&&this.base64ImageBlobs[t.src]&&(t.src=this.base64ImageBlobs[t.src])}},n.prototype.GetImageBlobsAsBase64=function(n){for(var u=n.querySelectorAll("img[src^='blob:']"),f={},t,i,e,o,r=0;r0&&(Feedback.Core.spokenQuery=f)}})}catch(u){Log2.LogEvent("ClientInst",{source:"GetFeedbackFile",type:"FeedbackFileFetchSingleError",error:"GetFeedbackFile: Could not get feedback file content"},"Feedback.Error",null,null,_G.IG,null,null)}},n.prototype.GetFeedbackFiles=function(){var n=this;try{typeof SearchAppWrapper!="undefined"&&SearchAppWrapper.CortanaApp&&SearchAppWrapper.CortanaApp.getFeedbackFilesAsync&&SearchAppWrapper.CortanaApp.getFeedbackFilesAsync().done(function(t){var i,r;if(typeof t!="undefined"&&t!==null)for(n.feedbackFiles=new Array(t.length),i=0;i0)for(t=0;t0)){for(e=0,o=[],s=0;s0?o.push(i):e++;e>0&&Log2.LogEvent("ClientInst",{source:"OnSubmitForm",type:"FeedbackFileTimeoutError",error:e+" feedback files not returned in time for feedback submit."},"Feedback.Error",null,null,_G.IG,null,null);o.length>0&&(t.feedbackFiles=o)}_w.WindowsFeedbackProtocol&&WindowsFeedbackProtocol.Send(t);this.Hide();typeof _G!="undefined"&&_G.IG?Log2.LogEvent("ClientInst",{target:"Submit"},"Feedback.Click",null,null,_G.IG,null,null):Log2.LogEvent("ClientInst",{type:"ImpressionSubmitError",error:"_G.IG was not available when clicking on Submit button"},"Feedback.Error",null,null,null,null,null)}},n.prototype.OnCloseForm=function(n){n.preventDefault();this.Hide();typeof _G!="undefined"&&_G.IG?Log2.LogEvent("ClientInst",{target:"Cancel"},"Feedback.Click",null,null,_G.IG,null,null):Log2.LogEvent("ClientInst",{type:"ImpressionCloseError",error:"_G.IG was not available when clicking on Cancel button"},"Feedback.Error",null,null,null,null,null)},n.prototype.GetCategoryRadioButtons=function(n){return n.querySelectorAll('input[name="type"]')},n.prototype.DetermineFeedbackType=function(){for(var r=_ge(this.feedbackContainerId),t=this.GetCategoryRadioButtons(r),i=1,n=0,u=t.length;n