You are on page 1of 8

var Microsoft,__extends,WindowsFeedback,Feedback;(function(n){var t;(function(t)

{"use strict";function e(n){for(var u=null,i,t,r=0;r<n.length;r++)


{i=n[r];try{t=i.provide()}catch(f){typeof JS!
="undefined"&&JS.LogError&&JS.LogError("Query provider "+i.name+"
failed","Feedback",f)}if(typeof t=="string"&&t.length>0){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.menu
ButtonClass="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.spokenQ
uery=null;n.Core.GenerateString=function(n){for(var
i="",r="abcdefghijklmnopqrstuvwxyz0123456789",t=0;t<n;+
+t)i+=r.charAt(Math.floor(Math.random()*r.length));return
i};n.Core.GenerateHtmlId=function(t){return"f"+n.Core.GenerateString(t-
1)};n.Core.Stringify=function(t){var i="",u=0,r;switch(typeof t){case"object":if(t
instanceof Array){for(i+="[",r=0;r<t.length;r+
+)r>0&&(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.getDecodedQuer
y()}},{name:"cortana",provide:function(){return typeof SearchAppWrapper!
="undefined"&&SearchAppWrapper.CortanaApp&&SearchAppWrapper.CortanaApp.searchBox&&S
earchAppWrapper.CortanaApp.searchBox.getQueryText&&SearchAppWrapper.CortanaApp.sear
chBox.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.AddUrlP
aram=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;i<n.length;i+
+)if(n[i]===t)break;i=i<n.length?i:-1}return
i};n.Core.EnableValidation=function(t,i){var r=function(t){var r=sj_et(t);r&&(!!
i==!
1&&v(r),n.Core.GetTextInputValue(r).length===0&&(Lib.CssClass.remove(r,"error"),Lib
.CssClass.add(r,"active"),r.value=""))},u=function(n){var
t=sj_et(n),i;t&&(w(),i=_w.feedback&&_w.feedback.config&&_w.feedback.config.dialog&&
_w.feedback.config.dialog.emulatePlaceholderText,t.value.length===0&&i&&(Lib.CssCla
ss.remove(t,"active"),t.value=t.getAttribute("data-txt")))},f=function(n){var
t=sj_et(n);t&&v(t)};n.Core.ForEach(t.querySelectorAll('textarea,
input[type="text"]'),function(n){sj_be(n,"blur",u);sj_be(n,"change",u);i?
(sj_be(n,"focus",f),sj_be(n,"keydown",r),sj_be(n,"tap",r),sj_be(n,"taphold",r),sj_b
e(n,"mouseup",r),sj_be(n,"click",r)):sj_be(n,"focus",r)})};n.Core.ValidateInputs=fu
nction(i){var u=i.querySelectorAll('input[type="text"][data-err], textarea[data-
err]'),r=!0;return n.Core.ForEach(u,function(u){var f=u,e=f.getAttribute("data-
depends-on"),o=typeof e=="string"&&e.length>0&&_ge(e),s=f.value;(!o||
o.checked)&&(o||!f.getAttribute("data-
optional"))&&(f.id===n.Core.verbatimTxtId&&n.CheckboxMenus&&n.CheckboxMenus.IsAtLea
stOneItemChecked()||((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){var
t=n&&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<n.length;i+
+)if(r=n[i],u=t(r),u===!1)break};n.Core.WindowScrollTop=function(){return
_w.pageYOffset||r&&_d.documentElement.scrollTop||
_d.body.scrollTop};n.Core.WindowScrollLeft=function(){return _w.pageXOffset||
r&&_d.documentElement.scrollLeft||_d.body.scrollLeft};n.Core.Width=function(n)
{return l(n,"Width")};n.Core.Height=function(n){return
l(n,"Height")};n.Core.Remove=function(n)
{n&&n.parentNode&&n.parentNode.removeChild&&n.parentNode.removeChild(n)};n.Core.For
EachChildren=function(n,t){for(var
i=n.firstChild;i;i=i.nextSibling)i.nodeType===1&&t(i)};n.Core.Matches=function(n,t)
{return f.call(n,t)};n.Core.Offset=function(t){var i,r,u,f;if(t)return
t.getClientRects().length?(i=t.getBoundingClientRect(),r=i.height!==undefined?
i.height||i.width:i.bottom-i.top||i.right-i.left,!r)?i:
(u=_d.documentElement.clientTop||_d.body.clientTop||
0,f=_d.documentElement.clientLeft||_d.body.clientLeft||0,
{top:i.top+n.Core.WindowScrollTop()-u,left:i.left+n.Core.WindowScrollLeft()-f}):
{top:0,left:0}};u={position:"absolute",visibility:"hidden",display:"block"};n.Core.
GetComputedStyle=function(n){return!n||!n.style?undefined:_w.getComputedStyle?
_w.getComputedStyle(n):n.currentStyle};n.Core.ApplyCss=function(n,t)
{if(n&&n.style&&typeof t=="object")for(var i in
t)n.style[i]=t[i]};n.Core.OuterWidth=function(t){return!t||!t.style?
undefined:n.Core.IsHidden(t)?a(t,u,function(n){return
n.offsetWidth}):t.offsetWidth};n.Core.OuterHeight=function(t){return!t||!t.style?
undefined:n.Core.IsHidden(t)?a(t,u,function(n){return
n.offsetHeight}):t.offsetHeight};n.Core.Show=function(n,t){n&&n.style&&t!
==undefined&&t!==null&&(n.style.display=t)};n.Core.Hide=function(n)
{n&&n.style&&(n.style.display="none")};n.Core.IsHidden=function(t){return!t||!
t.style?
undefined:n.Core.GetComputedStyle(t).display==="none"};n.Core.SetPosition=function(
n,i,r,u){var f=i,e=r;i&&r&&(u&&u.length===2&&(u[0]==="b"&&(f-
=t.OuterHeight(n)),u[1]==="r"&&(e-=t.OuterWidth(n))),t.ApplyCss(n,
{top:f+"px",left:e+"px"}))};n.Core.GetElementByHlid=function(n,t){return
_d.querySelector('[hlid="'+n+'"]'+(t?"."+t:""))||
undefined};n.Core.GetAllElementsByHlid=function(n){return
_d.querySelectorAll('[hlid="'+n+'"]')};n.Core.GetHlid=function(n){return
n&&(n.getAttribute("hlid")||undefined)};n.Core.SetHlid=function(n,t)
{n&&n.setAttribute("hlid",t)};n.Core.GetSelectedElements=function(){return
_d.querySelectorAll("."+n.Core.selectedElementClass)}})(t=n.Core||(n.Core={}))})
(Feedback||(Feedback={})),function(){"use strict";var n=function(){function n()
{this.maxSizeBytes=35e5;this.feedbackUploadUrl="/feedback/submission";this.maxSendT
ries=3;this.requestTimeout=1e4}return n.prototype.Send=function(n,t,i,r){t===void
0&&(t=undefined);i===void 0&&(i=undefined);r===void 0&&(r=undefined);var u=typeof
t=="undefined"?Feedback.Core.GenerateString(32):t;return
this.SendAttempt(n,u,1,i,r)},n.prototype.SendAttempt=function(n,t,i,r,u){var
f=sj_gx(),e=Feedback.Core.AddUrlParam(this.feedbackUploadUrl,"debugid",t);_w.feedba
ck&&_w.feedback.config&&_w.feedback.config.postIgFlightEnabled&&(e=Feedback.Core.Ad
dUrlParam(e,"IG",_G.IG));f.open("POST",e,!
0);f.timeout=this.requestTimeout;f.setRequestHeader("Content-
Type","application/json; charset=UTF-8");f.onreadystatechange=function()
{f.readyState==f.DONE&&(f.status==204||f.status==1223?
this.OnSendSuccess(n,t,r):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,nul
l,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.p
rototype.GetImageBlobsAsBase64=function(n){for(var
u=n.querySelectorAll("img[src^='blob:']"),f={},t,i,e,o,r=0;r<u.length;r+
+)t=u[r],i=document.createElement("canvas"),i.width=t.width,i.height=t.height,e=i.g
etContext("2d"),e.drawImage(t,0,0),o=i.toDataURL(),f[t.src]=o;return f},n}
();n.InlineImagesManipulator=t})(t=n.Search||(n.Search={}))}(Microsoft||
(Microsoft={})),function(n){var t;(function(n){"use strict";var t=function()
{function n(n)
{this.DocumentFragment=document.createDocumentFragment();this.DocumentFragment.appe
ndChild(n.cloneNode(!0))}return
n.prototype.ManipulateElementsBySelector=function(n,t){var
u,i,e,f,r,o;if(t)for(u=this.DocumentFragment.querySelectorAll(n),i=0,e=u.length;i<e
;i++)for(f=u[i],r=0;r<t.length;r++)o=t[r],typeof f!
="undefined"&&o.Manipulate(f)},n.prototype.DeleteElementsBySelector=function(n)
{for(var
t;t=this.DocumentFragment.querySelector(n);)t&&t.parentNode.removeChild(t)},n.proto
type.SerializeToHtml=function(){return
this.DocumentFragment.firstChild.outerHTML},n}();n.DOMCopyManipulator=t})
(t=n.Search||(n.Search={}))}(Microsoft||(Microsoft={})),function(n){"use
strict";var t=function(){function n(n,t){this.fileName=n;this.contentType=t}return
n}();n.FeedbackFile=t}(Feedback||(Feedback={})),function(n){var t;(function(){"use
strict";function u(t,i){var u=t.getAttribute("id"),f;u||
(u="genId"+n.length,t.setAttribute("id",u));f=new
r(u,i,t.getAttribute(i));n.push(f)}function i(n,t,i){i===null?
n.removeAttribute(t):n.setAttribute(t,i)}function t(n,t,r,f){for(var
e,s=_d.querySelectorAll(r),o=0;o<s.length;o++)(e=s[o],f&&e.id&&f[e.id])||
(u(e,n),i(e,n,t))}function f(n){for(var
u=_d.querySelectorAll(n),e=1,f={},t,i,r=0;r<u.length;++r){if(t=u[r],!t.id)
{for(;;)if(i="fbpgdgelem"+e++,!_ge(i))break;t.id=i}f[t.id]=t}return f}function e()
{var i="tabindex",r="-1",n=f("#fbpgdg, #fbpgdg
*");t(i,r,"div",n);t(i,r,"svg",n);t(i,r,"a",n);t(i,r,"li",n);t(i,r,"input",n);t(i,r
,"select",n);t("aria-hidden","true","body :not(script):not(style)",n)}function o()
{for(var r,t=0;t<n.length;t+
+)r=_d.getElementById(n[t].id),r&&i(r,n[t].attributeName,n[t].originalAttributeValu
e);n.length=0}function s(){typeof sj_evt!
="undefined"&&(sj_evt.bind("onFeedbackStarting",function()
{e()}),sj_evt.bind("onFeedbackClosing",function(){o()}))}var n=[],r=function()
{function n(n,t,i)
{this.id=n;this.attributeName=t;this.originalAttributeValue=i}return n}();s()})
(t=n.Accessibility||(n.Accessibility={}))}(Feedback||(Feedback={})),function(n)
{"use strict";var t=function(){function n()
{this.callbacks=[];this.debugValues={}}return
n.prototype.setContextValue=function(n,t){typeof n!="string"||n.length<1||
(this.debugValues[n]=t)},n.prototype.setContextValues=function(n){if(n)for(var t in
n)n.hasOwnProperty(t)&&this.setContextValue(t,n[t])},n.prototype.registerCollection
Callback=function(n){n&&this.callbacks.push(n)},n.prototype.collect=function(n)
{for(var u=this.getStaticValues(),f,i,r,t=0;t<this.callbacks.length;t++)
{f=this.callbacks[t];try{i=f(n)}catch(e)
{SharedLogHelper&&SharedLogHelper.LogError&&SharedLogHelper.LogError("FeedbackLog -
debug collector callback failed",null,e);throw e;}for(r in
i)i.hasOwnProperty(r)&&(u[r]=i[r])}return u},n.prototype.clear=function(){for(var n
in this.debugValues)delete
this.debugValues[n];this.callbacks=[]},n.prototype.getStaticValues=function(){var
t={};for(var n in
this.debugValues)this.debugValues.hasOwnProperty(n)&&(t[n]=this.debugValues[n]);ret
urn t},n}();n.debugCollector=new t}(Feedback||(Feedback={})),function(n){"use
strict";var t=Feedback.FeedbackFile,i=function(){function n()
{this.feedbackContainerId="fbpgdg";this.screenshotChkName="screenshot";this.sendmai
lChkName="sendmail";this.aliasTxtName="alias";this.privacyPolicyUrl="http://go.micr
osoft.com/fwlink/?
LinkId=521839";this.learnMoreLinkUrl="http://go.microsoft.com/fwlink/?
LinkID=618051";this.reportPrivacyPolicyUrl="https://www.microsoft.com/concern/bing"
;this.internalCheckUrl="/feedback/internal";this.internalCheckRequestTimeout=2e3;th
is.dlAlias="sfeed";this.dlLink="mailto:"+this.dlAlias;this.localStorage=Feedback.Co
re.FetchLocalStorage();this.selectedByDefaultCatIdx=0}return
n.prototype.ResetShowForm=function(){},n.prototype.CreateShowForm=function()
{},n.prototype.AddInternalFormElements=function(){},n.prototype.HideForm=function()
{},n.prototype.GetFeedbackFile=function(n,i){var
r=this;try{i.getBase64ContentAsync().done(function(u){var e=new
t(i.fileName,i.contentType),h=/UserSaid='(.*?)'.
Dialog={/g,o,s,f=null;if(e.base64Content=u,r.feedbackFiles[n]=e,i.fileName==="Corta
naTrace.log"&&_w.atob)
{for(s=decodeURIComponent(escape(_w.atob(u)));o=h.exec(s);)f=o[1];typeof
f=="string"&&f.length>0&&(Feedback.Core.spokenQuery=f)}})}catch(u)
{Log2.LogEvent("ClientInst",
{source:"GetFeedbackFile",type:"FeedbackFileFetchSingleError",error:"GetFeedbackFil
e: Could not get feedback file
content"},"Feedback.Error",null,null,_G.IG,null,null)}},n.prototype.GetFeedbackFile
s=function(){var n=this;try{typeof SearchAppWrapper!
="undefined"&&SearchAppWrapper.CortanaApp&&SearchAppWrapper.CortanaApp.getFeedbackF
ilesAsync&&SearchAppWrapper.CortanaApp.getFeedbackFilesAsync().done(function(t){var
i,r;if(typeof t!="undefined"&&t!==null)for(n.feedbackFiles=new
Array(t.length),i=0;i<t.length;i++)r=t[i],n.GetFeedbackFile(i,r)})}catch(t)
{Log2.LogEvent("ClientInst",
{source:"GetFeedbackFiles",type:"FeedbackFileFetchAllError",error:"Could not get
feedback
files"},"Feedback.Error",null,null,_G.IG,null,null)}},n.prototype.DeleteFeedbackFil
es=function(){var n=this,t;if(typeof n.feedbackFiles!
="undefined"&&n.feedbackFiles.length>0)for(t=0;t<n.feedbackFiles.length;t++)delete
n.feedbackFiles[t];n.feedbackFiles=undefined},n.prototype.Show=function(){typeof
_G!="undefined"&&_G.IG?
Log2.LogEvent("ClientInst",null,"FeedbackStarted",null,null,_G.IG,null,null):Log2.L
ogEvent("ClientInst",{type:"ImpressionSubmitError",error:"_G.IG was not available
when showing
form"},"Feedback.Error",null,null,null,null,null);sj_evt.fire("onFeedbackStarting")
;var n=_ge(this.feedbackContainerId);n===null?
this.CreateShowForm():this.ResetShowForm();Feedback.CortanaState.SetForFeedback();_
ge("fbpgdgtp1").focus();sj_evt.fire("ajax.feedback.initialized",Feedback);this.GetF
eedbackFiles()},n.prototype.Hide=function(){var
n=_ge(this.feedbackContainerId);n&&(sj_evt.fire("onFeedbackClosing"),this.HideForm(
));Feedback.CortanaState.Reset();this.DeleteFeedbackFiles()},n.prototype.CheckInter
nal=function(n){var
t=sj_gx(),i=this.internalCheckUrl,r;_w.feedback&&_w.feedback.config&&_w.feedback.co
nfig.postIgFlightEnabled&&(i=Feedback.Core.AddUrlParam(i,"IG",_G.IG));r=this;t.open
("HEAD",i,!
0);t.timeout=this.internalCheckRequestTimeout;t.onreadystatechange=function()
{t.readyState===t.DONE&&t.status===204&&r.AddInternalFormElements(n)}.bind(this);t.
send()},n.prototype.AddLabeledInput=function(n,t,i,r,u,f,e,o,s,h,c){var
v,l,a;return r===void 0&&(r=undefined),u===void 0&&(u=undefined),f===void
0&&(f=undefined),e===void 0&&(e="inputwrapper"),o===void 0&&(o=null),s===void
0&&(s=null),h===void
0&&(h=null),v=sj_ce("div",null,e),l=sj_ce("input",h,o),l.type=t,u===!
0&&(l.checked=!0),typeof r=="string"&&(l.name=r),typeof
f=="string"&&(l.value=f),typeof c=="string"&&l.setAttribute("aria-
label",c),a=sj_ce("label",null,s),a.appendChild(l),a.appendChild(_d.createTextNode(
i)),v.appendChild(a),n.appendChild(v),l},n.prototype.AddLink=function(n,t,i,r){var
u=sj_ce("a",t);return
u.href=i,u.target="_blank",u.innerText=r,n.appendChild(u),u},n.prototype.AddTextAre
a=function(n,t,i,r){r===void 0&&(r=!0);var u=sj_ce("textarea",t);return
u.placeholder=i,u.required=!
0,n.appendChild(u),u},n.prototype.AddText=function(n,t,i,r){var u=sj_ce(t);return
u.innerText=i,typeof r!
="undefined"&&(u.className=r),n.appendChild(u),u},n.prototype.AddButton=function(n,
t,i){var r=sj_ce("input");return
r.type=t,r.value=i,n.appendChild(r),r},n.prototype.OnSubmitForm=function(n){var
f,c,l,a,r,e,o,s,i;if(n.preventDefault(),Feedback.Core.ValidateInputs(_ge(this.feedb
ackContainerId))!==!1){var v=!this.FormElementExists(this.screenshotChkName)||
this.GetFormValue(this.screenshotChkName,"checked"),u=Feedback.debugCollector.colle
ct(v),t={partner:"BingLegacy",feedbackType:"feedback",feedbackPackage:"bing.feedbac
k.qf",url:location.href,width:Math.round(_w.innerWidth),height:Math.round(_w.innerH
eight),source:typeof u.source=="undefined"?"windows":u.source,send_mail:!
0},h=this.GetFormValue(this.sendmailChkName,"checked");h!
==null&&(t.send_mail=h);f=this.GetFormValue(this.aliasTxtName,"value");f&&(!h||
(t.alias=f),this.SetAlias(f));typeof _G!
="undefined"&&(_G.IG&&(t.impression_guid=_G.IG),_G.ST&&(t.timeStamp=Feedback.Core.G
etISODate(_G.ST)),_G.V?t.vertical=_G.V:_G.P&&(t.vertical=_G.P),_G.PN!
==undefined&&(t.canvas=_G.PN));c=Feedback.Core.GetUserQuery();c!
==null&&(t.query=c);for(l in u)t[l]=u[l];if(t.canvas!
==undefined&&(t.vertical=t.canvas),a=this.GetFormValue(Feedback.Core.verbatimTxtId,
"value"),typeof
a=="string"&&(t.text=a),t.type=this.DetermineFeedbackType(),v&&(r=new
Microsoft.Search.DOMCopyManipulator(_d.documentElement),r.DeleteElementsBySelector(
"script"),r.DeleteElementsBySelector("#aRmsDefer"),r.ManipulateElementsBySelector("
img",[new
Microsoft.Search.InlineImagesManipulator(r.DocumentFragment)]),t.html=r.SerializeTo
Html(),this.feedbackFiles!==undefined&&this.feedbackFiles.length>0))
{for(e=0,o=[],s=0;s<this.feedbackFiles.length;s++)i=this.feedbackFiles[s],typeof i!
="undefined"&&i.base64Content&&i.contentType&&i.fileName&&i.base64Content.length>0?
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("Client
Inst",{type:"ImpressionSubmitError",error:"_G.IG was not available when clicking on
Submit
button"},"Feedback.Error",null,null,null,null,null)}},n.prototype.OnCloseForm=funct
ion(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("Client
Inst",{type:"ImpressionCloseError",error:"_G.IG was not available when clicking on
Cancel
button"},"Feedback.Error",null,null,null,null,null)},n.prototype.GetCategoryRadioBu
ttons=function(n){return
n.querySelectorAll('input[name="type"]')},n.prototype.DetermineFeedbackType=functio
n(){for(var
r=_ge(this.feedbackContainerId),t=this.GetCategoryRadioButtons(r),i=1,n=0,u=t.lengt
h;n<u;n++)if(t[n].checked){i=+t[n].value;break}return
i},n.prototype.GetFormValue=function(n,t){var
r=_ge(this.feedbackContainerId),i=r.querySelector('[id="'+n+'"],
[name="'+n+'"]');return i&&(!i.placeholder||i.placeholder!==i[t])?
i[t]:null},n.prototype.FormElementExists=function(n){var
t=_ge(this.feedbackContainerId),i=t.querySelector('input[name="'+n+'"]');return i?!
0:!1},n.prototype.GetLocString=function(n){return
LocStringManager.getLocString({uiCulture:SearchAppWrapper.CortanaApp.uiLanguage,nam
e:"LocStrings",namespace:"Feedback"})[n]},n.prototype.GetAlias=function(){return
this.localStorage?
this.localStorage.getItem(this.aliasTxtName):null},n.prototype.SetAlias=function(n)
{this.localStorage&&this.localStorage.setItem(this.aliasTxtName,n)},n}
();n.WindowsFeedbackFormBase=i;typeof sj_evt!
="undefined"&&(sj_evt.bind("WindowsFeedback.Form.Show",function()
{_w.WindowsFeedbackForm.Show()},1),sj_evt.bind("WindowsFeedback.Form.Hide",function
(){_w.WindowsFeedbackForm.Hide()}));typeof SearchAppWrapper!
="undefined"&&SearchAppWrapper.CortanaApp&&SearchAppWrapper.CortanaApp.addEventList
ener&&SearchAppWrapper.CortanaApp.addEventListener("feedbackformrequested",function
(n){typeof n!="undefined"&&n!==null&&(n.isHandled=!
0);_w.WindowsFeedbackForm.Show()})}(WindowsFeedback||
(WindowsFeedback={}));__extends=this&&this.__extends||function(){var
n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t)
{n.__proto__=t}||function(n,t){for(var i in
t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r()
{this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):
(r.prototype=i.prototype,new r)}}(),function(n){"use strict";var t=function(n)
{function t(){var t=n.call(this)||this;return
t.modalShieldId="feedbackModalShield",t}return
__extends(t,n),t.prototype.CreateShowForm=function(){var
it=sj_ce("div",this.modalShieldId,"modalShield
hlig"),n=sj_ce("div",this.feedbackContainerId,"modal
hlig"),s=sj_ce("div","fbpgdghd","hlig"),d,h,t,c,i,l,a,g,v,f,e,y,o,p,nt,w,r,k,u;n.ap
pendChild(s);s.appendChild(sj_ce("div",null,"padding
hlig"));d=this.AddText(s,"h2",this.GetLocString("WINDOWS_TITLE_TEXT"),"step1
hlig");h=sj_ce("div","fbctgrs");n.appendChild(h);t=sj_ce("div",null,"hlig step1
fbctgcntsdk");t.setAttribute("role","radiogroup");t.setAttribute("aria-
label",this.GetLocString("DIALOG_COMMENT_TYPE_LABEL"));var
rt=this.AddLabeledInputSdk(t,"radio",this.GetLocString("DIALOG_COMMENT_TYPE4"),"typ
e",this.selectedByDefaultCatIdx==0,"1","inline hlig
fbctgctlsdk","hlig","hlig","fbpgdgtp1"),ut=this.AddLabeledInputSdk(t,"radio",this.G
etLocString("DIALOG_COMMENT_TYPE5"),"type",this.selectedByDefaultCatIdx==1,"2","inl
ine hlig
fbctgctlsdk","hlig","hlig","fbpgdgtp2"),ft=this.AddLabeledInputSdk(t,"radio",this.G
etLocString("DIALOG_COMMENT_TYPE6"),"type",this.selectedByDefaultCatIdx==2,"3","inl
ine hlig
fbctgctlsdk","hlig","hlig","fbpgdgtp3");h.appendChild(t);c=sj_ce("div","fbvrbtm","h
lig");n.appendChild(c);i=this.AddTextArea(c,Feedback.Core.verbatimTxtId,this.GetLoc
String("DIALOG_COMMENT_TEXT"));i.setAttribute("maxlength","1200");i.className="step
1 hlig";i.setAttribute("aria-
label",this.GetLocString("DIALOG_COMMENT_LABEL"));i.setAttribute("data-
err",this.GetLocString("DIALOG_COMMENT_ERROR_TEXT"));l=sj_ce("div","fbml");n.append
Child(l);this.CheckInternal(l);a=sj_ce("div","fbpgdgpnl","step1");n.appendChild(a);
g=this.AddLabeledInputSdk(a,"checkbox",this.GetLocString("DIALOG_INCLUDE_SCREENSHOT
"),this.screenshotChkName,!
0,undefined,"hlig","hlig","hlig","fbpgdgsschk");v=sj_ce("div","fbpgdgpnlrp");n.appe
ndChild(v);f=sj_ce("p");v.appendChild(f);e=sj_ce("span");f.appendChild(e);e.innerTe
xt=this.GetLocString("IF_YOU_HAVE_A_LEGAL_OR_PRIVACY_ISSUE_YOU_CAN_REPORT_A_CONCERN
");e.innerHTML+="&nbsp;";this.AddLink(f,"fbpgdgpslk",this.reportPrivacyPolicyUrl,th
is.GetLocString("HERE_LINK_TEXT"));y=sj_ce("div","fbpgdgpnl2","step1");n.appendChil
d(y);o=sj_ce("div");y.appendChild(o);p=sj_ce("p");o.appendChild(p);nt=this.AddLink(
p,"fbpgdgpslk",this.privacyPolicyUrl,this.GetLocString("PRIVACY_STATEMENT_LINK_TEXT
"));w=sj_ce("p");o.appendChild(w);var
et=this.AddLink(w,"fbpgdgplmlk",this.learnMoreLinkUrl,this.GetLocString("LEARN_MORE
_LINK_TEXT")),b=sj_ce("div",null,"container"),tt=sj_ce("div",null,"button step1
hlig");return
b.appendChild(tt),r=this.AddLink(tt,"fbpgdgsbbt","javascript:void(0);",this.GetLocS
tring("DIALOG_SEND_BUTTON_TEXT")),r.className="hlig",r.setAttribute("role","button"
),k=sj_ce("div",null,"button step1
hlig"),b.appendChild(k),u=this.AddLink(k,"fbpgdgcnclbt","javascript:void(0);",this.
GetLocString("DIALOG_CANCEL_BUTTON_TEXT")),u.className="hlig",u.setAttribute("role"
,"button"),n.appendChild(b),sj_be(u,"click",this.OnCloseForm.bind(this)),sj_be(r,"c
lick",this.OnSubmitForm.bind(this)),Feedback.Core.EnableValidation(n,!
1),_d.body.appendChild(it),_d.body.appendChild(n),typeof TestHooksEnabled!
="undefined"&&TestHooksEnabled===!0&&(n.setAttribute("data-
tag","WindowsFeedback.Form"),d.setAttribute("data-
tag","WindowsFeedback.FormTitle"),rt.setAttribute("data-
tag","WindowsFeedback.SuggestRadioButton"),ut.setAttribute("data-
tag","WindowsFeedback.LikeRadioButton"),ft.setAttribute("data-
tag","WindowsFeedback.DislikeRadioButton"),i.setAttribute("data-
tag","WindowsFeedback.VerbatimTextArea"),g.setAttribute("data-
tag","WindowsFeedback.IncludeScreenshotCheckbox"),nt.setAttribute("data-
tag","WindowsFeedback.PrivacyLink"),et.setAttribute("data-
tag","WindowsFeedback.LearnMoreLink"),r.setAttribute("data-
tag","WindowsFeedback.SubmitButton"),u.setAttribute("data-
tag","WindowsFeedback.CloseButton"),n.setAttribute("data-
tag","WindowsFeedback.FeedbackContainer")),n},t.prototype.AddInternalFormElements=f
unction(n){var
s=this.GetAlias(),h="fbpgdgml",c,i,r,f,l,u,o,e,t;Feedback.Core.Remove(_ge("fbpgdgpn
l"));c=sj_ce("div",null,"hlig step1
internal");this.AddText(c,"h3",this.GetLocString("DIALOG_MSFT_INTERNAL"));n.appendC
hild(c);i=sj_ce("p",null,"hlig step1
internal");n.appendChild(i);r=sj_ce("input",h,"hlig");r.type="checkbox";r.name=this
.sendmailChkName;r.checked=!
0;i.appendChild(r);f=sj_ce("label",null,"hlig");f.htmlFor=h;l=this.GetLocString("DI
ALOG_SEND_EMAIL_LABEL").replace("{0}","Bing");f.appendChild(_d.createTextNode(l));i
.appendChild(f);u=sj_ce("span");u.dir="ltr";u.innerHTML+="&nbsp;
(";o=this.AddLink(u,null,this.dlLink,this.dlAlias);o.className="hlig";o.tabIndex=-
1;o.setAttribute("aria-
hidden","true");u.innerHTML+=")";i.appendChild(u);e=sj_ce("label",null,"hlig");e.ht
mlFor="fbpgdgal";e.appendChild(_d.createTextNode(this.GetLocString("DIALOG_ALIAS_LA
BEL")));i.appendChild(e);i.appendChild(sj_ce("br",null,"hlig"));t=sj_ce("input","fb
pgdgal","hlig");t.type="text";t.placeholder=this.GetLocString("DIALOG_ALIAS_TEXT");
t.name=this.aliasTxtName;t.setAttribute("data-
err",this.GetLocString("DIALOG_ALIAS_ERROR_TEXT"));t.setAttribute("data-depends-
on",h);i.appendChild(t);s!=null&&s!
=t.placeholder&&(t.value=s);n.appendChild(i);sj_be(r,"click",function(){r.checked?
t.removeAttribute("disabled"):t.setAttribute("disabled","true");Lib.CssClass.toggle
(e,"disabled");Lib.CssClass.toggle(f,"disabled")});Feedback.Core.EnableValidation(i
,!1)},t.prototype.ResetShowForm=function(){for(var
u,n=_ge(this.feedbackContainerId),f=this.GetCategoryRadioButtons(n),e=n.querySelect
or('input[name="screenshot"]'),o=n.querySelector('input[name="sendmail"]'),t=n.quer
ySelector('input[name="alias"]'),r=this.GetAlias(),i=0,s=f.length;i<s;i+
+)f[i].checked=i==this.selectedByDefaultCatIdx?!0:!
1;u=_ge(Feedback.Core.verbatimTxtId);u.value="";Lib.CssClass.remove(u,"error");e&&(
e.checked=!0);o&&(o.checked=!
0,Lib.CssClass.remove(n.querySelector('label[for="fbpgdgal"]'),"disabled"),Lib.CssC
lass.remove(n.querySelector('label[for="fbpgdgml"]'),"disabled"),t.removeAttribute(
"disabled"));t&&(t.value=r&&r!=t.placeholder?
r:"",Lib.CssClass.remove(t,"error"));_ge(this.modalShieldId).style.display="block";
_ge(this.feedbackContainerId).style.display="block"},t.prototype.HideForm=function(
)
{_ge(this.feedbackContainerId).style.display="none";_ge(this.modalShieldId).style.d
isplay="none"},t.prototype.AddLabeledInputSdk=function(n,t,i,r,u,f,e,o,s,h){var
l,c,a;return r===void 0&&(r=undefined),u===void 0&&(u=undefined),f===void
0&&(f=undefined),e===void 0&&(e="inputwrapper"),o===void 0&&(o=null),s===void
0&&(s=null),h===void
0&&(h=null),l=sj_ce("div",null,e),c=sj_ce("input",h,o),c.type=t,u===!
0&&(c.checked=!0),typeof r=="string"&&(c.name=r),typeof
f=="string"&&(c.value=f),l.appendChild(c),a=sj_ce("label",null,s),a.setAttribute("f
or",h),a.appendChild(_d.createTextNode(i)),l.appendChild(a),n.appendChild(l),c},t}
(n.WindowsFeedbackFormBase);_w.WindowsFeedbackForm=new t}(WindowsFeedback||
(WindowsFeedback={})),function(n){var t;(function(t){"use strict";function u()
{typeof SearchAppWrapper!
="undefined"&&SearchAppWrapper.CortanaApp&&SearchAppWrapper.CortanaApp.setChromeSta
te&&SearchAppWrapper.CortanaApp.setChromeState(7);r=n.Core.GetComputedStyle(_d.docu
mentElement)["overflow-y"];_d.documentElement.style["overflow-y"]="hidden";i=!
0}function f(){i&&(typeof SearchAppWrapper!
="undefined"&&SearchAppWrapper.CortanaApp&&(SearchAppWrapper.CortanaApp.restorePrev
iousChromeState&&SearchAppWrapper.CortanaApp.restorePreviousChromeState(),SearchApp
Wrapper.CortanaApp.closeFeedbackPage&&SearchAppWrapper.CortanaApp.closeFeedbackPage
(),SearchAppWrapper.CortanaApp.searchBox&&SearchAppWrapper.CortanaApp.searchBox.req
uestFocus&&SearchAppWrapper.CortanaApp.searchBox.requestFocus()),_d.documentElement
.style["overflow-y"]=r,i=!1)}var r,i=!1;t.SetForFeedback=u;t.Reset=f})
(t=n.CortanaState||(n.CortanaState={}))}(Feedback||(Feedback={}))

You might also like