Professional Documents
Culture Documents
7
7
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){"use strict";var
t=function(){function t(){var
n=_w.feedback;this.timeout=n&&n.config&&n.config.getFilesTimeout;this.recreateFileP
romisesMap();this.sscfg=n.screenshot;sj_be(_w,"message",this.windowEventListener.bi
nd(this))}return t.isImage=function(n){return
n==="image/png"||n==="image/jpeg"},t.prototype.getFiles=function(n,t,i){var
s=[],e=this.filePromises,h=!!_w.Promise,o=0,u,f,r,c;for(u in
e)if(e.hasOwnProperty(u)&&(n||!t(u)))for(f=e[u],r=0;r<f.length;r++)c=h?
this.waitForFile(f[r],this.timeout).then(function(n)
{if(n&&n.base64Content&&n.contentType&&n.fileName)if(n.base64Content.length===0)i("
Did not populate base64Content before submitting for "+n.fileName);else return
n;else o++;return null},function(){return null}):f[r],s.push(c);return h?new
_w.Promise(function(n){_w.Promise.all(s).then(function(t){o>0&&i(o+" feedback files
not returned in time for feedback submit.");n(t.filter(function(n){return!!
n}))},function(){})}):{then:function(n){n&&n([])}}},t.prototype.collect=function(n)
{var t,i;this.recreateFilePromisesMap();this.filesRequested=!
0;try{t=_w.SearchAppWrapper&&SearchAppWrapper.CortanaApp;t&&t.getFeedbackFilesAsync
?(i=this,t.getFeedbackFilesAsync().then(function(t){if(t)for(var r=0;r<t.length;r+
+)i.collectFile(t[r],n);i.fileDescriptorsReceived=!0},function(t)
{n("GetFeedbackFiles","FeedbackFileFetchAllError","Could not get feedback files:
"+t.message);i.fileDescriptorsReceived=!0})):this.fileDescriptorsReceived=!
0}catch(r){n("GetFeedbackFiles","FeedbackFileFetchAllError","Could not get feedback
files")}},t.prototype.clear=function()
{this.recreateFilePromisesMap();this.deleteScreenshotIframe()},t.prototype.takeScre
enshot=function(){if(this.sscfg&&_w.Promise){this.createScreenshotIframe();var
n=_w.frames[t.ssFrameId];n&&this.waitForIFrameAndFiles(n)}},t.prototype.collectFile
=function(t,i){try{var r=this,u=t.getBase64ContentAsync().then(function(i){if(!
i)return null;var u=new n.FeedbackFile(t.fileName,t.contentType);return
u.base64Content=i,t.fileName==="CortanaTrace.log"&&_w.atob&&r.extractSpokenQuery(i)
,u},function(){return null});this.addPromise(t.contentType,u)}catch(f)
{i("GetFeedbackFile","FeedbackFileFetchSingleError","GetFeedbackFile: Could not get
feedback file content")}},t.prototype.waitForFile=function(n,t){return new
_w.Promise(function(i){sb_st(function(){i(null)},t);n.then(function(n)
{i(n)},function(){i(null)})})},t.prototype.recreateFilePromisesMap=function()
{this.filePromises={};this.fileDescriptorsReceived=!1;this.filesRequested=!
1},t.prototype.waitForIFrameAndFiles=function(n){if((!this.filesRequested||!
this.fileDescriptorsReceived||!
this.isWaitingForContentType(t.isImage))&&n.contentWindow){if(!
n.contentWindow.screenshot||this.filesRequested&&!this.fileDescriptorsReceived){var
i=this;sb_st(function()
{i.waitForIFrameAndFiles(n)},100);return}n.contentWindow.postMessage({name:"feedbac
k",event:"screenshotRequested"},_w.location.origin)}},t.prototype.windowEventListen
er=function(t){var
i,r;t.origin===_w.location.origin&&t.data&&t.data.name==="feedback"&&(i=t.data,i.ev
ent==="screenshotError"?
n.le(i.message,i.error):i.event==="screenshotReady"&&i.file&&(this.addPromise(i.fil
e.contentType,_w.Promise.resolve(i.file)),this.sscfg.show&&(r=sj_ce("img","fdbkimg"
),_w.top.document.body.appendChild(r),r.src="data:image/
jpeg;base64,"+i.file.base64Content,r.style.position="fixed",r.style.top="0",r.style
.left="0",r.style["z-index"]="1000009",sj_be(r,"mousedown",function()
{r.style.opacity="0.1"}),sj_be(r,"mouseup",function()
{r.style.opacity="1"}))))},t.prototype.addPromise=function(n,t)
{this.filePromises[n]=this.filePromises[n]||
[];this.filePromises[n].push(t)},t.prototype.isWaitingForContentType=function(n)
{var t=this.filePromises;for(var i in t)if(t.hasOwnProperty(i)&&n(i))return!
0;return!1},t.prototype.extractSpokenQuery=function(t){for(var
u=decodeURIComponent(escape(_w.atob(t))),f=/UserSaid='(.*?)'.
Dialog={/g,r,i=null;r=f.exec(u);)i=r[1];typeof
i=="string"&&i.length>0&&(n.Core.spokenQuery=i)},t.prototype.createScreenshotIframe
=function(){var u=document.createElement("script"),r,i,n;u.innerHTML="{ var
feedback = { screenshot: { backgroundColor: "+
(this.sscfg.backgroundColor?'"'+this.sscfg.backgroundColor+'"':null)+", log:
"+this.sscfg.log+", proxy: "+(this.sscfg.proxy?'"'+this.sscfg.proxy+'"':null)
+' } }; window["feedback"] =
feedback; }';r=document.createElement("script");r.src=this.sscfg.resourceUrl;i=docu
ment.createElement("iframe");i.id=t.ssFrameId;i.className="hlig";document.body.appe
ndChild(i);n=i.contentWindow.document;n.open();n.write("<body>");n.write(u.outerHTM
L);n.write(r.outerHTML);n.write("<\/
body>");n.close()},t.prototype.deleteScreenshotIframe=function(){var
n=_w.frames[t.ssFrameId];n&&n.parentElement.removeChild(n)},t.ssFrameId="feedback-
screenshot",t}();n.FeedbackFiles=t;n.files=new 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 t()
{this.callbacks=[];this.debugValues={}}return
t.prototype.setContextValue=function(n,t){typeof n!="string"||n.length<1||
(this.debugValues[n]=t)},t.prototype.setContextValues=function(n){if(n)for(var t in
n)n.hasOwnProperty(t)&&this.setContextValue(t,n[t])},t.prototype.registerCollection
Callback=function(n){n&&this.callbacks.push(n)},t.prototype.collect=function(t)
{for(var f=this.getStaticValues(),e,r,u,i=0;i<this.callbacks.length;i++)
{e=this.callbacks[i];try{r=e(t)}catch(o){n.leh("debug collector
callback","c",o);throw o;}for(u in r)r.hasOwnProperty(u)&&(f[u]=r[u])}return
f},t.prototype.clear=function(){for(var n in this.debugValues)delete
this.debugValues[n];this.callbacks=[]},t.prototype.getStaticValues=function(){var
t={};for(var n in
this.debugValues)this.debugValues.hasOwnProperty(n)&&(t[n]=this.debugValues[n]);ret
urn t},t}();n.debugCollector=new t}(Feedback||(Feedback={})),function(n){"use
strict";var t=function(){function n(){var
n=_w.feedback;this.feedbackContainerId="fbpgdg";this.screenshotChkName="screenshotA
llowed";this.sendmailChkName="sendmail";this.aliasTxtName="alias";this.privacyPolic
yUrl="http://go.microsoft.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;this.dlAlias="sfeed";this.dlLink="ma
ilto:"+this.dlAlias;this.localStorage=Feedback.Core.FetchLocalStorage();this.select
edByDefaultCatIdx=0;this.fbcfg=n.config;this.sscfg=n.screenshot}return
n.prototype.ResetShowForm=function(){},n.prototype.CreateShowForm=function()
{},n.prototype.AddInternalFormElements=function(){},n.prototype.HideForm=function()
{},n.prototype.RemoveForm=function(){},n.LogError=function(n,t,i)
{Log2.LogEvent("ClientInst",
{source:n,type:t,error:i},"Feedback.Error",null,null,_G.IG,null,null)},n.prototype.
Show=function(t,i){var e,h;if(t===void 0&&(t=null),i===void 0&&(i=!1),e=!!
this.fbcfg.capturePage,SearchAppWrapper!=null&&SearchAppWrapper.CortanaApp!
=null&&SearchAppWrapper.CortanaApp.themeColors&&SearchAppWrapper.CortanaApp.themeCo
lors.accent!=this.lastAccentColor)
{this.lastAccentColor=SearchAppWrapper.CortanaApp.themeColors.accent;var o=!
1,s="feedback-accent-style",r=_ge(s);r||
(r=_d.createElement("style"),r.setAttribute("id",s),r.type="text/css",o=!0);var
c=SearchAppWrapper.CortanaApp.themeColors,u="",f="#"+c.accentDark1.substr(3);u="#fb
pgdg a { color: "+f+"}";u+="#fbpgdg :first-child.button a, #fbpgdg :first-
child.button input {background-color: "+f+"; border-color:
"+f+"}";r.innerHTML=u;o&&_d.head.appendChild(r)}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",
i);h=_ge(this.feedbackContainerId);h===null?
this.CreateShowForm(t):this.ResetShowForm();Feedback.CortanaState.SetForFeedback();
_ge("fbpgdgtp1").focus();sj_evt.fire("ajax.feedback.initialized",Feedback);Feedback
.files.collect(n.LogError);e&&this.sscfg&&Feedback.files.takeScreenshot()},n.protot
ype.Hide=function(){var
n=_ge(this.feedbackContainerId);n&&(sj_evt.fire("onFeedbackClosing"),this.HideForm(
));this.FeedbackFormCleanup()},n.prototype.Remove=function(){var
n=_ge(this.feedbackContainerId);n&&(sj_evt.fire("onFeedbackClosing"),this.RemoveFor
m());this.FeedbackFormCleanup()},n.prototype.FeedbackFormCleanup=function(){var
n=_ge("fbpgdgsbbt");n&&Lib.CssClass.remove(n.parentElement,"inactive");Feedback.Cor
tanaState.Reset();Feedback.files.clear()},n.prototype.CheckInternal=function(n){var
t=sj_gx(),i=this.internalCheckUrl,r;this.fbcfg.postIgFlightEnabled&&(i=Feedback.Cor
e.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(t){var
f,e,h,c,l,a,p,w;if(t.preventDefault(),Feedback.Core.ValidateInputs(_ge(this.feedbac
kContainerId))!==!1)
{Lib.CssClass.add(_ge("fbpgdgsbbt").parentElement,"inactive");var b=!!
this.fbcfg.capturePage,o=this.GetFormValue(this.screenshotChkName,"checked"),s=b&&(
!this.FormElementExists(this.screenshotChkName)||
o),u=Feedback.debugCollector.collect(s),i={partner:"BingLegacy",feedbackType:"feedb
ack",feedbackPackage:"bing.feedback.qf",url:location.href,width:Math.round(_w.inner
Width),height:Math.round(_w.innerHeight),source:typeof
u.source=="undefined"?"windows":u.source,send_mail:!0};o!
==null&&(i.screenshotAllowed=o);f=this.GetFormValue(this.sendmailChkName,"checked")
;f!==null&&(i.send_mail=f);e=this.GetFormValue(this.aliasTxtName,"value");e&&(!f||
(i.alias=e),this.SetAlias(e));typeof _G!
="undefined"&&(_G.IG&&(i.impression_guid=_G.IG),_G.EventID&&(i.traceId=_G.EventID),
_G.ST&&(i.timeStamp=Feedback.Core.GetISODate(_G.ST)),_G.V?
i.vertical=_G.V:_G.P&&(i.vertical=_G.P),_G.PN!==undefined&&(i.canvas=_G.PN));var
v=window.frames.miniIframeSerp,y=v&&v.contentWindow,r=y&&y._G;r&&(r.IG||
r.EventID)&&(h=i.structured_data=i.structured_data||
{},r.IG&&(h.impression_guid_miniSerp=r.IG),r.EventID&&(h.traceId_miniSerp=r.EventID
));c=Feedback.Core.GetUserQuery();c!==null&&(i.query=c);for(l in
u)i[l]=u[l];i.canvas!
==undefined&&(i.vertical=i.canvas);a=this.GetFormValue(Feedback.Core.verbatimTxtId,
"value");typeof
a=="string"&&(i.text=a);i.type=this.DetermineFeedbackType();p=function(t)
{n.LogError("OnSubmitForm","FeedbackFileTimeoutError",t)};w=this;Feedback.files.get
Files(s,function(){return!0},p).then(function(n)
{w.ContinueSubmit(i,s,n)},function(t)
{n.LogError("OnSubmitForm","FeedbackFileGetError",t.toString())})}},n.prototype.Con
tinueSubmit=function(n,t,i){if(t){var r=new
Microsoft.Search.DOMCopyManipulator(_d.documentElement);r.DeleteElementsBySelector(
"script");r.DeleteElementsBySelector("#aRmsDefer");r.ManipulateElementsBySelector("
img",[new
Microsoft.Search.InlineImagesManipulator(r.DocumentFragment)]);n.html=r.SerializeTo
Html()}i.length>0&&(n.feedbackFiles=i);_w.WindowsFeedbackProtocol&&WindowsFeedbackP
rotocol.Send(n);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=functi
on(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=t;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(null,!0)})}(WindowsFeedback||
(WindowsFeedback={}));__extends=this&&this.__extends||function(){var
n=function(t,i){return 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])},n(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(n){var
ut=sj_ce("div",this.modalShieldId,"modalShield
hlig"),r=sj_ce("div",this.feedbackContainerId,"modal
hlig"),t=sj_ce("div",null,null),s=sj_ce("div","fbpgdghd","hlig"),g,h,i,c,u,l,nt,a,v
,y,p,o,w,tt,b,f,d,e,rt;t.appendChild(s);s.appendChild(sj_ce("div",null,"padding
hlig"));g=this.AddText(s,"h2",this.GetLocString("WINDOWS_TITLE_TEXT"),"step1
hlig");h=sj_ce("div","fbctgrs");t.appendChild(h);i=sj_ce("div",null,"hlig step1
fbctgcntsdk");i.setAttribute("role","radiogroup");i.setAttribute("aria-
label",this.GetLocString("DIALOG_COMMENT_TYPE_LABEL"));var
ft=this.AddLabeledInputSdk(i,"radio",this.GetLocString("DIALOG_COMMENT_TYPE4"),"typ
e",this.selectedByDefaultCatIdx==0,"1","inline hlig
fbctgctlsdk","hlig","hlig","fbpgdgtp1"),et=this.AddLabeledInputSdk(i,"radio",this.G
etLocString("DIALOG_COMMENT_TYPE5"),"type",this.selectedByDefaultCatIdx==1,"2","inl
ine hlig
fbctgctlsdk","hlig","hlig","fbpgdgtp2"),ot=this.AddLabeledInputSdk(i,"radio",this.G
etLocString("DIALOG_COMMENT_TYPE6"),"type",this.selectedByDefaultCatIdx==2,"3","inl
ine hlig
fbctgctlsdk","hlig","hlig","fbpgdgtp3");h.appendChild(i);c=sj_ce("div","fbvrbtm","h
lig");t.appendChild(c);u=this.AddTextArea(c,Feedback.Core.verbatimTxtId,this.GetLoc
String("DIALOG_COMMENT_TEXT"));u.setAttribute("maxlength","1200");u.className="step
1 hlig";u.setAttribute("aria-
label",this.GetLocString("DIALOG_COMMENT_LABEL"));u.setAttribute("data-
err",this.GetLocString("DIALOG_COMMENT_ERROR_TEXT"));l=sj_ce("div","fbpgdgpnl","ste
p1");t.appendChild(l);nt=this.AddLabeledInputSdk(l,"checkbox",this.GetLocString("DI
ALOG_INCLUDE_SCREENSHOT"),this.screenshotChkName,!0,undefined,"hlig fb-t-small fb-
mrg-
med","hlig","hlig","fbpgdgsschk");a=sj_ce("div","fbml");t.appendChild(a);this.Check
Internal(a);v=sj_ce("div","fbpgdgpnlrp");t.appendChild(v);y=sj_ce("p");v.appendChil
d(y);this.AddLink(y,"fbpgdgpslk",this.reportPrivacyPolicyUrl,this.GetLocString("REP
ORT_LEGAL_OR_PRIVACY_CONCERN"));p=sj_ce("div","fbpgdgpnl2","step1");t.appendChild(p
);o=sj_ce("div");p.appendChild(o);w=sj_ce("p");o.appendChild(w);tt=this.AddLink(w,"
fbpgdgpslk",this.privacyPolicyUrl,this.GetLocString("PRIVACY_STATEMENT_LINK_TEXT"))
;b=sj_ce("p");o.appendChild(b);var
st=this.AddLink(b,"fbpgdgplmlk",this.learnMoreLinkUrl,this.GetLocString("LEARN_MORE
_LINK_TEXT")),k=sj_ce("div",null,"container"),it=sj_ce("div",null,"button step1
hlig");return
k.appendChild(it),f=sj_ce("input","fbpgdgsbbt","hlig"),f.type="submit",f.value=this
.GetLocString("DIALOG_SEND_BUTTON_TEXT"),it.appendChild(f),d=sj_ce("div",null,"butt
on step1
hlig"),k.appendChild(d),e=sj_ce("input","fbpgdgcnclbt","hlig"),e.type="button",e.va
lue=this.GetLocString("DIALOG_CANCEL_BUTTON_TEXT"),d.appendChild(e),t.appendChild(k
),sj_be(e,"click",this.OnCloseForm.bind(this)),sj_be(f,"click",this.OnSubmitForm.bi
nd(this)),r.appendChild(t),Feedback.Core.EnableValidation(r,!
1),Feedback.Core.LoopFocus(r),_d.body.appendChild(ut),rt=_ge(n)||
_d.body,rt.appendChild(r),typeof TestHooksEnabled!
="undefined"&&TestHooksEnabled===!0&&(r.setAttribute("data-
tag","WindowsFeedback.Form"),g.setAttribute("data-
tag","WindowsFeedback.FormTitle"),ft.setAttribute("data-
tag","WindowsFeedback.SuggestRadioButton"),et.setAttribute("data-
tag","WindowsFeedback.LikeRadioButton"),ot.setAttribute("data-
tag","WindowsFeedback.DislikeRadioButton"),u.setAttribute("data-
tag","WindowsFeedback.VerbatimTextArea"),nt.setAttribute("data-
tag","WindowsFeedback.IncludeScreenshotCheckbox"),tt.setAttribute("data-
tag","WindowsFeedback.PrivacyLink"),st.setAttribute("data-
tag","WindowsFeedback.LearnMoreLink"),f.setAttribute("data-
tag","WindowsFeedback.SubmitButton"),e.setAttribute("data-
tag","WindowsFeedback.CloseButton")),r},t.prototype.AddInternalFormElements=functio
n(n){var s=this.GetAlias(),h="fbpgdgml",u=sj_ce("div",null,"hlig step1 internal fb-
t-
small"),i,r,e,c,f,l,o,t;this.AddText(u,"h3",this.GetLocString("DIALOG_MSFT_INTERNAL
"));n.appendChild(u);i=sj_ce("div",null,"hlig fb-mrg-
med");r=sj_ce("input",h,"hlig");r.type="checkbox";r.name=this.sendmailChkName;r.che
cked=!
0;i.appendChild(r);e=sj_ce("label",null,"hlig");e.htmlFor=h;c=this.GetLocString("DI
ALOG_SEND_EMAIL_LABEL").replace("{0}","Bing");e.appendChild(_d.createTextNode(c));i
.appendChild(e);f=sj_ce("span");f.dir="ltr";f.innerHTML+="
(";l=this.AddLink(f,null,this.dlLink,this.dlAlias);l.className="hlig";f.innerHTML+=
")";i.appendChild(f);o=sj_ce("label",null,"hlig");o.htmlFor="fbpgdgal";o.appendChil
d(_d.createTextNode(this.GetLocString("DIALOG_ALIAS_LABEL")));i.appendChild(o);i.ap
pendChild(sj_ce("br",null,"hlig"));u.appendChild(i);t=sj_ce("input","fbpgdgal","hli
g");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);t.required=!0;u.appendChild(t);s!=null&&s!=t.placeholder&&s!
=t.getAttribute("data-
err")&&(t.value=s);n.appendChild(u);sj_be(r,"click",function(){r.checked?
t.removeAttribute("disabled"):
(t.setAttribute("disabled","true"),Lib.CssClass.remove(t,"error"),t.value==t.getAtt
ribute("data-
err")&&(t.value=""));Lib.CssClass.toggle(o,"disabled");Lib.CssClass.toggle(e,"disab
led")});Feedback.Core.EnableValidation(u,!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.RemoveForm=function()
{Feedback.Core.Remove(_ge(this.feedbackContainerId));Feedback.Core.Remove(_ge(this.
modalShieldId))},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(){if(i){if(typeof SearchAppWrapper!
="undefined"&&SearchAppWrapper.CortanaApp)
{SearchAppWrapper.CortanaApp.restorePreviousChromeState&&SearchAppWrapper.CortanaAp
p.restorePreviousChromeState();SearchAppWrapper.CortanaApp.closeFeedbackPage&&Searc
hAppWrapper.CortanaApp.closeFeedbackPage();var
n=_w.feedback&&_w.feedback.config&&_w.feedback.config.focusCortanaSearchBoxOnFeedba
ckClosed;n&&SearchAppWrapper.CortanaApp.searchBox&&SearchAppWrapper.CortanaApp.sear
chBox.requestFocus&&SearchAppWrapper.CortanaApp.searchBox.requestFocus()}_d.documen
tElement.style["overflow-y"]=r;i=!1}}var r,i=!1;t.SetForFeedback=u;t.Reset=f})
(t=n.CortanaState||(n.CortanaState={}))}(Feedback||(Feedback={}))