jQuery.template("Tmpl-gadgetbin-timeseries",function(n,$item){var $=n,__=[],t=$item.data;with(t)__.push(""),typeof grouped!="undefined"&&grouped!=null&&$.each(typeof grouped=="function"?grouped.call($item):grouped,function(n,group){with(this)__.push('    <div class="favorite dataset resource" data-resource-id="'),typeof group.datasetId!="undefined"&&group.datasetId!=null&&__.push($.encode(typeof group.datasetId=="function"?group.datasetId.call($item):group.datasetId)),__.push('">     <em class="check"><\/em><!--    --><div>    <h3>     <a class="external-link data-resource-url" href="'),typeof group.dataset.resourceUrl!="undefined"&&group.dataset.resourceUrl!=null&&__.push($.encode(typeof group.dataset.resourceUrl=="function"?group.dataset.resourceUrl.call($item):group.dataset.resourceUrl)),__.push('" target="_blank">'),typeof group.dataset.title!="undefined"&&group.dataset.title!=null&&__.push($.encode(typeof group.dataset.title=="function"?group.dataset.title.call($item):group.dataset.title)),__.push("<\/a>    <\/h3>      <span>"),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/gadgetbin-timeseries.htm","Published:"))),__.push(" "),typeof group.dataset.publicationDate!="undefined"&&group.dataset.publicationDate!=null&&__.push($.encode(typeof group.dataset.publicationDate=="function"?group.dataset.publicationDate.call($item):group.dataset.publicationDate)),__.push("<\/span><!--    --><span>"),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/gadgetbin-timeseries.htm","Accessed on:"))),__.push(" "),typeof group.dataset.accessedOn!="undefined"&&group.dataset.accessedOn!=null&&__.push($.encode(typeof group.dataset.accessedOn=="function"?group.dataset.accessedOn.call($item):group.dataset.accessedOn)),__.push('<\/span><!--    --><span class="uploaded-by">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/gadgetbin-timeseries.htm","Uploaded by:"))),__.push(" <span>"),typeof group.dataset.owner!="undefined"&&group.dataset.owner!=null&&__.push($.encode(typeof group.dataset.owner=="function"?group.dataset.owner.call($item):group.dataset.owner)),__.push('<\/span><\/span><!--    --><span class="source">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/gadgetbin-timeseries.htm","Source:"))),__.push(' <a class="external-link metadata-value-source" href="'),typeof group.dataset.sourceUrl!="undefined"&&group.dataset.sourceUrl!=null&&__.push($.encode(typeof group.dataset.sourceUrl=="function"?group.dataset.sourceUrl.call($item):group.dataset.sourceUrl)),__.push('" target="_blank">'),typeof(group.dataset.source||group.dataset.sourceId)!="undefined"&&(group.dataset.source||group.dataset.sourceId)!=null&&__.push($.encode(typeof(group.dataset.source||group.dataset.sourceId)=="function"?(group.dataset.source||group.dataset.sourceId).call($item):group.dataset.source||group.dataset.sourceId)),__.push("<\/a><\/span>   <\/div>   "),typeof(group.gadgets&&group.gadgets.length)!="undefined"&&(group.gadgets&&group.gadgets.length)!=null&&(typeof(group.gadgets&&group.gadgets.length)=="function"?(group.gadgets&&group.gadgets.length).call($item):group.gadgets&&group.gadgets.length)&&(__.push('   <table class="timeseries">    <thead>     <tr>      <th width="0"><\/th>      <th width="70%">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/gadgetbin-timeseries.htm","Series"))),__.push('<\/th>      <th width="30%">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/gadgetbin-timeseries.htm","Range"))),__.push("<\/th>      "),typeof unpin!="undefined"&&unpin!=null&&(typeof unpin=="function"?unpin.call($item):unpin)&&__.push("      <th><\/th>      "),__.push("     <\/tr>    <\/thead>    <tbody>     "),typeof group.gadgets!="undefined"&&group.gadgets!=null&&$.each(typeof group.gadgets=="function"?group.gadgets.call($item):group.gadgets,function(n,gadget){with(this)__.push('     <tr class="favorite gadget" data-id="'),typeof gadget.gadgetId!="undefined"&&gadget.gadgetId!=null&&__.push($.encode(typeof gadget.gadgetId=="function"?gadget.gadgetId.call($item):gadget.gadgetId)),__.push('" data-page-id="'),typeof gadget.pageId!="undefined"&&gadget.pageId!=null&&__.push($.encode(typeof gadget.pageId=="function"?gadget.pageId.call($item):gadget.pageId)),__.push('" data-parent-id="'),typeof gadget.parentGadgetId!="undefined"&&gadget.parentGadgetId!=null&&__.push($.encode(typeof gadget.parentGadgetId=="function"?gadget.parentGadgetId.call($item):gadget.parentGadgetId)),__.push('">      <td><span class="check"><\/span><\/td>      <td>       <a class="external-link result-url" href="'),typeof gadget.timeseries.dsUrl!="undefined"&&gadget.timeseries.dsUrl!=null&&__.push($.encode(typeof gadget.timeseries.dsUrl=="function"?gadget.timeseries.dsUrl.call($item):gadget.timeseries.dsUrl)),__.push('" target="_blank">        '),typeof gadget.timeseries.title!="undefined"&&gadget.timeseries.title!=null&&__.push($.encode(typeof gadget.timeseries.title=="function"?gadget.timeseries.title.call($item):gadget.timeseries.title)),__.push('       <\/a>       <div class="gadget-wrapper">        <div class="gadget-container"><\/div>       <\/div>      <\/td>      <td>       '),typeof gadget.timeseries.startDate!="undefined"&&gadget.timeseries.startDate!=null&&(typeof gadget.timeseries.startDate=="function"?gadget.timeseries.startDate.call($item):gadget.timeseries.startDate)&&(__.push(""),typeof gadget.timeseries.startDate!="undefined"&&gadget.timeseries.startDate!=null&&__.push($.encode(typeof gadget.timeseries.startDate=="function"?gadget.timeseries.startDate.call($item):gadget.timeseries.startDate)),__.push(" - "),typeof gadget.timeseries.endDate!="undefined"&&gadget.timeseries.endDate!=null&&__.push($.encode(typeof gadget.timeseries.endDate=="function"?gadget.timeseries.endDate.call($item):gadget.timeseries.endDate)),__.push("")),__.push("        <\/td>     <\/tr>     ")}),__.push("    <\/tbody>   <\/table>   ")),__.push("  <\/div>  ")}),__.push("");return __});jQuery.template("Tmpl-gadgetbin-visualizations",function(n,$item){var $=n,__=[],t=$item.data;with(t)__.push(""),typeof items!="undefined"&&items!=null&&$.each(typeof items=="function"?items.call($item):items,function(n,item){with(this)__.push("  "),typeof(item.detailsParsed&&(item.detailsType==="Gadget"||item.detailsType==="GadgetWithTimeseries"))!="undefined"&&(item.detailsParsed&&(item.detailsType==="Gadget"||item.detailsType==="GadgetWithTimeseries"))!=null&&(typeof(item.detailsParsed&&(item.detailsType==="Gadget"||item.detailsType==="GadgetWithTimeseries"))=="function"?(item.detailsParsed&&(item.detailsType==="Gadget"||item.detailsType==="GadgetWithTimeseries")).call($item):item.detailsParsed&&(item.detailsType==="Gadget"||item.detailsType==="GadgetWithTimeseries"))?(__.push("   "),typeof item.detailsParsed!="undefined"&&item.detailsParsed!=null&&(__=__.concat($item.nest("Tmpl-gadgetbin-gadget",item.detailsParsed,null))),__.push("  ")):!0&&(__.push("   "),typeof(item.type==="Page"&&!item.details)!="undefined"&&(item.type==="Page"&&!item.details)!=null&&(typeof(item.type==="Page"&&!item.details)=="function"?(item.type==="Page"&&!item.details).call($item):item.type==="Page"&&!item.details)&&(__.push("    "),typeof item!="undefined"&&item!=null&&(__=__.concat($item.nest("Tmpl-gadgetbin-resource",item,null))),__.push("   ")),__.push("  ")),__.push("  ")}),__.push("");return __});jQuery.template("Tmpl-gadgetbin-empty-tips",function(n,t){var $=n,__=[],i=t.data;with(i)__.push('<div class="empty-tips">   <h3>'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/gadgetbin-empty-tips.htm","You have no bookmarks"))),__.push('<\/h3>   <div class="tip"><\/div>  <\/div>');return __});jQuery.template("Tmpl-gadgetbin-resource",function(n,$item){var $=n,__=[],$data=$item.data;with($data)__.push('<div class="favorite resource" data-resource-id="'),typeof resourceId!="undefined"&&resourceId!=null&&__.push($.encode(typeof resourceId=="function"?resourceId.call($item):resourceId)),__.push('">  <span class="check"><\/span>  <div class="gadget-container">   '),!0&&{resource:$data,displayKnoemaAuthor:!1}!=null&&(__=__.concat($item.nest("Tmpl-resource-wide",{resource:$data,displayKnoemaAuthor:!1},null))),__.push("  <\/div> <\/div>");return __});jQuery.template("Tmpl-resource-wide",function(n,$item){var $=n,__=[],t=$item.data;with(t)__.push('<div class="resource-wide '),typeof style!="undefined"&&style!=null&&__.push($.encode(typeof style=="function"?style.call($item):style)),__.push('">  <div class="left-block thumbnail-block ">'),!0&&(__=__.concat($item.nest("Tmpl-search-view-thumbnail",null))),__.push('<\/div>   <div class="right-block">   <div class="details">     <span class="add-to-gadgetbin" title="'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/resource-wide.htm","Bookmark"))),__.push('"><\/span>    <div class="res-title">     <a class="'),typeof isLoading!="undefined"&&isLoading!=null&&(typeof isLoading=="function"?isLoading.call($item):isLoading)&&__.push("loading-placeholder"),__.push(" "),typeof resource.formattedTitle!="undefined"&&resource.formattedTitle!=null&&(typeof resource.formattedTitle=="function"?resource.formattedTitle.call($item):resource.formattedTitle)&&__.push("formatted-title "),__.push('result-url"        href="'),typeof resource.resourceUrl!="undefined"&&resource.resourceUrl!=null&&__.push($.encode(typeof resource.resourceUrl=="function"?resource.resourceUrl.call($item):resource.resourceUrl)),__.push('" target="_blank" data-id="'),typeof resource.id!="undefined"&&resource.id!=null&&__.push($.encode(typeof resource.id=="function"?resource.id.call($item):resource.id)),__.push('" data-rank="'),typeof rank!="undefined"&&rank!=null&&__.push($.encode(typeof rank=="function"?rank.call($item):rank)),__.push('"         '),typeof modelFlavor!="undefined"&&modelFlavor!=null&&(typeof modelFlavor=="function"?modelFlavor.call($item):modelFlavor)&&(__.push(' data-model="'),typeof modelFlavor!="undefined"&&modelFlavor!=null&&__.push($.encode(typeof modelFlavor=="function"?modelFlavor.call($item):modelFlavor)),__.push('"')),__.push(" "),typeof semantic!="undefined"&&semantic!=null&&(typeof semantic=="function"?semantic.call($item):semantic)&&__.push("data-semantic='true'"),__.push(">      "),typeof resource.formattedTitle!="undefined"&&resource.formattedTitle!=null&&(typeof resource.formattedTitle=="function"?resource.formattedTitle.call($item):resource.formattedTitle)?(__.push(""),typeof resource.formattedTitle!="undefined"&&resource.formattedTitle!=null&&__.push(typeof resource.formattedTitle=="function"?resource.formattedTitle.call($item):resource.formattedTitle),__.push("")):!0&&(__.push(""),typeof resource.title!="undefined"&&resource.title!=null&&__.push($.encode(typeof resource.title=="function"?resource.title.call($item):resource.title)),__.push("")),__.push('     <\/a>    <\/div>     <div class="description '),typeof isLoading!="undefined"&&isLoading!=null&&(typeof isLoading=="function"?isLoading.call($item):isLoading)&&__.push("preloading"),__.push('">     <span class="'),typeof isLoading!="undefined"&&isLoading!=null&&(typeof isLoading=="function"?isLoading.call($item):isLoading)&&__.push("loading-placeholder"),__.push('">      '),typeof resource.description!="undefined"&&resource.description!=null&&(typeof resource.description=="function"?resource.description.call($item):resource.description)&&(__.push("       "),typeof resource.rawDescription!="undefined"&&resource.rawDescription!=null&&__.push(typeof resource.rawDescription=="function"?resource.rawDescription.call($item):resource.rawDescription),__.push("      ")),__.push("     <\/span>    <\/div>     "),typeof(resource.owner&&(displayKnoemaAuthor||!resource.isKnoemaOwner))!="undefined"&&(resource.owner&&(displayKnoemaAuthor||!resource.isKnoemaOwner))!=null&&(typeof(resource.owner&&(displayKnoemaAuthor||!resource.isKnoemaOwner))=="function"?(resource.owner&&(displayKnoemaAuthor||!resource.isKnoemaOwner)).call($item):resource.owner&&(displayKnoemaAuthor||!resource.isKnoemaOwner))&&(__.push('     <div>      <a class="author" href="/user/'),typeof resource.ownerKey!="undefined"&&resource.ownerKey!=null&&__.push($.encode(typeof resource.ownerKey=="function"?resource.ownerKey.call($item):resource.ownerKey)),__.push('" target="_blank">'),typeof resource.owner!="undefined"&&resource.owner!=null&&__.push($.encode(typeof resource.owner=="function"?resource.owner.call($item):resource.owner)),__.push("<\/a>     <\/div>    ")),__.push("   <\/div>  <\/div> <\/div>");return __});jQuery.template("Tmpl-gadgetbin-gadget",function(n,$item){var $=n,__=[],t=$item.data;with(t)__.push('<div class="favorite gadget" data-id="'),typeof gadgetId!="undefined"&&gadgetId!=null&&__.push($.encode(typeof gadgetId=="function"?gadgetId.call($item):gadgetId)),__.push('" data-page-id="'),typeof pageId!="undefined"&&pageId!=null&&__.push($.encode(typeof pageId=="function"?pageId.call($item):pageId)),__.push('">  <span class="check"><\/span>  <div class="gadget-container"><\/div>  <a href="#" class="delete" title="'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/gadgetbin-gadget.htm","Remove from Bookmarks"))),__.push('"><\/a> <\/div>');return __})