<?xml version="1.0" encoding="utf-8"?>

<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
  <generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator>
  <link href="https://esstudio.site/long-feed" rel="self" type="application/atom+xml" />
  <link href="https://esstudio.site/" rel="alternate" type="text/html" hreflang="en" />
  <updated>2026-01-12T17:59:44+01:00</updated>
  <id>https://esstudio.site/long-feed</id>

  
  
  

  
    <title type="html">Echo Sierra Studio</title>
  

  
    <subtitle>Web, app and tooling development and graphic design studio. View all websites made by Echo Sierra Studio and contact us if your interested.</subtitle>
  

  
    <author>
        <name>Sem Postma</name>
      
      
    </author>
  

  
  
  
    
    
    <entry xml:lang="en">
      <title type="html">ATC Manager Continued</title>
      <link href="https://esstudio.site/2022/04/16/atc-manager-continued.html" rel="alternate" type="text/html" title="ATC Manager Continued" />
      <published>2022-04-16T00:00:00+02:00</published>
      <updated>2022-04-16T00:00:00+02:00</updated>
      <id>https://esstudio.site/2022/04/16/atc-manager-continued</id>
      <content type="html" xml:base="https://esstudio.site/2022/04/16/atc-manager-continued.html">&lt;p&gt;It has been a long time but I have finally gotten more time to develop the game further. I have been able to update the game here and there but I have been busy with a lot of other stuff. Who would have thought building a free-to-play game would be financially unsustainable…&lt;/p&gt;

&lt;p&gt;I’m thinking of making the game freemium, so you can still play with all of the existing maps (and maybe more free ones in the future). Making some maps paid, maybe with a monthly subscription, would allow me to hire developers to further build the game and add tons of maps.&lt;/p&gt;

&lt;p&gt;I have gotten a lot of emails asking for custom build forks for education purposes. I want to emphasize that this game is exactly that a game. While I want to make the game as realistic as possible I’m not trying to build a true simulation game so keep that in mind.&lt;/p&gt;

&lt;p&gt;I you have any questions, feel free to contact me: &lt;a href=&quot;mailto:sem@esstudio.nl&quot;&gt;sem@esstudio.nl&lt;/a&gt;. Of course, I will not forget all of the kind donations, I will try to, somehow, in the future, give back to the people that have donated in the past.&lt;/p&gt;

&lt;p&gt;I will share more soon!&lt;/p&gt;

&lt;p&gt;*squawks 7600*&lt;/p&gt;</content>

      
      
      
      
      

      <author>
          <name>Sem Postma</name>
        
        
      </author>

      

      

      
        <summary type="html">It has been a long time but I have finally gotten more time to develop the game further. I have been able to update the game here and there but I have been busy with a lot of other stuff. Who would have thought building a free-to-play game would be financially unsustainable…</summary>
      

      
      
        
        <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://esstudio.site/uploads/dev.png" />
      
    </entry>
  
    
    
    <entry xml:lang="en">
      <title type="html">Illustrator Script Installer</title>
      <link href="https://esstudio.site/2020/03/23/illustrator-script-installer.html" rel="alternate" type="text/html" title="Illustrator Script Installer" />
      <published>2020-03-23T00:00:00+01:00</published>
      <updated>2020-03-23T00:00:00+01:00</updated>
      <id>https://esstudio.site/2020/03/23/illustrator-script-installer</id>
      <content type="html" xml:base="https://esstudio.site/2020/03/23/illustrator-script-installer.html">&lt;p&gt;Easily manage the installation of Illustrator Scripts. A Windows Store version is coming soon.&lt;/p&gt;

&lt;p&gt;Start by selecting or automatically searching for you Adobe Illustrator Directory. After that, you can use the “Add script” button to add new scripts to your installation. You can add scripts from text, files or popular script repositories.&lt;/p&gt;

&lt;p&gt;&lt;ins class=&quot;adsbygoogle&quot; style=&quot;display:block&quot; data-ad-client=&quot;ca-pub-9732535637352249&quot; data-ad-slot=&quot;6033478353&quot; data-ad-format=&quot;auto&quot; data-full-width-responsive=&quot;true&quot;&gt;&lt;/ins&gt;
&lt;script&gt;	
(adsbygoogle = window.adsbygoogle || []).push({});	
&lt;/script&gt;&lt;/p&gt;

&lt;div class=&quot;app-portal&quot; style=&quot;width: 400px; max-width: 100%; padding: 10px&quot;&gt;
    &lt;img src=&quot;https://esstudio.site/uploads/isi.png&quot; alt=&quot;&quot; style=&quot;max-width: 50%; margin: 20px auto&quot; /&gt;
    &lt;h1&gt;Illustrator Script Installer&lt;/h1&gt;
    &lt;p&gt;Easily install Illustrator Scripts&lt;/p&gt;
    &lt;a class=&quot;btn&quot; href=&quot;https://github.com/sempostma/illustrator-script-installer/releases&quot;&gt;
        &lt;span&gt;Launch&lt;/span&gt;
        &lt;svg viewBox=&quot;0 0 10 18&quot; style=&quot;height: 1.2em&quot;&gt;&lt;path d=&quot;m0.8,1l8,8l-8,8&quot; fill=&quot;none&quot; stroke-width=&quot;2&quot; style=&quot;stroke: currentColor;&quot; /&gt;&lt;/svg&gt;
    &lt;/a&gt;
&lt;/div&gt;

&lt;p&gt;Feel free to leave suggestions by sending an email to illustratorscriptinstaller_support@esstudio.site&lt;/p&gt;</content>

      
      
      
      
      

      <author>
          <name>Sem Postma</name>
        
        
      </author>

      

      

      
        <summary type="html">Easily manage the installation of Illustrator Scripts. A Windows Store version is coming soon.</summary>
      

      
      
        
        <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://esstudio.site/uploads/isi.png" />
      
    </entry>
  
    
    
    <entry xml:lang="en">
      <title type="html">Authenticating Firebase JWT Tokens</title>
      <link href="https://esstudio.site/2020/02/07/authenticating-firebase-jwt-tokens.html" rel="alternate" type="text/html" title="Authenticating Firebase JWT Tokens" />
      <published>2020-02-07T00:00:00+01:00</published>
      <updated>2020-02-07T00:00:00+01:00</updated>
      <id>https://esstudio.site/2020/02/07/authenticating-firebase-jwt-tokens</id>
      <content type="html" xml:base="https://esstudio.site/2020/02/07/authenticating-firebase-jwt-tokens.html">&lt;p&gt;There might be circumstances where you would want to verify if a certain user is authenticated with firebase.&lt;/p&gt;

&lt;p&gt;You don’t need the firebase admin module to verify and decode firebase JWT tokens. In the example below you can find a full implementation of this. I’m only using the default node.js modules http, https and crypto.&lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/b5b6492ddb805d71daa5e60f32c7788c.js&quot;&gt; &lt;/script&gt;

&lt;p&gt;&lt;ins class=&quot;adsbygoogle&quot; style=&quot;display:block&quot; data-ad-client=&quot;ca-pub-9732535637352249&quot; data-ad-slot=&quot;6033478353&quot; data-ad-format=&quot;auto&quot; data-full-width-responsive=&quot;true&quot;&gt;&lt;/ins&gt;
&lt;script&gt;	
(adsbygoogle = window.adsbygoogle || []).push({});	
&lt;/script&gt;&lt;/p&gt;

&lt;h3 id=&quot;example-response-json&quot;&gt;Example response JSON&lt;/h3&gt;

&lt;div class=&quot;language-json highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;data&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;iss&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;https://securetoken.google.com/&amp;lt;project_id&amp;gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;aud&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&amp;lt;project_id&amp;gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;auth_time&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1581009428&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;user_id&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;9jnxi9kmz76ajnc4do47emrk8s1s&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;sub&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;9jnxi9kmz76ajnc4do47emrk8s1s&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;iat&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1581082417&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;exp&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1581086017&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;email&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;test@example.com&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;email_verified&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;firebase&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
            &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;identities&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
                &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;email&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
                    &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;test@example.com&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
                &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
            &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
            &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;sign_in_provider&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;password&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;You can optionally check if the “iss” value is equal to “&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;https://securetoken.google.com/&amp;lt;project_id&amp;gt;&lt;/code&gt;” to ensure the user is signed in with a specific firebase project.&lt;/p&gt;</content>

      
      
      
      
      

      <author>
          <name>Sem Postma</name>
        
        
      </author>

      

      

      
        <summary type="html">There might be circumstances where you would want to verify if a certain user is authenticated with firebase.</summary>
      

      
      
        
        <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://esstudio.site/uploads/OAuth%202.0.png" />
      
    </entry>
  
    
    
    <entry xml:lang="en">
      <title type="html">Batch exporting Adobe Illustrator data sets</title>
      <link href="https://esstudio.site/2020/01/20/batch-exporting-adobe-illustrator-data-sets.html" rel="alternate" type="text/html" title="Batch exporting Adobe Illustrator data sets" />
      <published>2020-01-20T00:00:00+01:00</published>
      <updated>2020-01-20T00:00:00+01:00</updated>
      <id>https://esstudio.site/2020/01/20/batch-exporting-adobe-illustrator-data-sets</id>
      <content type="html" xml:base="https://esstudio.site/2020/01/20/batch-exporting-adobe-illustrator-data-sets.html">&lt;table&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;em&gt;Important: Data sets should not have invalid characters for filenames like:&lt;/em&gt; \ / : * ? “ &amp;lt; &amp;gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;ul&gt;
  &lt;li&gt;Open a random document&lt;/li&gt;
  &lt;li&gt;Create a new “Save” action where you simply save the file as a pdf document, &lt;em&gt;Don’t forget to uncheck “View PDF after saving”&lt;/em&gt;&lt;/li&gt;
  &lt;li&gt;Select the action and click on the hamburger button (the 3 horizontal lines) in the top right, click “Batch”&lt;/li&gt;
  &lt;li&gt;Select your “Save” action&lt;/li&gt;
  &lt;li&gt;Choose “Data Sets” as the source (you should see “No options available”)&lt;/li&gt;
  &lt;li&gt;Choose a destination&lt;/li&gt;
  &lt;li&gt;Check Override Action “Save” Command&lt;/li&gt;
  &lt;li&gt;
    &lt;table&gt;
      &lt;tbody&gt;
        &lt;tr&gt;
          &lt;td&gt;File Name: Choose either File + Data Set Name or Data Set Name. _Make sure your dataset names have valid filename characters so none of these: \ / : * ? “ &amp;lt; &amp;gt;&lt;/td&gt;
          &lt;td&gt;_&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/li&gt;
  &lt;li&gt;Click “Ok”&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you’re getting this error: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;current values have not been captured and will be discarded upon switching data sets. Proceed?&lt;/code&gt;, please refer to &lt;a href=&quot;#clean-data-sets&quot;&gt;“Clean data sets”&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;ins class=&quot;adsbygoogle&quot; style=&quot;display:block&quot; data-ad-client=&quot;ca-pub-9732535637352249&quot; data-ad-slot=&quot;6033478353&quot; data-ad-format=&quot;auto&quot; data-full-width-responsive=&quot;true&quot;&gt;&lt;/ins&gt;
&lt;script&gt;	
(adsbygoogle = window.adsbygoogle || []).push({});	
&lt;/script&gt;&lt;/p&gt;

&lt;h2 id=&quot;clean-data-sets&quot;&gt;Clean data sets&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;Download the following script: &lt;a href=&quot;https://gist.github.com/sempostma/30ea44b8fbce7033752cb80b8eb1ffb1/archive/d1405b86decd4c4462e5ca224c8506d62cdb3ad4.zip&quot; title=&quot;https://gist.github.com/sempostma/30ea44b8fbce7033752cb80b8eb1ffb1/archive/d1405b86decd4c4462e5ca224c8506d62cdb3ad4.zip&quot;&gt;https://gist.github.com/sempostma/30ea44b8fbce7033752cb80b8eb1ffb1/archive/d1405b86decd4c4462e5ca224c8506d62cdb3ad4.zip&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Open the zip file, you should find a “Clean Datasets.jsx” file.&lt;/li&gt;
  &lt;li&gt;Copy the file to C:\Program Files\Adobe\Adobe Illustrator CC 2019\Presets\&lt;your locality=&quot;&quot;&gt;\\Scripts or the equivalent script folder for your operating system.&lt;/your&gt;&lt;/li&gt;
  &lt;li&gt;Restart Illustrator&lt;/li&gt;
  &lt;li&gt;Run: “File-&amp;gt;Scripts-&amp;gt;Clean Datasets”&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Source:&lt;/strong&gt;&lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/30ea44b8fbce7033752cb80b8eb1ffb1.js&quot;&gt; &lt;/script&gt;</content>

      
      
      
      
      

      <author>
          <name>Sem Postma</name>
        
        
      </author>

      

      

      
        <summary type="html">Important: Data sets should not have invalid characters for filenames like: \ / : * ? “ &amp;lt; &amp;gt;</summary>
      

      
      
        
        <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://esstudio.site/uploads/adobe-illustrator-cc.svg" />
      
    </entry>
  
    
    
    <entry xml:lang="en">
      <title type="html">Key value wrapper around IndexedDB</title>
      <link href="https://esstudio.site/2020/01/12/key-value-wrapper-around-indexeddb.html" rel="alternate" type="text/html" title="Key value wrapper around IndexedDB" />
      <published>2020-01-12T00:00:00+01:00</published>
      <updated>2020-01-12T00:00:00+01:00</updated>
      <id>https://esstudio.site/2020/01/12/key-value-wrapper-around-indexeddb</id>
      <content type="html" xml:base="https://esstudio.site/2020/01/12/key-value-wrapper-around-indexeddb.html">&lt;p&gt;Local-storage can be slow because local-storage’s CRUD operations are synchronous so they pause rendering, script execution, etc. If you want to do anything more complex than storing a string in local-storage, you will have to serialize/de-serialize your data, which also causes an extra performance impact. Storing blobs and files is even more tricky, you will have to convert blobs and files to bloated base64 strings. You can solve all of this by using IndexedDB, but you will soon notice there’s a giant difference between the two API’s. This wrapper attempts to gap those differences.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Make sure to use the following polyfills when necessary:&lt;/em&gt; &lt;a href=&quot;https://github.com/eligrey/Blob.js&quot; title=&quot;https://github.com/eligrey/Blob.js&quot;&gt;&lt;em&gt;https://github.com/eligrey/Blob.js&lt;/em&gt;&lt;/a&gt; &lt;em&gt;and&lt;/em&gt; &lt;a href=&quot;https://github.com/stefanpenner/es6-promise&quot; title=&quot;https://github.com/stefanpenner/es6-promise&quot;&gt;&lt;em&gt;https://github.com/stefanpenner/es6-promise&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;cacheStore&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;require&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;./indexeddb-wrapper-file&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// es6&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;cacheStore&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;./indexeddb-wrapper-file&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// commonjs&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;cacheStore&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;window&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;cacheStore&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// compiled javascript&lt;/span&gt;

&lt;span class=&quot;nx&quot;&gt;cacheStore&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;my_key&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;myAwesome&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;complexObject&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;})&lt;/span&gt;
	&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;then&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  		&lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;cacheStore&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;my_key&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
	&lt;span class=&quot;p&quot;&gt;}).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;then&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;myKey&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      	&lt;span class=&quot;nx&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;myKey&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;myKey&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;em&gt;After deleting the store in devtools you might see an error in the console, you should bump the “VERSION” any time you delete database stores so the browser knows it should create new object stores.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Steps to add a new store:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Name your store: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;const APP_PERSISTENCE = &quot;APP_PERSISTENCE&quot;;&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;Add it to the array of stores: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;const stores = [CACHE_STORE, APP_PERSISTENCE];&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;Bump the version: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;const VERSION = n;&lt;/code&gt; to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;const VERSION = n+1;&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;Instantiate a wrapper around the store: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;const myStoreWrapper = indexedDBStorage(APP_PERSISTENCE)&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You might want to check if “error.name === ‘QuotaExceededError’” in transaction.onabort. If this is the case, alert the user about there not being enough storage space on the device.&lt;/p&gt;

&lt;p&gt;Javascript:&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;VERSION&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;CACHE_STORE&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;CACHE_STORE&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;DATABASE_NAME&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;window&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;location&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;origin&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;stores&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;CACHE_STORE&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;];&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;window&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;indexedDB&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;window&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;mozIndexedDB&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;window&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;webkitIndexedDB&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;open&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;DATABASE_NAME&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;VERSION&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;db&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;Promise&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;resolve&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;reject&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onsuccess&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;resolve&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;target&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onerror&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;reject&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onupgradeneeded&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;db&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;target&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;stores&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;forEach&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;store&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;db&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;objectStoreNames&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;contains&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;store&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;nx&quot;&gt;db&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;createObjectStore&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;store&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onblocked&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;reject&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;indexedDBStorage&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;get&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;db&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;then&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;database&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;Promise&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;resolve&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;reject&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;database&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;([&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;readonly&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onabort&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;target&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;store&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;objectStore&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;store&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onsuccess&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;resolve&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;target&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onerror&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;reject&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}));&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;keys&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;db&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;then&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;database&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;Promise&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;resolve&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;reject&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;database&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;([&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;readonly&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onabort&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;target&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;store&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;objectStore&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;store&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;getAllKeys&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onsuccess&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;resolve&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;target&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onerror&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;reject&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}));&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;set&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;db&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;then&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;database&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;Promise&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;resolve&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;reject&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;database&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;([&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;readwrite&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onabort&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;target&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;store&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;objectStore&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;store&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;put&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onsuccess&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;nx&quot;&gt;resolve&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onerror&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;reject&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}));&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;indexedDbDelete&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;db&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;then&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;database&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;Promise&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;resolve&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;reject&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;database&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;([&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;readwrite&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onabort&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;target&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;store&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;objectStore&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;store&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;delete&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onsuccess&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;resolve&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onerror&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;reject&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}));&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;purgeDatabase&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;db&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;then&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;database&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;Promise&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;resolve&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;reject&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;database&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;([&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;readwrite&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onabort&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;target&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;store&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;objectStore&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;store&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;clear&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onsuccess&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;resolve&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onerror&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;reject&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}));&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;deleteDatabase&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;nb&quot;&gt;window&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;indexedDB&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;deleteDatabase&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;window&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;location&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;origin&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;delete&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;indexedDbDelete&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;purgeDatabase&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;deleteDatabase&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;keys&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;export&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;default&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;indexedDBStorage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;CACHE_STORE&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Typescript:&lt;/p&gt;

&lt;div class=&quot;language-typescript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;VERSION&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;CACHE_STORE&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;CACHE_STORE&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;DATABASE_NAME&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;window&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;location&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;origin&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;stores&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;CACHE_STORE&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;];&lt;/span&gt;

&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;window&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;indexedDB&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;window&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;kr&quot;&gt;any&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;mozIndexedDB&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;window&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;kr&quot;&gt;any&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;webkitIndexedDB&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;open&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;DATABASE_NAME&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;VERSION&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;db&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;Promise&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;resolve&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;reject&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onsuccess&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;resolve&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;target&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;kr&quot;&gt;any&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onerror&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;reject&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onupgradeneeded&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;db&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;target&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;kr&quot;&gt;any&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;stores&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;forEach&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;store&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;db&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;objectStoreNames&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;contains&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;store&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;db&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;createObjectStore&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;store&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;

  &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onblocked&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;reject&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;

&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;

&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;indexedDBStorage&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kr&quot;&gt;string&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;get&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kr&quot;&gt;string&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;db&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;then&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;database&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kr&quot;&gt;any&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;Promise&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;resolve&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;reject&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;database&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;([&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;readonly&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onabort&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kr&quot;&gt;any&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;target&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;store&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;objectStore&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;store&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onsuccess&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kr&quot;&gt;any&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;resolve&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;target&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;result&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;kr&quot;&gt;any&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onerror&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;reject&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}));&lt;/span&gt;

  &lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;keys&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;db&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;then&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;database&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kr&quot;&gt;any&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;Promise&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;resolve&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;reject&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;database&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;([&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;readonly&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onabort&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kr&quot;&gt;any&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;target&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;store&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;objectStore&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;store&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;getAllKeys&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onsuccess&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kr&quot;&gt;any&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;resolve&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;target&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;result&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;kr&quot;&gt;any&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onerror&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;reject&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}));&lt;/span&gt;

  &lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;set&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kr&quot;&gt;string&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kr&quot;&gt;any&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;db&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;then&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;database&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kr&quot;&gt;any&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;Promise&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;resolve&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;reject&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;database&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;([&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;readwrite&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onabort&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kr&quot;&gt;any&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;target&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;store&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;objectStore&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;store&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;put&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onsuccess&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;resolve&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onerror&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;reject&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}));&lt;/span&gt;

  &lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;indexedDbDelete&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kr&quot;&gt;string&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;db&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;then&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;database&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kr&quot;&gt;any&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;Promise&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;resolve&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;reject&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;database&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;([&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;readwrite&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onabort&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kr&quot;&gt;any&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;target&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;store&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;objectStore&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;store&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;delete&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onsuccess&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;resolve&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onerror&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;reject&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}));&lt;/span&gt;

  &lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;purgeDatabase&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;db&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;then&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;database&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kr&quot;&gt;any&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;Promise&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;resolve&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;reject&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;database&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;([&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;readwrite&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onabort&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kr&quot;&gt;any&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;target&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;store&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;objectStore&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;store&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;clear&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onsuccess&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;resolve&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onerror&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;reject&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}));&lt;/span&gt;

  &lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;deleteDatabase&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;window&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;indexedDB&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;deleteDatabase&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;window&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;location&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;origin&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;

  &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;delete&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;indexedDbDelete&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;purgeDatabase&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;deleteDatabase&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;keys&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;export&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;default&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;indexedDBStorage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;CACHE_STORE&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Compiled Javascript:&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;VERSION&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;CACHE_STORE&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;CACHE_STORE&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;DATABASE_NAME&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;window&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;location&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;origin&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;stores&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;CACHE_STORE&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;];&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;window&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;indexedDB&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;window&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;mozIndexedDB&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;window&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;webkitIndexedDB&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;open&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;DATABASE_NAME&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;VERSION&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;db&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;Promise&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;resolve&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;reject&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onsuccess&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;resolve&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;target&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;

    &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onerror&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;reject&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;

    &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onupgradeneeded&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;db&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;target&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;stores&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;forEach&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;store&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;db&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;objectStoreNames&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;contains&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;store&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
          &lt;span class=&quot;nx&quot;&gt;db&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;createObjectStore&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;store&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;

    &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onblocked&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;reject&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;

  &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;indexedDBStorage&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;indexedDBStorage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;get&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;db&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;then&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;database&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;Promise&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;resolve&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;reject&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
          &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;database&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;([&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;readonly&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

          &lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onabort&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;target&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; 
            &lt;span class=&quot;k&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
          &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;

          &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;store&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;objectStore&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
          &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;store&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

          &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onsuccess&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;nx&quot;&gt;resolve&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;target&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
          &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;

          &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onerror&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;reject&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;

    &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;keys&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;keys&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;db&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;then&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;database&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;Promise&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;resolve&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;reject&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
          &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;database&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;([&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;readonly&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

          &lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onabort&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;target&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; 
            &lt;span class=&quot;k&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
          &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;

          &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;store&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;objectStore&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
          &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;store&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;getAllKeys&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;

          &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onsuccess&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;nx&quot;&gt;resolve&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;target&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
          &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;

          &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onerror&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;reject&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;

    &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;set&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;db&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;then&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;database&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;Promise&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;resolve&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;reject&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
          &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;database&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;([&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;readwrite&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

          &lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onabort&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;target&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
          &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;

          &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;store&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;objectStore&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
          &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;store&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;put&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

          &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onsuccess&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;nx&quot;&gt;resolve&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
          &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;

          &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onerror&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;reject&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;

    &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;indexedDbDelete&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;indexedDbDelete&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;db&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;then&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;database&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;Promise&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;resolve&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;reject&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
          &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;database&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;([&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;readwrite&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

          &lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onabort&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;target&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
          &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;

          &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;store&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;objectStore&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
          &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;store&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;delete&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;](&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
          &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onsuccess&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;resolve&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
          &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onerror&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;reject&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;

    &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;purgeDatabase&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;purgeDatabase&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;db&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;then&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;database&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;Promise&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;resolve&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;reject&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
          &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;database&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;([&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;readwrite&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

          &lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onabort&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;target&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
          &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;

          &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;store&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;transaction&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;objectStore&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
          &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;store&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;clear&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
          &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onsuccess&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;resolve&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
          &lt;span class=&quot;nx&quot;&gt;request&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onerror&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;reject&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;

    &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;deleteDatabase&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;deleteDatabase&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;nb&quot;&gt;window&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;indexedDB&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;deleteDatabase&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;window&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;location&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;origin&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;

    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;na&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;na&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;na&quot;&gt;delete&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;indexedDbDelete&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;na&quot;&gt;purgeDatabase&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;purgeDatabase&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;na&quot;&gt;deleteDatabase&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;deleteDatabase&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;na&quot;&gt;keys&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;keys&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;

  &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;_default&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;indexedDBStorage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;CACHE_STORE&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

  &lt;span class=&quot;nb&quot;&gt;window&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;cacheStore&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;_default&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;})();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;</content>

      
      
      
      
      

      <author>
          <name>Sem Postma</name>
        
        
      </author>

      

      

      
        <summary type="html">Local-storage can be slow because local-storage’s CRUD operations are synchronous so they pause rendering, script execution, etc. If you want to do anything more complex than storing a string in local-storage, you will have to serialize/de-serialize your data, which also causes an extra performance impact. Storing blobs and files is even more tricky, you will have to convert blobs and files to bloated base64 strings. You can solve all of this by using IndexedDB, but you will soon notice there’s a giant difference between the two API’s. This wrapper attempts to gap those differences.</summary>
      

      
      
        
        <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://esstudio.site/uploads/indexeddb.png" />
      
    </entry>
  
    
    
    <entry xml:lang="en">
      <title type="html">Export illustrator file to all important file formats.</title>
      <link href="https://esstudio.site/2019/11/12/export-illustrator-file-to-all-important-file-formats.html" rel="alternate" type="text/html" title="Export illustrator file to all important file formats." />
      <published>2019-11-12T00:00:00+01:00</published>
      <updated>2019-11-12T00:00:00+01:00</updated>
      <id>https://esstudio.site/2019/11/12/export-illustrator-file-to-all-important-file-formats</id>
      <content type="html" xml:base="https://esstudio.site/2019/11/12/export-illustrator-file-to-all-important-file-formats.html">&lt;h2 id=&quot;final-exportjsx&quot;&gt;Final Export.jsx&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Installation:&lt;/strong&gt; Copy this file to your illustrator scripts folder:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;For windows:&lt;/em&gt; C:\Program Files\Adobe\Adobe Illustrator CC 2019\Presets\&lt;your locale=&quot;&quot;&gt;\\Scripts&lt;/your&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;For Mac:&lt;/em&gt; Applications/Adobe Illustrator CC/Presets/&lt;your locale=&quot;&quot;&gt;/Scripts&lt;/your&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Usage:&lt;/strong&gt; File-&amp;gt;Scripts-&amp;gt;Final Export&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Questions?&lt;/strong&gt; Send me an email.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Download link:&lt;/strong&gt; &lt;a href=&quot;https://gist.github.com/sempostma/4ee699a78a5cd0ccac150f95d78b0e9d/archive/597638138cd6d1357caf15af897c0067d4639f18.zip&quot; title=&quot;Script downloaden&quot;&gt;ZIP&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Output file structure:&lt;/strong&gt;&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;  Output file structure:
  /&amp;lt;choosen output folder&amp;gt;
      /pictogram
           /&amp;lt;choosen filename&amp;gt;.jpg
           /&amp;lt;choosen filename&amp;gt;.png
      /icon
           /&amp;lt;choosen filename&amp;gt;.jpg
           /&amp;lt;choosen filename&amp;gt;.png
      /small
           /&amp;lt;choosen filename&amp;gt;.jpg
           /&amp;lt;choosen filename&amp;gt;.png
      /large
           /&amp;lt;choosen filename&amp;gt;.jpg
           /&amp;lt;choosen filename&amp;gt;.png
      /xlarge
           /&amp;lt;choosen filename&amp;gt;.jpg
           /&amp;lt;choosen filename&amp;gt;.png
      /&amp;lt;choosen filename&amp;gt;.ai
      /&amp;lt;choosen filename&amp;gt;.pdf
      /&amp;lt;choosen filename&amp;gt;.svg
      /&amp;lt;choosen filename&amp;gt;.jpg
      /&amp;lt;choosen filename&amp;gt;.png
      /&amp;lt;choosen filename&amp;gt;.dxf
      /&amp;lt;choosen filename&amp;gt;.eps
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;em&gt;TIP: You can keep exporting different variations to the same output folder as long as you choose a different name when exporting. Be carefull, files can be overidden.&lt;/em&gt;&lt;/p&gt;

&lt;h2 id=&quot;source-gist&quot;&gt;Source GIST:&lt;/h2&gt;

&lt;script src=&quot;https://gist.github.com/4ee699a78a5cd0ccac150f95d78b0e9d.js&quot;&gt; &lt;/script&gt;</content>

      
      
      
      
      

      <author>
          <name>Sem Postma</name>
        
        
      </author>

      

      

      
        <summary type="html">Final Export.jsx</summary>
      

      
      
        
        <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://esstudio.site/uploads/adobe-illustrator-cc.svg" />
      
    </entry>
  
    
    
    <entry xml:lang="en">
      <title type="html">Editing Netlify CMS config.yml from Netlify CMS without plugins</title>
      <link href="https://esstudio.site/2019/06/09/editing-netlify-cms-config-yml-from-netlify-cms-without-plugins.html" rel="alternate" type="text/html" title="Editing Netlify CMS config.yml from Netlify CMS without plugins" />
      <published>2019-06-09T00:00:00+02:00</published>
      <updated>2019-06-09T00:00:00+02:00</updated>
      <id>https://esstudio.site/2019/06/09/editing-netlify-cms-config-yml-from-netlify-cms-without-plugins</id>
      <content type="html" xml:base="https://esstudio.site/2019/06/09/editing-netlify-cms-config-yml-from-netlify-cms-without-plugins.html">&lt;p&gt;While experimenting I decided to see how much i could stretch the Netlify CMS capabilities regarding &lt;a href=&quot;https://github.com/netlify/netlify-cms/issues/341&quot;&gt;this issue&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Turns out you can almost do it. It wasn’t completely possible due to these 2 issues:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/netlify/netlify-cms/issues/2360&quot;&gt;self-referential / circular data structures cause “RangeError: Maximum call stack size exceeded” error&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/netlify/netlify-cms/issues/2363&quot;&gt;Hidden fields don’t work when added through a list widget with variable types&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;ins class=&quot;adsbygoogle&quot; style=&quot;display:block&quot; data-ad-client=&quot;ca-pub-9732535637352249&quot; data-ad-slot=&quot;6033478353&quot; data-ad-format=&quot;auto&quot; data-full-width-responsive=&quot;true&quot;&gt;&lt;/ins&gt;
&lt;script&gt;	
(adsbygoogle = window.adsbygoogle || []).push({});	
&lt;/script&gt;&lt;/p&gt;

&lt;p&gt;Because Netlify CMS can’t handle self-referential / circular data structures in the config.yml the file becomes very big and fields only work 1 depth down. For example my config can’t handle an object in an object in an object. You can get around this by increasing the depth but the file will become exponentially bigger. As it is, the file already has ~5000 😵 lines of code. Of course the upside is that you don’t have to look at it anymore…&lt;/p&gt;

&lt;p&gt;Don’t use this in production. This could lead to data loss. This is an experiment, not a viable solution.&lt;/p&gt;

&lt;p&gt;Add this to your config.yml:&lt;/p&gt;

&lt;div class=&quot;gist-maxheight&quot;&gt;
&lt;script src=&quot;https://gist.github.com/1c9a908c142b7f873e01fd6f2cfe5c1b.js?file=config.yml&quot;&gt; &lt;/script&gt;
&lt;/div&gt;

&lt;p&gt;I created a small &lt;a href=&quot;https://github.com/sempostma/netlify-cms-config-generator&quot;&gt;node utility&lt;/a&gt; for creating the config from 2 different (less bulky) files.&lt;/p&gt;

&lt;p&gt;Feel free to fork, tweak or otherwise change the code.&lt;/p&gt;

&lt;p&gt;&lt;ins class=&quot;adsbygoogle&quot; style=&quot;display:block&quot; data-ad-client=&quot;ca-pub-9732535637352249&quot; data-ad-slot=&quot;6033478353&quot; data-ad-format=&quot;auto&quot; data-full-width-responsive=&quot;true&quot;&gt;&lt;/ins&gt;
&lt;script&gt;	
(adsbygoogle = window.adsbygoogle || []).push({});	
&lt;/script&gt;&lt;/p&gt;</content>

      
      
      
      
      

      <author>
          <name>Sem Postma</name>
        
        
      </author>

      

      

      
        <summary type="html">While experimenting I decided to see how much i could stretch the Netlify CMS capabilities regarding this issue.</summary>
      

      
      
        
        <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://esstudio.site/uploads/netlify-cms-cms-edit.png" />
      
    </entry>
  
    
    
    <entry xml:lang="en">
      <title type="html">Markdown viewer for windows</title>
      <link href="https://esstudio.site/2019/06/09/markdownify-markdown-viewer.html" rel="alternate" type="text/html" title="Markdown viewer for windows" />
      <published>2019-06-09T00:00:00+02:00</published>
      <updated>2019-06-09T00:00:00+02:00</updated>
      <id>https://esstudio.site/2019/06/09/markdownify-markdown-viewer</id>
      <content type="html" xml:base="https://esstudio.site/2019/06/09/markdownify-markdown-viewer.html">&lt;p&gt;Want a very simple, windows-themed, clean and easy to use markdown viewer? Checkout Mardownify: &lt;a href=&quot;https://www.microsoft.com/p/markdownify/9npgxqvzj8c0&quot; title=&quot;https://www.microsoft.com/p/markdownify/9npgxqvzj8c0&quot;&gt;https://www.microsoft.com/p/markdownify/9npgxqvzj8c0&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Microsoft store is packed with markdown viewers and editors. Most of the markdown  apps are too expensive and overly complex. Some of those apps are already very old and don’t adhere to the windows 10 theme.&lt;/p&gt;

&lt;p&gt;Markdownify is a simple and effective markdown/text file viewer. You can open any file in the markdown format. Markdownify can also view HTML files.&lt;/p&gt;

&lt;p&gt;Source code: &lt;a href=&quot;https://github.com/sempostma/markdownify/&quot; title=&quot;https://github.com/sempostma/markdownify/&quot;&gt;Github&lt;/a&gt;&lt;/p&gt;

&lt;div class=&quot;app-portal&quot; style=&quot;width: 400px; max-width: 100%; padding: 10px&quot;&gt;
    &lt;img src=&quot;https://esstudio.site/uploads/md-editor.png&quot; alt=&quot;&quot; style=&quot;max-width: 50%; margin: 20px auto&quot; /&gt;
    &lt;h1&gt;Markdownify&lt;/h1&gt;
    &lt;p&gt;Markdown Viewer&lt;/p&gt;
    &lt;a class=&quot;btn&quot; href=&quot;https://www.microsoft.com/p/markdownify/9npgxqvzj8c0&quot;&gt;
        &lt;span&gt;Launch&lt;/span&gt;
        &lt;svg viewBox=&quot;0 0 10 18&quot; style=&quot;height: 1.2em&quot;&gt;&lt;path d=&quot;m0.8,1l8,8l-8,8&quot; fill=&quot;none&quot; stroke-width=&quot;2&quot; style=&quot;stroke: currentColor;&quot; /&gt;&lt;/svg&gt;
    &lt;/a&gt;
&lt;/div&gt;

&lt;p&gt;Click “File”-&amp;gt;”Open” button in the toolbar to open files. You can also drag files into the app.&lt;/p&gt;

&lt;h2 id=&quot;file-associations&quot;&gt;File Associations&lt;/h2&gt;

&lt;h3 id=&quot;markdown&quot;&gt;Markdown&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;markdown&lt;/li&gt;
  &lt;li&gt;mdown&lt;/li&gt;
  &lt;li&gt;mkdn&lt;/li&gt;
  &lt;li&gt;md&lt;/li&gt;
  &lt;li&gt;mkd&lt;/li&gt;
  &lt;li&gt;mdwn&lt;/li&gt;
  &lt;li&gt;mdtxt&lt;/li&gt;
  &lt;li&gt;mdtext&lt;/li&gt;
  &lt;li&gt;text&lt;/li&gt;
  &lt;li&gt;Rmd&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;html&quot;&gt;HTML&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;html&lt;/li&gt;
  &lt;li&gt;htm&lt;/li&gt;
  &lt;li&gt;xhtml&lt;/li&gt;
  &lt;li&gt;dhtml&lt;/li&gt;
  &lt;li&gt;phtml&lt;/li&gt;
  &lt;li&gt;jhtml&lt;/li&gt;
  &lt;li&gt;mhtml&lt;/li&gt;
  &lt;li&gt;rhtml&lt;/li&gt;
  &lt;li&gt;shtml&lt;/li&gt;
  &lt;li&gt;zhtml&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;other-releases&quot;&gt;Other releases:&lt;/h2&gt;

&lt;p&gt;You can check out the latest releases on &lt;a href=&quot;https://github.com/sempostma/markdownify/releases&quot; title=&quot;Latest Markdownify releases&quot;&gt;Github&lt;/a&gt; or follow the latest releases through the Newsfeeder app:&lt;/p&gt;

&lt;iframe style=&quot;background-color: #f5593d; width: 400px; height: 600px; box-shadow: 0 0 20px rgba(0,0,0,0.4)&quot; src=&quot;https://newsfeeder.esstudio.site?feed=https%3A%2F%2Fgithub.com%2Fsempostma%2Fmarkdownify%2Freleases.atom&amp;amp;site=https%3A%2F%2Fgithub.com%2Fsempostma%2Fmarkdownify%2Freleases&amp;amp;description=&amp;amp;title=markdownify%20Release%20Notes&amp;amp;icon=https%3A%2F%2Fgithub.com%2Ffavicon.ico&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;

&lt;p&gt;&lt;a href=&quot;https://newsfeeder.esstudio.site?feed=https%3A%2F%2Fgithub.com%2Fsempostma%2Fmarkdownify%2Freleases.atom&amp;amp;site=https%3A%2F%2Fgithub.com%2Fsempostma%2Fmarkdownify%2Freleases&amp;amp;description=&amp;amp;title=markdownify%20Release%20Notes&amp;amp;icon=https%3A%2F%2Fgithub.com%2Ffavicon.ico&quot; title=&quot;Open markdownify releases feed in the newsfeeder app.&quot;&gt;&lt;img src=&quot;/uploads/newsfeeder.png&quot; alt=&quot;A newsfeeder follow button for markdownify releases.&quot; title=&quot;Open releases for markdownify feed in newsfeeder.&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Download latest version: &lt;a href=&quot;https://www.microsoft.com/p/markdownify/9npgxqvzj8c0&quot; title=&quot;https://www.microsoft.com/p/markdownify/9npgxqvzj8c0&quot;&gt;https://www.microsoft.com/p/markdownify/9npgxqvzj8c0&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;copyright&quot;&gt;Copyright&lt;/h2&gt;

&lt;p&gt;Copyright © 2019 Sem Postma.&lt;/p&gt;

&lt;p&gt;All rights reserved. No part of this software may be reproduced, distributed, or transmitted in any form or by any means without the prior written permission of the publisher, except certain noncommercial uses permitted by copyright law. For permission requests, contact the copyright holder.&lt;/p&gt;

&lt;p&gt;copyright@esstudio.site
https://github.com/sempostma
https://esstudio.site/contact&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;</content>

      
      
      
      
      

      <author>
          <name>Sem Postma</name>
        
        
      </author>

      

      

      
        <summary type="html">Want a very simple, windows-themed, clean and easy to use markdown viewer? Checkout Mardownify: https://www.microsoft.com/p/markdownify/9npgxqvzj8c0</summary>
      

      
      
        
        <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://esstudio.site/uploads/md-editor-1.png" />
      
    </entry>
  
    
    
    <entry xml:lang="en">
      <title type="html">All about debouncing, throttling and batching</title>
      <link href="https://esstudio.site/2019/05/25/all-about-debouncing-and-throttling.html" rel="alternate" type="text/html" title="All about debouncing, throttling and batching" />
      <published>2019-05-25T00:00:00+02:00</published>
      <updated>2019-05-25T00:00:00+02:00</updated>
      <id>https://esstudio.site/2019/05/25/all-about-debouncing-and-throttling</id>
      <content type="html" xml:base="https://esstudio.site/2019/05/25/all-about-debouncing-and-throttling.html">&lt;p&gt;Failing to properly debounce or throttle taxing tasks in your javascript apps (or any other app for that matter) can really hurt performance. In this article i’ll list some examples of debounce and javascript functions.&lt;/p&gt;

&lt;p&gt;If you are not up to date with debounce and throttle function, you check out&lt;a href=&quot;https://css-tricks.com/debouncing-throttling-explained-examples/&quot;&gt; this css.tricks article&lt;/a&gt; by &lt;a href=&quot;https://css-tricks.com/author/dcorbacho/&quot; title=&quot;https://css-tricks.com/author/dcorbacho/&quot;&gt;dcorbacho&lt;/a&gt;. A debounce or throttle function is actually just a way of limiting how much a function can be called. The window scroll event for example can fire hundreds of times for every interaction. If you’re doing some heavy javascript layout tasks, every time this event is fired, you’re website is going to be very janky. Another place where debounce and throttling functions are often used is with limiting ajax calls. Most autocomplete search boxes use some kind of debounce or throttle function because sending a request for every keypress will hurt your app a lot.&lt;/p&gt;

&lt;p&gt;I stole the debounce  function from &lt;a href=&quot;https://davidwalsh.name/&quot;&gt;David Walsh&lt;/a&gt; and the throttle function from a comment on the same article:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;&lt;strong&gt;Niall Campbell&lt;/strong&gt;&lt;/p&gt;

  &lt;p&gt;Throttled can be simply achieved by changing the way the timeout is cleared/set. eg..&lt;/p&gt;

  &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;// Returns a function, that, as long as it continues to be invoked, will only
// trigger every N milliseconds. If &amp;lt;code&amp;gt;immediate&amp;lt;/code&amp;gt; is passed, trigger the 
// function on the leading edge, instead of the trailing.
function throttle(func, wait, immediate) {
	var timeout;
	return function() {
		var context = this, args = arguments;
...
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;  &lt;/div&gt;

  &lt;p&gt;Note that the timeout is not destroyed and recreated for every call (unlike debouncing). Its destroyed after the timeout has completed and created on the first call after its been destroyed.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In simple terms, the function rate limits the amount of events to a certain time span. Visually a debounce function looks something like this:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/uploads/debounce.gif&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The debounce snippet:&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;    &lt;span class=&quot;c1&quot;&gt;// Returns a function, that, as long as it continues to be invoked, will not&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;// be triggered. The function will be called after it stops being called for&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;// N milliseconds. If `immediate` is passed, trigger the function on the&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;// leading edge, instead of the trailing.&lt;/span&gt;
    
    &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;debounce&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;debounce&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;func&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;wait&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;immediate&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;timeout&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;context&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
          &lt;span class=&quot;nx&quot;&gt;args&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;arguments&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    
        &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;later&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;later&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
          &lt;span class=&quot;nx&quot;&gt;timeout&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
          &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;immediate&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;func&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;apply&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;context&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;args&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
    
        &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;callNow&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;immediate&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;timeout&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;clearTimeout&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;timeout&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;timeout&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;setTimeout&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;later&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;wait&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;callNow&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;func&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;apply&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;context&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;args&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
    
    &lt;span class=&quot;c1&quot;&gt;// window.onscroll = debounce(200)(function() { &lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;// 	console.log(window.pageYOffset ) &lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;// });&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The throttle snippet:&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;    &lt;span class=&quot;c1&quot;&gt;// Returns a function, that, as long as it continues to be invoked, will only&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;// trigger every N milliseconds. If `immediate` is passed, trigger the&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;// function on the leading edge, instead of the trailing.&lt;/span&gt;
    
    &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;throttle&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;throttle&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;func&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;wait&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;immediate&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;timeout&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;context&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
          &lt;span class=&quot;nx&quot;&gt;args&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;arguments&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    
        &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;later&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;later&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
          &lt;span class=&quot;nx&quot;&gt;timeout&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
          &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;immediate&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;func&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;apply&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;context&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;args&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
    
        &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;callNow&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;immediate&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;timeout&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;clearTimeout&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;timeout&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;timeout&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;setTimeout&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;later&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;wait&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;callNow&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;func&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;apply&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;context&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;args&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
    
    
    &lt;span class=&quot;c1&quot;&gt;// window.onscroll = throttle(200)(function() { &lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;// 	console.log(window.pageYOffset ) &lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;// });&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The comments already explain the ‘immediate’ parameter. The basic difference is that without the ‘immediate’ parameter the function will wait and then fire. If the ‘immediate’ parameter is set to true it will fire and then wait. Be aware that if you set the ‘immediate’ parameter, the function won’t always fire at or after the last event because it might still be waiting because of a previous event. If ‘immediate’ is set to true the function will always fire after or at the last event. This can get you into trouble if you’re sending data or if you have to make sure you always have the latest. Only set the ‘immediate’ parameter if you know what you’re doing.&lt;/p&gt;

&lt;p class=&quot;codepen&quot; data-height=&quot;478&quot; data-theme-id=&quot;35834&quot; data-default-tab=&quot;js,result&quot; data-user=&quot;Afirus&quot; data-slug-hash=&quot;NVMjJV&quot; style=&quot;height: 478px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 2px solid; margin: 1em 0; padding: 1em;&quot; data-pen-title=&quot;NVMjJV&quot;&gt;
&lt;span&gt;See the Pen &lt;a href=&quot;https://codepen.io/Afirus/pen/NVMjJV/&quot;&gt;
NVMjJV&lt;/a&gt; by sempostma (&lt;a href=&quot;https://codepen.io/Afirus&quot;&gt;@Afirus&lt;/a&gt;)
on &lt;a href=&quot;https://codepen.io&quot;&gt;CodePen&lt;/a&gt;.&lt;/span&gt;
&lt;/p&gt;
&lt;script async=&quot;&quot; src=&quot;https://static.codepen.io/assets/embed/ei.js&quot;&gt;&lt;/script&gt;

&lt;p&gt;In some cases you want to all the data from all of the events but you still want debouncing/throttling behavior:&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;update&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;debounce&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;500&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;// doFakeAjaxRequest(payload);&lt;/span&gt;
	&lt;span class=&quot;nx&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;

&lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;delay&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;setTimeout&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;update&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;All&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;delay&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;300&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;setTimeout&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;update&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;of&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;delay&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;300&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;setTimeout&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;update&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;these&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;delay&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;300&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;setTimeout&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;update&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;arguments&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;delay&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;600&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;setTimeout&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;update&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;are&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;delay&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;300&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;setTimeout&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;update&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;not&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;delay&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;300&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;setTimeout&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;update&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;batched&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;delay&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;300&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If you don’t want event data to be lost you can use this function to get all of the arguments since the last time the debounce/throttle function fired:&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;batched&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;delayedFunc&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;func&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;stack&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[];&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;handler&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;delayedFunc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;func&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;stack&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;stack&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;splice&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;stack&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;length&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;stack&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;({&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;context&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;args&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;arguments&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;handler&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Use the following snippets:&lt;/p&gt;

&lt;p&gt;The debounce snippet:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;// Returns a function, that, as long as it continues to be invoked, will not
// be triggered. The function will be called after it stops being called for
// N milliseconds. If `immediate` is passed, trigger the function on the
// leading edge, instead of the trailing.

var debounce = function debounce(wait, immediate) {
  return function(func) {
    var timeout;
    return function() {
      var context = this,
        args = arguments;

      var later = function later() {
        timeout = null;
        if (!immediate) func.apply(context, args);
      };

      var callNow = immediate &amp;amp;&amp;amp; !timeout;
      clearTimeout(timeout);
      timeout = setTimeout(later, wait);
      if (callNow) func.apply(context, args);
    };
  };
};

// window.onscroll = debounce(200)(function() { 
// 	console.log(window.pageYOffset ) 
// });
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The throttle snippet:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;// Returns a function, that, as long as it continues to be invoked, will only
// trigger every N milliseconds. If `immediate` is passed, trigger the
// function on the leading edge, instead of the trailing.
var throttle = function throttle(wait, immediate) {
  return function(func) {
    var timeout;
    return function() {
      var context = this,
        args = arguments;

      var later = function later() {
        timeout = null;
        if (!immediate) func.apply(context, args);
      };

      var callNow = immediate &amp;amp;&amp;amp; !timeout;
      clearTimeout(timeout);
      if (!timeout) timeout = setTimeout(later, wait);
      if (callNow) func.apply(context, args);
    };
  };
};

// window.onscroll = throttle(200)(function() { 
// 	console.log(window.pageYOffset ) 
// });
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And then change your code to this:&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;update&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;batched&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;debounce&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;500&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;stackedEvents&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
	&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;payload&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;stackedEvents&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;map&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;frame&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
		&lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;frame&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;args&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;];&lt;/span&gt;
	&lt;span class=&quot;p&quot;&gt;}).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt; &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;// doFakeAjaxRequest(payload);&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;payload&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;

&lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;delay&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;setTimeout&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;update&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;All&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;delay&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;300&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;setTimeout&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;update&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;of&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;delay&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;300&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;setTimeout&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;update&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;these&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;delay&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;300&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;setTimeout&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;update&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;arguments&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;delay&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;600&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;setTimeout&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;update&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;are&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;delay&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;300&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;setTimeout&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;update&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;being&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;delay&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;300&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;setTimeout&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;update&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;batched&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;delay&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;300&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Which will result in:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;index.js:85 All of these 
index.js:85 arguments are being batched
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt; &lt;/p&gt;</content>

      
      
      
      
      

      <author>
          <name>Sem Postma</name>
        
        
      </author>

      

      

      
        <summary type="html">Failing to properly debounce or throttle taxing tasks in your javascript apps (or any other app for that matter) can really hurt performance. In this article i’ll list some examples of debounce and javascript functions.</summary>
      

      
      
        
        <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://esstudio.site/uploads/throttle_debounce.gif" />
      
    </entry>
  
    
    
    <entry xml:lang="en">
      <title type="html">Mindviewer - Create multi-user realtime editable mindmaps</title>
      <link href="https://esstudio.site/2019/04/26/mindviewer-create-mult-user-realtime-editable-mindmaps.html" rel="alternate" type="text/html" title="Mindviewer - Create multi-user realtime editable mindmaps" />
      <published>2019-04-26T00:00:00+02:00</published>
      <updated>2019-04-26T00:00:00+02:00</updated>
      <id>https://esstudio.site/2019/04/26/mindviewer-create-mult-user-realtime-editable-mindmaps</id>
      <content type="html" xml:base="https://esstudio.site/2019/04/26/mindviewer-create-mult-user-realtime-editable-mindmaps.html">&lt;p&gt;I created a web based realtime &lt;a href=&quot;https://t.co/Ub1xTZW6cm&quot;&gt;multi-user mindmapper&lt;/a&gt;. It’s currently free to use and I’m looking for feedback. You can try it by &lt;a href=&quot;https://t.co/Ub1xTZW6cm&quot;&gt;opening&lt;/a&gt; the same mindmapper in 2 different tabs.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/uploads/small-card.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;You can connect to the other mindmap by creating a public mindmap and then clicking the share icon:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://pbs.twimg.com/media/D5AXD8KX4AISINT.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;An example mindmap: &lt;a href=&quot;https://mindviewer.esstudio.site/mindmapper.html?firestore=true&amp;amp;ispublic=true&amp;amp;room=l7nQoP3a5ni5mBkzApZY&amp;amp;theme=minimalistic&quot; title=&quot;https://mindviewer.esstudio.site/mindmapper.html?firestore=true&amp;amp;ispublic=true&amp;amp;room=l7nQoP3a5ni5mBkzApZY&amp;amp;theme=minimalistic&quot;&gt;https://mindviewer.esstudio.site/mindmapper.html?firestore=true&amp;amp;ispublic=true&amp;amp;room=l7nQoP3a5ni5mBkzApZY&amp;amp;theme=minimalistic&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you open this in multiple chrome browser tabs you will notice that the mindmaps update in realtime. I’m currently working on perfecting the exporting to image and html feature.&lt;/p&gt;

&lt;p&gt;Using the &lt;img src=&quot;/uploads/edit.png&quot; alt=&quot;&quot; /&gt; icon you can change the background of your mindmap. This change is not synced to the other tabs so every user can have their own theme and custom background.&lt;/p&gt;

&lt;p&gt;If you click the &lt;img src=&quot;/uploads/home.png&quot; alt=&quot;&quot; /&gt; icon you go back to the home screen (don’t forget to save you’re changes by on one of the save buttons). You can download the mindmap by going to Mindviews-&amp;gt;”Example mindmap”-&amp;gt;Download.&lt;/p&gt;

&lt;p&gt;The mindmaps are stored in a human readable format. You can view the stored information by opening the “.onmm” file with &lt;a href=&quot;https://json-gui.esstudio.site&quot; title=&quot;https://json-gui.esstudio.site&quot;&gt;https://json-gui.esstudio.site&lt;/a&gt; File-&amp;gt;Open from disk. You can make changes to your mindmap, save and open the newly created file in mindviewer by going to “Import mindmap” and dragging the mindmap into the file dropzone.&lt;/p&gt;

&lt;p&gt;With mindviewer you can create mindmaps with other users in real-time. Support for saving mindmaps to google drive and your local machine coming soon. If you want to give feedback or tips, please send a message: mindviewer@esstudio.site or use the contact form: esstudio.site/contact.&lt;/p&gt;

&lt;div class=&quot;app-portal&quot; style=&quot;width: 400px; max-width: 100%; padding: 10px&quot;&gt;
    &lt;img src=&quot;https://esstudio.site/uploads/logo-quicklaunch.png&quot; alt=&quot;&quot; style=&quot;max-width: 50%; margin: 20px auto&quot; /&gt;
    &lt;h1&gt;Mindviewer Quick-launch&lt;/h1&gt;
    &lt;p&gt;Mindviewer is a HTML5 web app which allows real-time mindmap building with multiple users.&lt;/p&gt;
    &lt;a class=&quot;btn&quot; href=&quot;https://chrome.google.com/webstore/detail/mindviewer-quick-launch/djjbfgojcdebfjeabdofdflmhmoadclb&quot;&gt;
        &lt;span&gt;Launch&lt;/span&gt;
        &lt;svg viewBox=&quot;0 0 10 18&quot; style=&quot;height: 1.2em&quot;&gt;&lt;path d=&quot;m0.8,1l8,8l-8,8&quot; fill=&quot;none&quot; stroke-width=&quot;2&quot; style=&quot;stroke: currentColor;&quot; /&gt;&lt;/svg&gt;
    &lt;/a&gt;
&lt;/div&gt;</content>

      
      
      
      
      

      <author>
          <name>Sem Postma</name>
        
        
      </author>

      

      

      
        <summary type="html">I created a web based realtime multi-user mindmapper. It’s currently free to use and I’m looking for feedback. You can try it by opening the same mindmapper in 2 different tabs.</summary>
      

      
      
        
        <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://esstudio.site/uploads/screenshot%20(3).png" />
      
    </entry>
  
    
    
    <entry xml:lang="nl">
      <title type="html">Nieuwe patch van de Kadaster Kaart</title>
      <link href="https://esstudio.site/2019/02/19/nieuwe-versie-van-de-kadaster-kaart.html" rel="alternate" type="text/html" title="Nieuwe patch van de Kadaster Kaart" />
      <published>2019-02-19T00:00:00+01:00</published>
      <updated>2019-02-19T00:00:00+01:00</updated>
      <id>https://esstudio.site/2019/02/19/nieuwe-versie-van-de-kadaster-kaart</id>
      <content type="html" xml:base="https://esstudio.site/2019/02/19/nieuwe-versie-van-de-kadaster-kaart.html">&lt;p&gt;Een nieuwe versie van de kadaster kaart is uitgebracht met een aantal vernieuwingen. De user interface is gebruiksvriendelijker en er zijn wat overbodige element verwijderd. Ook is er een nieuwe lander pagina: &lt;a href=&quot;https://esstudio.site/kadaster-kaart/&quot; title=&quot;https://esstudio.site/kadaster-kaart/&quot;&gt;esstudio.site/kadaster-kaart/&lt;/a&gt;. Perceel nummers zijn nu makkelijker te vinden en er zijn een aantal weergave verbeteringen aangebracht.&lt;/p&gt;

&lt;p&gt;Open de &lt;a href=&quot;https://esstudio.site/kadaster-app/&quot;&gt;proefversie&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://play.google.com/store/apps/details?id=com.EchoSierraStudio.Kadaster_Kaart&amp;amp;pcampaignid=MKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1&quot;&gt;&lt;img width=&quot;300&quot; alt=&quot;Ontdek het op Google Play&quot; src=&quot;https://play.google.com/intl/en_us/badges/images/generic/nl_badge_web_generic.png&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class=&quot;app-portal&quot; style=&quot;width: 400px; max-width: 100%; padding: 10px&quot;&gt;
    &lt;img src=&quot;https://esstudio.site/uploads/magnifying-glass.png&quot; alt=&quot;&quot; style=&quot;max-width: 50%; margin: 20px auto&quot; /&gt;
    &lt;h1&gt;Kadaster Kaart&lt;/h1&gt;
    &lt;p&gt;Met de Kadaster kaart app/website kunt u gemakkelijk informatie opzoeken over percelen die geregistreerd staan bij het Kadaster.&lt;/p&gt;
    &lt;a class=&quot;btn&quot; href=&quot;https://esstudio.site/kadaster-app&quot;&gt;
        &lt;span&gt;Launch&lt;/span&gt;
        &lt;svg viewBox=&quot;0 0 10 18&quot; style=&quot;height: 1.2em&quot;&gt;&lt;path d=&quot;m0.8,1l8,8l-8,8&quot; fill=&quot;none&quot; stroke-width=&quot;2&quot; style=&quot;stroke: currentColor;&quot; /&gt;&lt;/svg&gt;
    &lt;/a&gt;
&lt;/div&gt;</content>

      
      
      
      
      

      <author>
          <name>Sem Postma</name>
        
        
      </author>

      

      

      
        <summary type="html">Een nieuwe versie van de kadaster kaart is uitgebracht met een aantal vernieuwingen. De user interface is gebruiksvriendelijker en er zijn wat overbodige element verwijderd. Ook is er een nieuwe lander pagina: esstudio.site/kadaster-kaart/. Perceel nummers zijn nu makkelijker te vinden en er zijn een aantal weergave verbeteringen aangebracht.</summary>
      

      
      
        
        <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://esstudio.site/uploads/esstudio.site_kadaster-app_.png" />
      
    </entry>
  
    
    
    <entry xml:lang="">
      <title type="html">The real guide to creating a website with free hosting (2019)</title>
      <link href="https://esstudio.site/2019/02/17/the-real-guide-to-creating-a-website-with-free-hosting-2019.html" rel="alternate" type="text/html" title="The real guide to creating a website with free hosting (2019)" />
      <published>2019-02-17T00:00:00+01:00</published>
      <updated>2019-02-17T00:00:00+01:00</updated>
      <id>https://esstudio.site/2019/02/17/the-real-guide-to-creating-a-website-with-free-hosting-2019</id>
      <content type="html" xml:base="https://esstudio.site/2019/02/17/the-real-guide-to-creating-a-website-with-free-hosting-2019.html">&lt;p&gt;If you search google for “How to create a free website” you will see a bunch of website builders and websites who will give you a domain like: “yourname.theirname.com” or “theirname.com/yourname”. But in this tutorial/guide I will show you the secret to creating a real website completely customizable website. The only payment you will need to do is a 0.89 dollar one year domain.&lt;/p&gt;

&lt;h2 id=&quot;step-1&quot;&gt;Step 1&lt;/h2&gt;

&lt;p&gt;Go to &lt;a href=&quot;https://www.namecheap.com/domains/&quot; title=&quot;https://www.namecheap.com/domains/&quot; target=&quot;_blank&quot;&gt;https://www.namecheap.com/domains/&lt;/a&gt; and search for a domain name. I would suggest choosing an uncommon domain name. Try to find one that costs as little as possible. This is probably the best because if you’re starting out, you can always buy a more expensive domain later. If you’ve found a cheap domain it’s probably because it’s very unique and original so it’s a good thing. One thing to keep in mind though is to keep the domain name as short as possible.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/uploads/namecheap.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;In this example I’m using namecheap but you can use any service you want. If you want to follow along I suggest you buy the domain via namecheap, they provide good pricing and a nice user interface (I’m not sponsored). For example this domain costs 0.88 euro/yr which is about a 1 USD. Click “add to cart”, create an account if you haven’t already and buy the domain.&lt;/p&gt;

&lt;h2 id=&quot;step-2&quot;&gt;Step 2&lt;/h2&gt;

&lt;p&gt;When you’re done, go to &lt;a href=&quot;https://www.cloudflare.com/&quot; title=&quot;https://www.cloudflare.com/&quot; target=&quot;_blank&quot;&gt;https://www.cloudflare.com/&lt;/a&gt;, create an account and add a website:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/uploads/cloudflare-add-site.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Cloudflare will now get your DNS records. If you are not familiar with those, it doesn’t matter, you can just click continue until you get to the following dialog:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/uploads/cloudflare-nameservers.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Go back to your namecheap account (or another domain name provider if you didn’t use namecheap). Go to your domain’s dashboard and change the nameserver setting to Custom DNS and copy the nameservers values to the values in the cloudflare dialog:&lt;/p&gt;

&lt;p&gt;If you’re not using namecheap, search for the nameserver setting, there should be a similar setting. If you can’t find it, a quick google search often reveals where you can change it.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/uploads/namecheap-nameservers.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Go back to cloudflare, click “continue”, and wait until cloudflare completes your nameserver setup. This can take a (very) long time. If it’s not immediately working just give it an hour’s worth of time.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/uploads/cname-www.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;You need to add three records to your DNS table.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Add an “A” record by clicking the dropdown in the top left in the above image and give it the name of your domain in my example it’s “esstudio.site”. Make sure you don’t include any slashes or the “https://” part of the url. In the value field, put in “192.30.252.153”.&lt;/li&gt;
  &lt;li&gt;Add another “A” record by clicking the dropdown in the top left in the above image and give it the name of your domain in my example it’s “esstudio.site”. Make sure you don’t include any slashes or the “https://” part of the url. In the value field put in “192.30.252.154”.&lt;/li&gt;
  &lt;li&gt;Finally, add a CNAME record with the name “www”. In the value field, put in the name of your github username plus “.github.io” If you don’t have a github account, you can do this after step 3.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For all the records keep the TTL setting at “Automatic TTL”.&lt;/p&gt;

&lt;h2 id=&quot;step-3&quot;&gt;Step 3&lt;/h2&gt;

&lt;p&gt;Next, go to &lt;a href=&quot;https://github.com/&quot; title=&quot;https://github.com/&quot; target=&quot;_blank&quot;&gt;https://github.com/&lt;/a&gt;, and create an account if you haven’t already. Click on the little plus icon in the top right and choose “New repository”. You can also go to your repositories and click “New”. You will see the following dialog:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/uploads/github-create.PNG&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Choose a repository name and description, keep the repository public (it’s going to be a public website so it will be public anyway) and click “Create repository”.&lt;/p&gt;

&lt;p&gt;The following page might be a bit confusing if you’re not a programmer or you’re not familiar with git(hub) but you need to click the “Create a new file” link/button.&lt;/p&gt;

&lt;p&gt;If you know &lt;a href=&quot;https://www.w3schools.com/html/&quot; title=&quot;https://www.w3schools.com/html/&quot; target=&quot;_blank&quot;&gt;HTML&lt;/a&gt; you can put in the following:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/uploads/html-file.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Otherwise enter the following:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/uploads/markdown.png&quot; alt=&quot;A screenshot of an index.md file&quot; title=&quot;Markdown&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The above picture shows a markdown file but that’s to only thing you need to know. If you don’t know anything about HTML or Markdown you can a website called &lt;a href=&quot;https://forestry.io/&quot; title=&quot;https://forestry.io/&quot; target=&quot;_blank&quot;&gt;forestry.io&lt;/a&gt; to edit and create pages. I’m actually using it right now to write this article.&lt;/p&gt;

&lt;p&gt;If you’re a programmer, keep in mind that even though this is just a static website hosted on github, a lot of websites nowadays are just static web apps running react or angular which fetch data from an API. You can even use &lt;a href=&quot;https://firebase.google.com/&quot; title=&quot;https://firebase.google.com/&quot; target=&quot;_blank&quot;&gt;https://firebase.google.com/&lt;/a&gt; for a full &lt;a href=&quot;https://towardsdatascience.com/go-serverless-with-firebase-5348dedb70e9&quot; target=&quot;_blank&quot;&gt;serverless architecture&lt;/a&gt; or use something like heroku to create an API. You can use &lt;a href=&quot;https://forestry.io/&quot; title=&quot;https://forestry.io/&quot; target=&quot;_blank&quot;&gt;forestry.io&lt;/a&gt; as a CMS for your github repositories. It actually commits and pushes your edits to github. You can even use &lt;a href=&quot;https://jekyllrb.com/&quot; title=&quot;https://jekyllrb.com/&quot; target=&quot;_blank&quot;&gt;jekyll&lt;/a&gt; which has builtin support for sass, coffeescript, markdown and does a lot more. You can even use jekyll to &lt;a href=&quot;https://www.techiediaries.com/how-to-use-jekyll-like-a-pro-output-data-as-json/&quot; target=&quot;_blank&quot;&gt;output data as JSON&lt;/a&gt;. I’ve created an RSS reader using the methods above which can be found here: &lt;a href=&quot;https://newsfeeder.esstudio.site/&quot; title=&quot;https://newsfeeder.esstudio.site/&quot; target=&quot;_blank&quot;&gt;https://newsfeeder.esstudio.site/&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;step-4&quot;&gt;Step 4&lt;/h2&gt;

&lt;p&gt;The following steps may be confusing but just follow along and copy what I’m doing. Click on the “settings” tab:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/uploads/settings.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Scroll down until you see the following:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/uploads/github-pages.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Click the github pages source dropdown and select the “master” branch.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/uploads/github-pages-result.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;You will probably see something like this. Because we want an absolute URL (without the “/my-fast-static-site/” part we go back to the code tab and add a new file:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/uploads/cname.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Enter the domain name you just purchased. It’s important that you don’t include any slashes or the “https://” part in the domain name. Save the file and we’re done with github.&lt;/p&gt;

&lt;h2 id=&quot;step-5&quot;&gt;Step 5&lt;/h2&gt;

&lt;p&gt;After completing the previous step, wait a minute and open your domain and see if it’s working. If it’s not, please leave a message in the comments.&lt;/p&gt;

&lt;p&gt;To improve performance and enable SSL and HTTPS, go to back to cloudflare. For non-programmers, if you use HTTPS you’re users will see a little security lock next to the URL to show that the page is secure.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/uploads/ssl.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Click on the crypto icon and enable full SSL.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/uploads/https.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Scroll down and make sure that “Always Use HTTPS” is selected.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/uploads/speed.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Click the speed icon. And enable “Auto Minify” of Javascript, CSS and HTML.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/uploads/brotli.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Scroll down and enable Brotli compression.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/uploads/caching-menu.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Scroll down and click the caching icon.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/uploads/caching.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Scroll down and select the Standard caching level. Set the browser cache expiration to 4 hours and make sure that “always online” is set to “On”.&lt;/p&gt;

&lt;p&gt;And you’re done!&lt;/p&gt;

&lt;p&gt;To edit you’re pages I recommend &lt;a href=&quot;https://forestry.io/&quot; title=&quot;https://forestry.io/&quot; target=&quot;_blank&quot;&gt;forestry.io&lt;/a&gt;. To get started with foresty.io, click “login” and then “login with github”. Import your github repository as a jekyll project and you can start adding pages. If you want to learn more check out the &lt;a href=&quot;https://forestry.io/docs/welcome/&quot; title=&quot;https://forestry.io/docs/welcome/&quot; target=&quot;_blank&quot;&gt;documentation&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;To change you’re website’s theme, you can select &lt;a href=&quot;&quot; title=&quot;https://pages.github.com/themes/&quot; target=&quot;_blank&quot;&gt;these&lt;/a&gt; themes. Click on one of the themes, for example cayman. If you scroll down, you will probably see a “usage” section. You only need to do the first instruction which looks like this in the case of the cayman theme:&lt;/p&gt;

&lt;p&gt;Add the following to your site’s &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_config.yml&lt;/code&gt;:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;theme: jekyll-theme-cayman
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;note-to-programmers&quot;&gt;Note to programmers&lt;/h2&gt;

&lt;p&gt;If you’re using a javascript framework or a build tool you can use git to push you’re dist folder to the github-pages branch using the steps below. These steps are copied from:  &lt;a href=&quot;https://gist.github.com/cobyism/4730490&quot; title=&quot;https://gist.github.com/cobyism/4730490&quot; target=&quot;_blank&quot;&gt;https://gist.github.com/cobyism/4730490&lt;/a&gt;.&lt;/p&gt;

&lt;h4 id=&quot;step-1-1&quot;&gt;Step 1&lt;/h4&gt;

&lt;p&gt;Remove the dist directory from the project’s &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.gitignore&lt;/code&gt; file (it’s ignored by default by Yeoman).&lt;/p&gt;

&lt;h4 id=&quot;step-2-1&quot;&gt;Step 2&lt;/h4&gt;

&lt;p&gt;Make sure git knows about your subtree (the sub folder with your site).&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;git add dist &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; git commit &lt;span class=&quot;nt&quot;&gt;-m&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;Initial dist subtree commit&quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h4 id=&quot;step-3-1&quot;&gt;Step 3&lt;/h4&gt;

&lt;p&gt;Use subtree push to send it to the gh-pages branch on GitHub.&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;git subtree push &lt;span class=&quot;nt&quot;&gt;--prefix&lt;/span&gt; dist origin gh-pages
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Boom. If your folder isn’t called dist, then you’ll need to change that in each of the commands above.&lt;/p&gt;</content>

      
      
      
      
      

      <author>
          <name>Sem Postma</name>
        
        
      </author>

      

      

      
        <summary type="html">If you search google for “How to create a free website” you will see a bunch of website builders and websites who will give you a domain like: “yourname.theirname.com” or “theirname.com/yourname”. But in this tutorial/guide I will show you the secret to creating a real website completely customizable website. The only payment you will need to do is a 0.89 dollar one year domain.</summary>
      

      
      
        
        <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://esstudio.site/uploads/free-website.png" />
      
    </entry>
  
    
    
    <entry xml:lang="">
      <title type="html">Downloading, saving and opening files with Cordova</title>
      <link href="https://esstudio.site/2019/02/16/downloading-saving-and-opening-files-with-cordova.html" rel="alternate" type="text/html" title="Downloading, saving and opening files with Cordova" />
      <published>2019-02-16T00:00:00+01:00</published>
      <updated>2019-02-16T00:00:00+01:00</updated>
      <id>https://esstudio.site/2019/02/16/downloading-saving-and-opening-files-with-cordova</id>
      <content type="html" xml:base="https://esstudio.site/2019/02/16/downloading-saving-and-opening-files-with-cordova.html">&lt;p&gt;In the browser, downloading files is actually quite easy.  You can just do:&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;download&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;filename.txt&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;href&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;data:text/plain;charset=utf-8,hello world!&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Download&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;/a&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&amp;gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;But this doesn’t work in webview. I’ve expanded on the answer given in this &lt;a href=&quot;https://stackoverflow.com/questions/43575581/cordova-download-a-file-in-download-folder&quot;&gt;stackoverflow question&lt;/a&gt; to work in both the browser and in a webview. It also let’s the user open the files in a webview and polyfills the anchor’s download attribute.&lt;/p&gt;

&lt;p&gt;Because of how cordova works we need the &lt;a href=&quot;https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file/&quot;&gt;cordova-plugin-file&lt;/a&gt;, the&lt;a href=&quot;https://github.com/pwlin/cordova-plugin-file-opener2&quot;&gt; cordova-plugin-file-opener2&lt;/a&gt; and &lt;a href=&quot;https://github.com/eligrey/FileSaver.js&quot;&gt;file-saver&lt;/a&gt;. The cordova-plugin-file plugin gives us access to the users’s file system, and the cordova-plugin-file-opener2 plugin helps us with opening files using an external application (e.g word, excel, etc.). We are using the file-saver when we are running inside of the browser.&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;download&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;filename&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;mimeType&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;blob&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;Blob&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;([&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;mimeType&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;window&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;cordova&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;cordova&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;platformId&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;!==&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;browser&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;addEventListener&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;deviceready&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;c1&quot;&gt;// save file using codova-plugin-file&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;saveAs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;blob&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;filename&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Let’s save the file using codova-plugin-file.&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;download&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;filename&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;mimeType&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;blob&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;Blob&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;([&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;mimeType&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;window&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;cordova&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;cordova&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;platformId&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;!==&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;browser&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  	&lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;addEventListener&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;deviceready&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;storageLocation&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

      &lt;span class=&quot;k&quot;&gt;switch&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;device&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;platform&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;Android&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
          &lt;span class=&quot;nx&quot;&gt;storageLocation&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;cordova&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;externalDataDirectory&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
          &lt;span class=&quot;k&quot;&gt;break&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

        &lt;span class=&quot;k&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;iOS&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
          &lt;span class=&quot;nx&quot;&gt;storageLocation&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;cordova&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;documentsDirectory&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
          &lt;span class=&quot;k&quot;&gt;break&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

      &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;folderPath&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;storageLocation&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

      &lt;span class=&quot;nb&quot;&gt;window&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;resolveLocalFileSystemURL&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;folderPath&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;dir&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
          &lt;span class=&quot;nx&quot;&gt;dir&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;getFile&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
            &lt;span class=&quot;nx&quot;&gt;filename&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
              &lt;span class=&quot;na&quot;&gt;create&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
            &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
              &lt;span class=&quot;c1&quot;&gt;// The file...&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
            &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;err&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
              &lt;span class=&quot;nx&quot;&gt;alert&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;Unable to download&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
              &lt;span class=&quot;nx&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;err&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
          &lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;err&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
          &lt;span class=&quot;nx&quot;&gt;alert&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;Unable to download&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
          &lt;span class=&quot;nx&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;err&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;saveAs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;blob&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;filename&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;To finish the function we write the data to the file and then we open it using the file opener plugin. So the full example is:&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;download&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;filename&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;mimeType&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;blob&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;Blob&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;([&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;mimeType&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;window&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;cordova&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;cordova&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;platformId&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;!==&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;browser&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;addEventListener&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;deviceready&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;storageLocation&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

      &lt;span class=&quot;k&quot;&gt;switch&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;device&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;platform&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;Android&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
          &lt;span class=&quot;nx&quot;&gt;storageLocation&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;cordova&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;externalDataDirectory&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
          &lt;span class=&quot;k&quot;&gt;break&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

        &lt;span class=&quot;k&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;iOS&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
          &lt;span class=&quot;nx&quot;&gt;storageLocation&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;cordova&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;documentsDirectory&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
          &lt;span class=&quot;k&quot;&gt;break&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

      &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;folderPath&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;storageLocation&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

      &lt;span class=&quot;nb&quot;&gt;window&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;resolveLocalFileSystemURL&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;folderPath&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;dir&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
          &lt;span class=&quot;nx&quot;&gt;dir&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;getFile&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
            &lt;span class=&quot;nx&quot;&gt;filename&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
              &lt;span class=&quot;na&quot;&gt;create&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
            &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
              &lt;span class=&quot;nx&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;createWriter&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
                &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;fileWriter&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                  &lt;span class=&quot;nx&quot;&gt;fileWriter&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;write&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;blob&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

                  &lt;span class=&quot;nx&quot;&gt;fileWriter&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onwriteend&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                    &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;toURL&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
                    &lt;span class=&quot;nx&quot;&gt;cordova&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;plugins&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;fileOpener2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;open&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;mimeType&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                      &lt;span class=&quot;na&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;err&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                        &lt;span class=&quot;nx&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;err&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                        &lt;span class=&quot;nx&quot;&gt;alert&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;Unable to download&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                      &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
                      &lt;span class=&quot;na&quot;&gt;success&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;success&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                        &lt;span class=&quot;nx&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;success with opening the file&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                      &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
                    &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
                  &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;

                  &lt;span class=&quot;nx&quot;&gt;fileWriter&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onerror&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;err&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                    &lt;span class=&quot;nx&quot;&gt;alert&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;Unable to download&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                    &lt;span class=&quot;nx&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;err&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                  &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
                &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
                &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;err&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                  &lt;span class=&quot;c1&quot;&gt;// failed&lt;/span&gt;
                  &lt;span class=&quot;nx&quot;&gt;alert&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;Unable to download&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                  &lt;span class=&quot;nx&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;err&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
              &lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
            &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;err&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
              &lt;span class=&quot;nx&quot;&gt;alert&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;Unable to download&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
              &lt;span class=&quot;nx&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;err&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
          &lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;err&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
          &lt;span class=&quot;nx&quot;&gt;alert&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;Unable to download&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
          &lt;span class=&quot;nx&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;err&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;saveAs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;blob&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;filename&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;full-example&quot;&gt;Full example&lt;/h2&gt;

&lt;p&gt;Now we can call the download function with any kind of data, text and blobs, and it will work in the browser and inside a webview. But we still haven’t fixed the download attribute issue. To fix this we can add a click handler to the document. This function works for any kind of url, including data urls.&lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/be25fabfe94b1982e971aaf26a54c999.js&quot;&gt; &lt;/script&gt;

&lt;div class=&quot;affiliate&quot;&gt;
    &lt;h3&gt;Resources:&lt;/h3&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fjavascript-in-24-hours-sams-teach-yourself-9780672338090&quot;&gt;Javascript
            in 24 hours&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fhtml-css-and-javascript-all-in-one-covering-html5-css3-9780672338083&quot;&gt;HTML,
            CSS, ES6 all in one&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Flearning-react-a-hands-on-guide-to-building-web-applications-9780134843551&quot;&gt;A
            Hands-On Guide to Building Web Applications Using React&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Flearning-react-a-hands-on-guide-to-building-web-applications-9780134843551http%3A%2F%2Fwww.informit.com%2Fstore%2Flearning-regular-expressions-9780134757063&quot;&gt;Learning
            Regular Expressions&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fnode.js-mongodb-and-angular-web-development-the-definitive-9780134655536&quot;&gt;Node.js,
            MongoDB, and Angular web development&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;p&gt;&lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=145238.10000683&amp;amp;type=3&amp;amp;subid=0&quot;&gt;InformIT
            eBook Store&lt;/a&gt;&lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.10000683&amp;amp;type=3&amp;amp;subid=0&quot; /&gt;
        has a large number of ebooks on a wide range of topics. I would definitely recommend them.&lt;/p&gt;
    &lt;h3&gt;Great courses:&lt;/h3&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fjavascript-beginner.html&quot;&gt;Javascript
            for beginners in 3 hours&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fjavascript-basics-web-development-building-blocks.html&quot;&gt;Javascript
            basic web development building blocks&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fmobile-ui-and-ux-design.html&quot;&gt;Mobile
            UI and UX Design&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fmobile-ui-and-ux-design.htmlhttps%3A%2F%2Fwww.quickstart.com%2Fbuilding-web-applications-with-react.html&quot;&gt;Building
            web applications with react&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fstarting-with-angular-4.html&quot;&gt;Starting
            with angular 4&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fprogramming-in-c-ms-20483.html&quot;&gt;Programming
            in C#&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt; (recommended)
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Ffind-training%2Ftraining-by-topic%2Fapp-development%2Fweb-development.html&quot;&gt;More
            web development courses&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;p&gt;
        &lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=579862.416&amp;amp;type=3&amp;amp;subid=0&quot;&gt;Quickstart
        &lt;/a&gt;&lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.416&amp;amp;type=3&amp;amp;subid=0&quot; /&gt;
        offers a large amount of (online) courses on web development (&lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=579862.416&amp;amp;type=3&amp;amp;subid=0&quot;&gt;Use
            Code LSOFF50&lt;/a&gt;&lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.416&amp;amp;type=3&amp;amp;subid=0&quot; /&gt;
        to get 50% off ;p)
    &lt;/p&gt;
&lt;/div&gt;</content>

      
      
      
      
      

      <author>
          <name>Sem Postma</name>
        
        
      </author>

      

      

      
        <summary type="html">In the browser, downloading files is actually quite easy. You can just do:</summary>
      

      
      
        
        <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://esstudio.site/uploads/cordova-file-download-and-open.jpeg" />
      
    </entry>
  
    
    
    <entry>
      <title type="html">A* Pathfinding in Javascript</title>
      <link href="https://esstudio.site/2018/11/14/a-pathfinding-in-javascript.html" rel="alternate" type="text/html" title="A* Pathfinding in Javascript" />
      <published>2018-11-14T14:19:03+01:00</published>
      <updated>2018-11-14T14:19:03+01:00</updated>
      <id>https://esstudio.site/2018/11/14/a-pathfinding-in-javascript</id>
      <content type="html" xml:base="https://esstudio.site/2018/11/14/a-pathfinding-in-javascript.html">&lt;p&gt;Because we’ll be using binary heaps (min heap) in this tutorial I would recommend &lt;a href=&quot;https://esstudio.site/2018/10/31/implementing-binary-heaps-with-javascript.html&quot;&gt;this tutorial&lt;/a&gt; on implementing binary heaps with javascript.&lt;/p&gt;

&lt;p&gt;The code for the min heap is:&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;
&lt;span class=&quot;c1&quot;&gt;// I&apos;m using a &quot;MinHeap&quot; in this example. If you don&apos;t know what priority queues or binary trees are, checkout this article: https://esstudio.site/2018/10/31/implementing-binary-heaps-with-javascript.html&lt;/span&gt;
    
&lt;span class=&quot;kd&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;MinHeap&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;constructor&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;selector&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[];&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;selector&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;selector&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

  &lt;span class=&quot;nx&quot;&gt;seek&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;];&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

  &lt;span class=&quot;nx&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;length&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;selector&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;Math&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;floor&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)])&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;selector&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]))&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;t&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;];&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;Math&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;floor&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)];&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;Math&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;floor&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;Math&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;floor&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

  &lt;span class=&quot;nx&quot;&gt;pop&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;length&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;pop&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;ret&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;];&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;pop&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;lowest&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;selector&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;selector&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt; 
      &lt;span class=&quot;p&quot;&gt;?&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;selector&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;selector&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;lowest&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]))&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;t&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;];&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;lowest&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;];&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;lowest&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;lowest&lt;/span&gt;             
      &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;break&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;ret&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

  &lt;span class=&quot;k&quot;&gt;delete&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;indexOf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;// heapify&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;pop&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;lowest&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;selector&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;selector&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt; 
      &lt;span class=&quot;p&quot;&gt;?&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;selector&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;selector&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;lowest&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]))&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;t&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;];&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;lowest&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;];&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;lowest&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;lowest&lt;/span&gt;             
      &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;break&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

  &lt;span class=&quot;nx&quot;&gt;heapify&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;arr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;arr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;length&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;++&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;arr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]);&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Again if you don’t understand something you can refer to &lt;a href=&quot;https://esstudio.site/2018/10/31/implementing-binary-heaps-with-javascript.html&quot;&gt;this blog post&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Make sure the MinHeap class is a global variable or better, export the class if you’re using commonjs or es6 modules.&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kd&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;GridPath&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;constructor&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;width&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;height&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;len&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;width&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;startI&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;goalI&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;When a new grid path is instantiated we set the width and height of the grid. Then we get the total number of cells/nodes and set it to the “.len” field. We also set the start node index and the goal node index to null. If the width and height are 10 for example, the grid will be laid out like this:&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;
	&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;6&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;9&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;11&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;12&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;13&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;14&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;15&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;16&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;17&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;18&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;19&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;mi&quot;&gt;20&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;21&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;22&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;23&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;24&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;25&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;26&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;27&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;28&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;29&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;mi&quot;&gt;30&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;31&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;32&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;33&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;34&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;35&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;36&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;37&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;38&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;39&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;mi&quot;&gt;40&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;41&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;42&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;43&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;44&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;45&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;46&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;47&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;48&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;49&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;mi&quot;&gt;50&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;51&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;52&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;53&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;54&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;55&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;56&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;57&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;58&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;59&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;mi&quot;&gt;60&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;61&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;62&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;63&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;64&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;65&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;66&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;67&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;68&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;69&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;mi&quot;&gt;70&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;71&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;72&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;73&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;74&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;75&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;76&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;77&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;78&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;79&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;mi&quot;&gt;80&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;81&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;82&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;83&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;84&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;85&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;86&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;87&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;88&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;89&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;mi&quot;&gt;90&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;91&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;92&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;93&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;94&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;95&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;96&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;97&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;98&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;99&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;To recap. Every node on the grid has it’s own index. There are two special nodes on the grid, the “start node” and the “goal node”. We stored the indexes of these nodes.&lt;/p&gt;

&lt;p&gt;Now we can start with the actual logic.&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c1&quot;&gt;// class GridPath {&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;// ...&lt;/span&gt;
	&lt;span class=&quot;nx&quot;&gt;find&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;startI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;goalI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;startI&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;startI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;goalI&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;goalI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

        &lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;closedSet&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{};&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// a set with all the indexes that we&apos;ve processed&lt;/span&gt;

        &lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;cameFrom&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{};&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// a set with indexes that point to the index of the node from where we came from.&lt;/span&gt;

        &lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;gScore&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{};&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// a set with indexes that hold the current lowest cost (how many nodes away from the start according to the current closest path) to get to that node.&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;gScore&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;startI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// set the gscore of the start index to zero, because it costs zero to get from the first node to the first node.&lt;/span&gt;

        &lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;fScore&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{};&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// a set with indexes that hold the approximate distance or cost to get from that node to the goal. We need a function to approximate that distance which will be &quot;this.heuristicCostEstimateSquared(aRandomNodeIndex, goalIndex)&quot;&lt;/span&gt;
      
        &lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;openSet&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;MinHeap&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;index&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;fScore&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;index&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;Infinity&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// a minheap that holds all the nodes that need to be processed sorted based on the node&apos;s fScore.&lt;/span&gt;
        
      	&lt;span class=&quot;nx&quot;&gt;fScore&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;startI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;heuristicCostEstimateSquared&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;startI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;goalI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// we set the initial approximate distance from the goal.&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;openSet&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;startI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// we push the start node index on the minheap.&lt;/span&gt;
  
  		&lt;span class=&quot;c1&quot;&gt;// ...&lt;/span&gt;
	&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;// }&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The closed set holds a set with all the indexes that we’ve processed. The camefrom variable holds a set with indexes that point to the index of the node from where we came from. The gscore holds a set with indexes that hold the current lowest cost (how many nodes away from the start according to the current closest path) to get to that node. We set the gscore of the start index to zero, because it costs zero to get from the first node to the first node. The fscore holds a set with indexes and the approximate distance or cost to get from that node to the goal. We need a function to approximate that distance which will be “this.heuristicCostEstimateSquared(aRandomNodeIndex, goalIndex)”. We do this for the first node we need to process which is the start node. Then we push this node onto the open set which is a minheap that holds all the nodes that need to be processed sorted based on the node’s fScore.&lt;/p&gt;

&lt;p&gt;The “heuristicCostEstimateSquared” function is implemented like this:&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nx&quot;&gt;heuristicCostEstimateSquared&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;node1I&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;node2I&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;Math&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;pow&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;node2I&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;width&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;node1I&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; 
            &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;Math&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;pow&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;Math&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;floor&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;node2I&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;Math&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;floor&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;node1I&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;We simply use the “pythagoras theorem” to determine the approximate distance between nodes. You can optimize this function by not taking the square root because we don’t need the actual distance. We just need to know if node A is closer then node B, so taking the square root is just useless overhead.&lt;/p&gt;

&lt;p&gt;Next we start a while loop that continues untill there are no more nodes in the openSet. Hopefully we find a path before that happens otherwise we can be sure there’s no valid path from the start node to the goal node.&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c1&quot;&gt;// class GridPath {&lt;/span&gt;
	&lt;span class=&quot;c1&quot;&gt;// ...&lt;/span&gt;
	&lt;span class=&quot;c1&quot;&gt;// find(startI, goalI) {&lt;/span&gt;
		&lt;span class=&quot;c1&quot;&gt;// ...&lt;/span&gt;
		&lt;span class=&quot;k&quot;&gt;while&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;openSet&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;length&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;currentI&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;openSet&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;pop&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;

            &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;currentI&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;goalI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;c1&quot;&gt;// done&lt;/span&gt;
                &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;reconstructPath&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;cameFrom&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;currentI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

            &lt;span class=&quot;nx&quot;&gt;closedSet&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;currentI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;neighboursI&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;neighboursI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;currentI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

            &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;neighboursI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;length&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;++&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;neighbourI&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;neighboursI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;];&lt;/span&gt;
                
                &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;neighbourI&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;neighbourI&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;len&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;closedSet&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;neighbourI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;
                    &lt;span class=&quot;k&quot;&gt;continue&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

                &lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;tentativeGscore&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;gScore&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;currentI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

                &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;fScore&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;neighbourI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                    &lt;span class=&quot;nx&quot;&gt;cameFrom&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;neighbourI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;currentI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
                    &lt;span class=&quot;nx&quot;&gt;gScore&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;neighbourI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;tentativeGscore&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
                    &lt;span class=&quot;nx&quot;&gt;fScore&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;neighbourI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;tentativeGscore&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;heuristicCostEstimateSquared&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;neighbourI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;goalI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                    &lt;span class=&quot;nx&quot;&gt;openSet&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;neighbourI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
                &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;tentativeGscore&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;gScore&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;neighbourI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;
                        &lt;span class=&quot;k&quot;&gt;continue&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
                    &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                        &lt;span class=&quot;nx&quot;&gt;cameFrom&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;neighbourI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;currentI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
                        &lt;span class=&quot;nx&quot;&gt;gScore&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;neighbourI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;tentativeGscore&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
                        &lt;span class=&quot;nx&quot;&gt;fScore&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;neighbourI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;tentativeGscore&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;heuristicCostEstimateSquared&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;neighbourI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;goalI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                        &lt;span class=&quot;c1&quot;&gt;// update openset&lt;/span&gt;
                        &lt;span class=&quot;nx&quot;&gt;openSet&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;delete&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;neighbourI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                        &lt;span class=&quot;nx&quot;&gt;openSet&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;neighbourI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
                &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
	&lt;span class=&quot;c1&quot;&gt;// }&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;// }&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Start by popping the closes node to the goal from the openSet. Then check if that node is the goal node, if so we’ve finished.&lt;/p&gt;

&lt;p&gt;Else, we set the node’s index on the closedSet. Marking it as discovered. Then we get all of the node’s neighbours. We can get all of the indexes of the neighbours with this function:&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c1&quot;&gt;// class GridPath {&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;// ...&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;neighboursI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;nodeI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;nodeI&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;nodeI&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;nodeI&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;nodeI&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;// }&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Now we start looping over every neighbour. If the neighbour is in the closed set, we skip that node and continue. Then we set the tentative gscore of the neighbour to the gscore of the previous node plus one. If the neighbour is not in the fscore set we add the nieghbour with the heuristic cost estimate plus the tentaive gscore. Then we set the camefrom and gscore set, and we push the neighbour onto the open set. If the nieghbour is in the fscore set, we check if the current tentative gscore is lower then the previous gscore. If so we set it onto the camefrom, gscore and fscore sets. We also delete and push the neighbour to trigger the openset the resort the binary tree.&lt;/p&gt;

&lt;p&gt;And we’re done, we now only need to define the “reconstructPath(cameFrom, currentI)” function:&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c1&quot;&gt;// class GridPath {&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;// ...&lt;/span&gt;
	&lt;span class=&quot;nx&quot;&gt;reconstructPath&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;cameFrom&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;currentI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;counter&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;path&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[];&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;currentI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;while&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;currentI&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;!==&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;startI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;nx&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;currentI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;nx&quot;&gt;currentI&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;cameFrom&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;currentI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;];&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;counter&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;++&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;999999&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;startI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;nodesI&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;Array&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;length&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;length&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;++&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;nx&quot;&gt;nodesI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;length&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;];&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;nodesI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; 
&lt;span class=&quot;c1&quot;&gt;// }&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Let’s test the code:&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;
&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;dim&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;51&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;lookup&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;getElementsByClassName&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;col-block&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;pathfinding&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;GridPath&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;dim&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;dim&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;canvas&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;getElementById&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;ctx&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;canvas&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;getContext&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;2d&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;window&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;addEventListener&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;mousemove&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;pos&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;getMousePos&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;canvas&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;pos&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;y&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;pos&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;y&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;y&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;dim&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;y&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;dim&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;y&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;dim&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;mi&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;Math&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;round&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;dim&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;dim&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;nodes&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;pathfinding&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;find&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;mi&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[];&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;bw&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;canvas&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;width&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;dim&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;bh&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;canvas&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;height&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;dim&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;ctx&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;clearRect&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;canvas&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;canvas&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;k&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;k&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;nodes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;length&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;++&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;ctx&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;fillRect&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;nodes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;dim&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;bw&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;Math&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;floor&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;nodes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;dim&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;bh&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;bw&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;bh&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;

&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;getMousePos&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;canvas&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;evt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;rect&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;canvas&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;getBoundingClientRect&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;Math&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;round&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;evt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;clientX&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;rect&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;left&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;canvas&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;width&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;dim&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;canvas&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;width&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;dim&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;y&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;Math&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;round&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;evt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;clientY&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;rect&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;top&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;canvas&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;height&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;dim&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;canvas&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;height&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;dim&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p data-height=&quot;265&quot; data-theme-id=&quot;0&quot; data-slug-hash=&quot;aQojMo&quot; data-default-tab=&quot;js,result&quot; data-user=&quot;Afirus&quot; data-pen-title=&quot;Grid Pathfinding&quot; class=&quot;codepen&quot;&gt;See the Pen &lt;a href=&quot;https://codepen.io/Afirus/pen/aQojMo/&quot;&gt;Grid Pathfinding&lt;/a&gt; by sempostma (&lt;a href=&quot;https://codepen.io/Afirus&quot;&gt;@Afirus&lt;/a&gt;) on &lt;a href=&quot;https://codepen.io&quot;&gt;CodePen&lt;/a&gt;.&lt;/p&gt;
&lt;script async=&quot;&quot; src=&quot;https://static.codepen.io/assets/embed/ei.js&quot;&gt;&lt;/script&gt;

&lt;div class=&quot;affiliate&quot;&gt;
    &lt;h3&gt;Resources:&lt;/h3&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fjavascript-in-24-hours-sams-teach-yourself-9780672338090&quot;&gt;Javascript
            in 24 hours&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fhtml-css-and-javascript-all-in-one-covering-html5-css3-9780672338083&quot;&gt;HTML,
            CSS, ES6 all in one&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Flearning-react-a-hands-on-guide-to-building-web-applications-9780134843551&quot;&gt;A
            Hands-On Guide to Building Web Applications Using React&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Flearning-react-a-hands-on-guide-to-building-web-applications-9780134843551http%3A%2F%2Fwww.informit.com%2Fstore%2Flearning-regular-expressions-9780134757063&quot;&gt;Learning
            Regular Expressions&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fnode.js-mongodb-and-angular-web-development-the-definitive-9780134655536&quot;&gt;Node.js,
            MongoDB, and Angular web development&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;p&gt;&lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=145238.10000683&amp;amp;type=3&amp;amp;subid=0&quot;&gt;InformIT
            eBook Store&lt;/a&gt;&lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.10000683&amp;amp;type=3&amp;amp;subid=0&quot; /&gt;
        has a large number of ebooks on a wide range of topics. I would definitely recommend them.&lt;/p&gt;
    &lt;h3&gt;Great courses:&lt;/h3&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fjavascript-beginner.html&quot;&gt;Javascript
            for beginners in 3 hours&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fjavascript-basics-web-development-building-blocks.html&quot;&gt;Javascript
            basic web development building blocks&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fmobile-ui-and-ux-design.html&quot;&gt;Mobile
            UI and UX Design&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fmobile-ui-and-ux-design.htmlhttps%3A%2F%2Fwww.quickstart.com%2Fbuilding-web-applications-with-react.html&quot;&gt;Building
            web applications with react&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fstarting-with-angular-4.html&quot;&gt;Starting
            with angular 4&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fprogramming-in-c-ms-20483.html&quot;&gt;Programming
            in C#&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt; (recommended)
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Ffind-training%2Ftraining-by-topic%2Fapp-development%2Fweb-development.html&quot;&gt;More
            web development courses&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;p&gt;
        &lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=579862.416&amp;amp;type=3&amp;amp;subid=0&quot;&gt;Quickstart
        &lt;/a&gt;&lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.416&amp;amp;type=3&amp;amp;subid=0&quot; /&gt;
        offers a large amount of (online) courses on web development (&lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=579862.416&amp;amp;type=3&amp;amp;subid=0&quot;&gt;Use
            Code LSOFF50&lt;/a&gt;&lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.416&amp;amp;type=3&amp;amp;subid=0&quot; /&gt;
        to get 50% off ;p)
    &lt;/p&gt;
&lt;/div&gt;</content>

      
      
      
      
      

      <author>
          <name>Sem Postma</name>
        
        
      </author>

      

      

      
        <summary type="html">Because we’ll be using binary heaps (min heap) in this tutorial I would recommend this tutorial on implementing binary heaps with javascript.</summary>
      

      
      
        
        <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://esstudio.site/uploads/download.png" />
      
    </entry>
  
    
    
    <entry>
      <title type="html">html2js-loader tutorial</title>
      <link href="https://esstudio.site/2018/11/14/html2js-loader-tutorial.html" rel="alternate" type="text/html" title="html2js-loader tutorial" />
      <published>2018-11-14T13:35:00+01:00</published>
      <updated>2018-11-14T13:35:00+01:00</updated>
      <id>https://esstudio.site/2018/11/14/html2js-loader-tutorial</id>
      <content type="html" xml:base="https://esstudio.site/2018/11/14/html2js-loader-tutorial.html">&lt;p&gt;This tutorial covers how you set up the html2js-loader and webpack. If you don’t know what html2js does, you can read &lt;a href=&quot;https://esstudio.site/2018/11/14/html2js-loader.html&quot;&gt;this blog post&lt;/a&gt; or use the &lt;a href=&quot;https://html2js.esstudio.site/&quot;&gt;online converter tool&lt;/a&gt;.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/sempostma/html2js-loader&quot;&gt;Github repo&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.npmjs.com/package/html2js-loader&quot;&gt;NPM package&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To get started you can use the following instructions.&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;npm init
npm i &lt;span class=&quot;nt&quot;&gt;-D&lt;/span&gt; html2js-loader webpack webpack-cli
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;or clone the tutorial repository.&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;git clone https://github.com/sempostma/html2js-loader-demo-tutorial.git
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;When the loader and webpack have finished installing, add the following line to your scripts:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&quot;scripts&quot;: {
    &quot;start&quot;: &quot;webpack --config webpack.config.js --watch&quot;
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Create a “webpack.config.js” file.&lt;/p&gt;

&lt;div class=&quot;language-js highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c1&quot;&gt;// webpack.config.js&lt;/span&gt;

&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;path&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;require&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

&lt;span class=&quot;nx&quot;&gt;module&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;exports&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;context&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;__dirname&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;entry&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;resolve&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;__dirname&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;src/index&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;mode&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;development&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;output&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;resolve&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;__dirname&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;dist&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;filename&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;bundle.js&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;module&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;rules&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[{&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;test&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sr&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\.&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;html$/&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;use&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;na&quot;&gt;loader&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;html2js-loader&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                &lt;span class=&quot;na&quot;&gt;options&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                    &lt;span class=&quot;c1&quot;&gt;// defaults:&lt;/span&gt;

                    &lt;span class=&quot;c1&quot;&gt;// trimWhitespace: false,&lt;/span&gt;
                    &lt;span class=&quot;c1&quot;&gt;// removeComments: false,&lt;/span&gt;
                    &lt;span class=&quot;c1&quot;&gt;// skipEmptyTextNodes: false&lt;/span&gt;
                &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}]&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Now create a folder called “dist” and add an “index.html” file:&lt;/p&gt;

&lt;div class=&quot;language-html highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;&amp;lt;!-- dist/index.html --&amp;gt;&lt;/span&gt;

&lt;span class=&quot;cp&quot;&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;html&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;lang=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;en&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;meta&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;charset=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;meta&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;name=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;viewport&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;content=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;width=device-width, initial-scale=1.0&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;meta&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;http-equiv=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;X-UA-Compatible&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;content=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;ie=edge&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;title&amp;gt;&lt;/span&gt;html2js loader tutorial&lt;span class=&quot;nt&quot;&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
    
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;script &lt;/span&gt;&lt;span class=&quot;na&quot;&gt;src=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;bundle.js&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Also, add a folder “src” with a “index.js” file, containing:&lt;/p&gt;

&lt;div class=&quot;language-js highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c1&quot;&gt;// src/index.js&lt;/span&gt;

&lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;write&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;lt;h1&amp;gt;Hello World&amp;lt;/h1&amp;gt;&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;That’s it, we’re finished setting up the project, you can run “npm start” to watch for changes and build your project.&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;npm start
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Open the “index.html” file in your favorite browser (for example chrome) and you should see the text “Hello World”.&lt;/p&gt;

&lt;p&gt;To use the loader we create an html file in the src folder (I’m going to call it “posts.html” with the following content).&lt;/p&gt;

&lt;div class=&quot;language-html highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;&amp;lt;!-- src/posts.html --&amp;gt;&lt;/span&gt;

&lt;span class=&quot;nt&quot;&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Blog Posts&lt;span class=&quot;nt&quot;&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;

&lt;span class=&quot;nt&quot;&gt;&amp;lt;section&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;posts&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;itemscope&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;itemtype=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://schema.org/Blog&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;article&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;itemprop=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;blogPost&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;img&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;post-image&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;itemprop=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;image&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;src=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;https://esstudio.site/uploads/simple%20draggable%20elements2.gif&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;alt=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&amp;amp;quot;Create draggable elements with Javascript&amp;amp;quot; Thumbnail&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;h2&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;post-title&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;Create draggable elements with Javascript&lt;span class=&quot;nt&quot;&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;p&amp;gt;&amp;lt;small&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;post-date&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;01 NOVEMBER 2018&lt;span class=&quot;nt&quot;&gt;&amp;lt;/small&amp;gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;a&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;target=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;_blank&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;href=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;https://esstudio.site/2018/11/01/create-draggable-elements-with-javascript.html&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;View
            more...&lt;span class=&quot;nt&quot;&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;/article&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;article&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;itemprop=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;blogPost&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;img&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;post-image&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;itemprop=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;image&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;src=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;https://esstudio.site/uploads/giphy.gif&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;alt=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&amp;amp;quot;Lazy loading images with Javascript&amp;amp;quot; Thumbnail&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;h2&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;post-title&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;Lazy loading images with Javascript&lt;span class=&quot;nt&quot;&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;p&amp;gt;&amp;lt;small&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;post-date&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;01 NOVEMBER 2018&lt;span class=&quot;nt&quot;&gt;&amp;lt;/small&amp;gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;a&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;target=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;_blank&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;href=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;https://esstudio.site/2018/11/01/lazyloading-images-with-javascript.html&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;View more...&lt;span class=&quot;nt&quot;&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;/article&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;article&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;itemprop=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;blogPost&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;img&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;post-image&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;itemprop=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;image&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;src=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;https://esstudio.site/uploads/binaryheap.png&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;alt=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&amp;amp;quot;Implementing Binary Heaps with Javascript&amp;amp;quot; Thumbnail&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;h2&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;post-title&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;Implementing Binary Heaps with Javascript&lt;span class=&quot;nt&quot;&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;p&amp;gt;&amp;lt;small&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;post-date&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;31 OCTOBER 2018&lt;span class=&quot;nt&quot;&gt;&amp;lt;/small&amp;gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;a&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;target=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;_blank&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;href=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;https://esstudio.site/2018/10/31/implementing-binary-heaps-with-javascript.html&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;View
            more...&lt;span class=&quot;nt&quot;&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;/article&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;article&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;itemprop=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;blogPost&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;img&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;post-image&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;itemprop=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;image&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;src=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;https://esstudio.site/uploads/rssreader.jpg&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;alt=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&amp;amp;quot;Creating an Atom feed reader with Javascript&amp;amp;quot; Thumbnail&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;h2&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;post-title&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;Creating an Atom feed reader with Javascript&lt;span class=&quot;nt&quot;&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;p&amp;gt;&amp;lt;small&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;post-date&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;30 OCTOBER 2018&lt;span class=&quot;nt&quot;&gt;&amp;lt;/small&amp;gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;a&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;target=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;_blank&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;href=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;https://esstudio.site/2018/10/30/creating-an-atom-feed-reader-with-javascript.html&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;View
            more...&lt;span class=&quot;nt&quot;&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;/article&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/section&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Let’s open “src/index.js” and replace the previous content with:&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c1&quot;&gt;// src/index.js&lt;/span&gt;

&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;createPosts&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;require&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;./posts.html&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

&lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;body&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;appendChild&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;createPosts&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;());&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Some optional CSS:&lt;/p&gt;

&lt;div class=&quot;language-css highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;/* dist/style.css */&lt;/span&gt;

&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;box-sizing&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;border-box&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;nt&quot;&gt;html&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;font-family&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;sans-serif&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;nt&quot;&gt;article&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;25%&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;float&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;left&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;padding&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;10px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;nt&quot;&gt;img&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;max-width&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;100%&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;nt&quot;&gt;h1&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;padding&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;10px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;@media&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;screen&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;max-width&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;1000px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;article&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;nl&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;50%&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;@media&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;screen&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;max-width&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;500px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;article&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;nl&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;100%&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;affiliate&quot;&gt;
    &lt;h3&gt;Resources:&lt;/h3&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fjavascript-in-24-hours-sams-teach-yourself-9780672338090&quot;&gt;Javascript
            in 24 hours&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fhtml-css-and-javascript-all-in-one-covering-html5-css3-9780672338083&quot;&gt;HTML,
            CSS, ES6 all in one&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Flearning-react-a-hands-on-guide-to-building-web-applications-9780134843551&quot;&gt;A
            Hands-On Guide to Building Web Applications Using React&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Flearning-react-a-hands-on-guide-to-building-web-applications-9780134843551http%3A%2F%2Fwww.informit.com%2Fstore%2Flearning-regular-expressions-9780134757063&quot;&gt;Learning
            Regular Expressions&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fnode.js-mongodb-and-angular-web-development-the-definitive-9780134655536&quot;&gt;Node.js,
            MongoDB, and Angular web development&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;p&gt;&lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=145238.10000683&amp;amp;type=3&amp;amp;subid=0&quot;&gt;InformIT
            eBook Store&lt;/a&gt;&lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.10000683&amp;amp;type=3&amp;amp;subid=0&quot; /&gt;
        has a large number of ebooks on a wide range of topics. I would definitely recommend them.&lt;/p&gt;
    &lt;h3&gt;Great courses:&lt;/h3&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fjavascript-beginner.html&quot;&gt;Javascript
            for beginners in 3 hours&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fjavascript-basics-web-development-building-blocks.html&quot;&gt;Javascript
            basic web development building blocks&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fmobile-ui-and-ux-design.html&quot;&gt;Mobile
            UI and UX Design&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fmobile-ui-and-ux-design.htmlhttps%3A%2F%2Fwww.quickstart.com%2Fbuilding-web-applications-with-react.html&quot;&gt;Building
            web applications with react&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fstarting-with-angular-4.html&quot;&gt;Starting
            with angular 4&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fprogramming-in-c-ms-20483.html&quot;&gt;Programming
            in C#&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt; (recommended)
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Ffind-training%2Ftraining-by-topic%2Fapp-development%2Fweb-development.html&quot;&gt;More
            web development courses&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;p&gt;
        &lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=579862.416&amp;amp;type=3&amp;amp;subid=0&quot;&gt;Quickstart
        &lt;/a&gt;&lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.416&amp;amp;type=3&amp;amp;subid=0&quot; /&gt;
        offers a large amount of (online) courses on web development (&lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=579862.416&amp;amp;type=3&amp;amp;subid=0&quot;&gt;Use
            Code LSOFF50&lt;/a&gt;&lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.416&amp;amp;type=3&amp;amp;subid=0&quot; /&gt;
        to get 50% off ;p)
    &lt;/p&gt;
&lt;/div&gt;</content>

      
      
      
      
      

      <author>
          <name>Sem Postma</name>
        
        
      </author>

      

      

      
        <summary type="html">This tutorial covers how you set up the html2js-loader and webpack. If you don’t know what html2js does, you can read this blog post or use the online converter tool.</summary>
      

      
      
        
        <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://esstudio.site/uploads/tut.PNG" />
      
    </entry>
  
    
    
    <entry>
      <title type="html">html2js-loader</title>
      <link href="https://esstudio.site/2018/11/14/html2js-loader.html" rel="alternate" type="text/html" title="html2js-loader" />
      <published>2018-11-14T12:32:00+01:00</published>
      <updated>2018-11-14T12:32:00+01:00</updated>
      <id>https://esstudio.site/2018/11/14/html2js-loader</id>
      <content type="html" xml:base="https://esstudio.site/2018/11/14/html2js-loader.html">&lt;p&gt;Exports HTML to javascript instructions. Create javascript functions from HTML templates.&lt;/p&gt;

&lt;p&gt;Dynammicly creating HTML in javascript is actually quiete easy right? You just save the html as a string and use “.innerHTML” to insert it into the document. Well, if you’re doing that a lot it can get slow. The browser has to parse the HTML string everytime. This also means that you’re putting HTML snippets in you’re javascript code, which violates the “separation of concerns” priniciple. Putting HTML strings in your javascript also prevents you’re editor/IDE from giving intellisense, code-completion, linting, etc. A solution would be to convert these html strings to javascript instructions:&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c1&quot;&gt;// from&lt;/span&gt;

&lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;querySelector&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;#some-selector&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;innerHTML&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;`
&amp;lt;article&amp;gt;
	&amp;lt;h2&amp;gt;My dynamically generated html&amp;lt;/h2&amp;gt;
&amp;lt;/article&amp;gt;`&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c1&quot;&gt;// to &lt;/span&gt;

&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;container&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;querySelector&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;#some-selector&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;article&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;createElement&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;article&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;h2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;createElement&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;h2&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;h2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;innerText&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;My dynamically generated html&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;article&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;appendChild&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;h2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;container&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;appendChild&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;article&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Although this is faster, this kind of code can become long, unclear, tedious and difficult to maintain. You will also need to use document fragments if you’re doing this in a loop because adding an element to the DOM every time you iterate through a loop can be even more expensive than setting the “.innerHTML” of the container in the first place. Why can’t we write like this:&lt;/p&gt;

&lt;div class=&quot;language-html highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;&amp;lt;!-- template.html --!&amp;gt;

&amp;lt;article&amp;gt;
	&amp;lt;h2&amp;gt;My dynamically generated html&amp;lt;/h2&amp;gt;
&amp;lt;/article&amp;gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;createArticle&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;require&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;./template.html&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// or import createArticle from &apos;./template.html&apos;;&lt;/span&gt;

&lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;querySelector&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;#some-selector&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;innerHTML&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;createArticle&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This combines the best of both worlds. It’s easy to maintain, easy to read and fast. If you’re not using a fancy build tool like webpack can copy &lt;a href=&quot;https://github.com/sempostma/html2js/blob/master/src/index.js&quot;&gt;this code snippet&lt;/a&gt; and implement it yourself. You can also use &lt;a href=&quot;this&quot;&gt;https://html2js.esstudio.site&lt;/a&gt; online converter if you just need to convert once.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://www.npmjs.com/package/html2js-loader&quot;&gt;&lt;img src=&quot;/uploads/npm.png&quot; alt=&quot;npm&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;install&quot;&gt;Install&lt;/h2&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;npm i &lt;span class=&quot;nt&quot;&gt;-D&lt;/span&gt; html2js-loader
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;usage&quot;&gt;Usage&lt;/h2&gt;

&lt;p&gt;Add the html2js-loader to your webpack.config.js.&lt;/p&gt;

&lt;div class=&quot;language-js highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;test&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sr&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\.&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;html$/&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;use&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;loader&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;html2js-loader&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;options&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{}&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Now, simply import/require any html. For example:&lt;/p&gt;

&lt;div class=&quot;language-html highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;&amp;lt;!-- templates/list.html --&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;ul&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;role=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;list&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;li&amp;gt;&lt;/span&gt;Item one&lt;span class=&quot;nt&quot;&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;li&amp;gt;&lt;/span&gt;Item two&lt;span class=&quot;nt&quot;&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;li&amp;gt;&lt;/span&gt;Item three&lt;span class=&quot;nt&quot;&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/ul&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-js highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;createList&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;require&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;./templates/list.html&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

&lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;body&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;appendChild&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;createList&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;());&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;this will be converted to the following javascript:&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;  &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;createNode&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;e_0&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;createElement&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;ul&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;e_0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;setAttribute&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;role&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;list&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;e_1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;createElement&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;li&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;e_1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;appendChild&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;createTextNode&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;Item one&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;));&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;e_0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;appendChild&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e_1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;e_2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;createElement&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;li&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;e_2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;appendChild&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;createTextNode&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;Item two&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;));&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;e_0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;appendChild&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e_2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;e_3&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;createElement&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;li&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;e_3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;appendChild&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;createTextNode&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;Item three&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;));&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;e_0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;appendChild&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e_3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;e_0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;You can use this online tool: &lt;a href=&quot;https://html2js.esstudio.site&quot;&gt;html2js.esstudio.site&lt;/a&gt; which will convert your html to javascript on the fly.&lt;/p&gt;

&lt;p&gt;The loader will optimize this code by injecting the following base code into your bundle:&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nx&quot;&gt;module&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;exports&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;document_createDocumentFragment&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;createDocumentFragment&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;document_createElement&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;createElement&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;document_createTextNode&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;text&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;createTextNode&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;appendChild&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;parent&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;child&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;parent&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;appendChild&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;child&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;setAttribute&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;elem&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;elem&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;setAttribute&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This will enable the compiler to name mangle these function calls. For example, if we convert the following html:&lt;/p&gt;

&lt;div class=&quot;language-html highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;ul&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;role=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;list&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;li&amp;gt;&lt;/span&gt;Item one&lt;span class=&quot;nt&quot;&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;li&amp;gt;&lt;/span&gt;Item two&lt;span class=&quot;nt&quot;&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;li&amp;gt;&lt;/span&gt;Item three&lt;span class=&quot;nt&quot;&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/ul&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;That will produce the following minified base code (this will only be included once):&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;createElement&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)},&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;b&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;createTextNode&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)},&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;setAttribute&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)},&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;d&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;appendChild&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And the following minified javascript instructions for the html template:&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;ul&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;role&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;list&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;li&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;d&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;b&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;Item one&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;));&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;d&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;li&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;d&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;b&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;Item two&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;));&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;d&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;li&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;d&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;b&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;Item three&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;));&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;d&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;affiliate&quot;&gt;
    &lt;h3&gt;Resources:&lt;/h3&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fjavascript-in-24-hours-sams-teach-yourself-9780672338090&quot;&gt;Javascript
            in 24 hours&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fhtml-css-and-javascript-all-in-one-covering-html5-css3-9780672338083&quot;&gt;HTML,
            CSS, ES6 all in one&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Flearning-react-a-hands-on-guide-to-building-web-applications-9780134843551&quot;&gt;A
            Hands-On Guide to Building Web Applications Using React&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Flearning-react-a-hands-on-guide-to-building-web-applications-9780134843551http%3A%2F%2Fwww.informit.com%2Fstore%2Flearning-regular-expressions-9780134757063&quot;&gt;Learning
            Regular Expressions&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fnode.js-mongodb-and-angular-web-development-the-definitive-9780134655536&quot;&gt;Node.js,
            MongoDB, and Angular web development&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;p&gt;&lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=145238.10000683&amp;amp;type=3&amp;amp;subid=0&quot;&gt;InformIT
            eBook Store&lt;/a&gt;&lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.10000683&amp;amp;type=3&amp;amp;subid=0&quot; /&gt;
        has a large number of ebooks on a wide range of topics. I would definitely recommend them.&lt;/p&gt;
    &lt;h3&gt;Great courses:&lt;/h3&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fjavascript-beginner.html&quot;&gt;Javascript
            for beginners in 3 hours&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fjavascript-basics-web-development-building-blocks.html&quot;&gt;Javascript
            basic web development building blocks&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fmobile-ui-and-ux-design.html&quot;&gt;Mobile
            UI and UX Design&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fmobile-ui-and-ux-design.htmlhttps%3A%2F%2Fwww.quickstart.com%2Fbuilding-web-applications-with-react.html&quot;&gt;Building
            web applications with react&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fstarting-with-angular-4.html&quot;&gt;Starting
            with angular 4&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fprogramming-in-c-ms-20483.html&quot;&gt;Programming
            in C#&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt; (recommended)
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Ffind-training%2Ftraining-by-topic%2Fapp-development%2Fweb-development.html&quot;&gt;More
            web development courses&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;p&gt;
        &lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=579862.416&amp;amp;type=3&amp;amp;subid=0&quot;&gt;Quickstart
        &lt;/a&gt;&lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.416&amp;amp;type=3&amp;amp;subid=0&quot; /&gt;
        offers a large amount of (online) courses on web development (&lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=579862.416&amp;amp;type=3&amp;amp;subid=0&quot;&gt;Use
            Code LSOFF50&lt;/a&gt;&lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.416&amp;amp;type=3&amp;amp;subid=0&quot; /&gt;
        to get 50% off ;p)
    &lt;/p&gt;
&lt;/div&gt;</content>

      
      
      
      
      

      <author>
          <name>Sem Postma</name>
        
        
      </author>

      

      

      
        <summary type="html">Exports HTML to javascript instructions. Create javascript functions from HTML templates.</summary>
      

      
      
        
        <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://esstudio.site/uploads/android-chrome-256x256.png" />
      
    </entry>
  
    
    
    <entry>
      <title type="html">Kadaster Online</title>
      <link href="https://esstudio.site/2018/11/07/kadaster-online.html" rel="alternate" type="text/html" title="Kadaster Online" />
      <published>2018-11-07T17:34:00+01:00</published>
      <updated>2018-11-07T17:34:00+01:00</updated>
      <id>https://esstudio.site/2018/11/07/kadaster-online</id>
      <content type="html" xml:base="https://esstudio.site/2018/11/07/kadaster-online.html">&lt;p&gt;Met &lt;a href=&quot;https://esstudio.site/kadaster-app&quot;&gt;deze gratis kadastrale kaart&lt;/a&gt; van nederland kun je heel makkelijk kadaster en BAG (Basisregistraties adressen en gebouwen) informatie opzoeken. De informatie komt rechtstreeks van het kadaster systeem door gebruik te maken van het geodata bestand van &lt;a href=&quot;https://www.nationaalregister.nl/&quot;&gt;het nationaal register&lt;/a&gt;. Op de kadaster kaart kun je de volgende informatie vinden:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Perceelgrenzen&lt;/li&gt;
  &lt;li&gt;Perceelnummers&lt;/li&gt;
  &lt;li&gt;Straatnamen en huisnummers&lt;/li&gt;
  &lt;li&gt;Kadastrale grootte&lt;/li&gt;
  &lt;li&gt;Tijdstip van ontstaan&lt;/li&gt;
  &lt;li&gt;Perceel nummer&lt;/li&gt;
  &lt;li&gt;Gemeente&lt;/li&gt;
  &lt;li&gt;Lengte en breedtegraad&lt;/li&gt;
  &lt;li&gt;Panden die zich in het perceel bevinden&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;/uploads/esstudio.site_kadaster-app_(Nexus 6) (1).png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Over panden kun je ook nog deze informatie vinden:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Gebruiksdoel van het pand&lt;/li&gt;
  &lt;li&gt;Bouwjaar&lt;/li&gt;
  &lt;li&gt;Status van het pand&lt;/li&gt;
  &lt;li&gt;Oppervlakte&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Ook kun je informatie over verblijfplaatsen vinden, zoals huisletter, huisnummer, oppervlakte, etc.&lt;/p&gt;

&lt;p&gt;Ook kun je informatie vinden over ligplaatsen, woonplaatsen, en standplaatsen.&lt;/p&gt;

&lt;p&gt;Deze app kan voor veel verschillende doeleinden handig zijn. Voor bedrijven om gemakkelijk toegang te hebben tot deze dataset, maar je kunt ook gewoon even kijken wat de oppervlakte van het huis van de buren is.&lt;/p&gt;

&lt;div class=&quot;app-portal&quot; style=&quot;width: 400px; max-width: 100%; padding: 10px&quot;&gt;
    &lt;img src=&quot;https://esstudio.site/uploads/magnifying-glass.png&quot; alt=&quot;&quot; style=&quot;max-width: 50%; margin: 20px auto&quot; /&gt;
    &lt;h1&gt;Kadaster Kaart&lt;/h1&gt;
    &lt;p&gt;Met de Kadaster kaart app/website kunt u gemakkelijk informatie opzoeken over percelen die geregistreerd staan bij het Kadaster.&lt;/p&gt;
    &lt;a class=&quot;btn&quot; href=&quot;https://esstudio.site/kadaster-app&quot;&gt;
        &lt;span&gt;Launch&lt;/span&gt;
        &lt;svg viewBox=&quot;0 0 10 18&quot; style=&quot;height: 1.2em&quot;&gt;&lt;path d=&quot;m0.8,1l8,8l-8,8&quot; fill=&quot;none&quot; stroke-width=&quot;2&quot; style=&quot;stroke: currentColor;&quot; /&gt;&lt;/svg&gt;
    &lt;/a&gt;
&lt;/div&gt;

&lt;p&gt;Er is ook een app versie beschikbaar via &lt;a href=&quot;https://play.google.com/store/apps/details?id=com.EchoSierraStudio.Kadaster_Kaart&quot;&gt;google play&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Laatste veranderingen:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;App neemt 20% minder opslag ruimte op!&lt;/li&gt;
  &lt;li&gt;Zoom toast is verwijderd&lt;/li&gt;
  &lt;li&gt;Automatische zoom naar kadaster raster hoogte&lt;/li&gt;
  &lt;li&gt;Kleine UI fixes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Deze applicatie is open source en kan &lt;a href=&quot;https://github.com/sempostma/kadaster-app&quot;&gt;hier op Github&lt;/a&gt; gevonden worden.&lt;/p&gt;

&lt;!-- Place this tag where you want the button to render. --&gt;
&lt;p&gt;&lt;a class=&quot;github-button&quot; href=&quot;https://github.com/sempostma/kadaster-app&quot; data-icon=&quot;octicon-star&quot; data-show-count=&quot;true&quot; aria-label=&quot;Star sempostma/kadaster-app on GitHub&quot;&gt;Star&lt;/a&gt;
&lt;!-- Place this tag where you want the button to render. --&gt;
&lt;a class=&quot;github-button&quot; href=&quot;https://github.com/sempostma/kadaster-app/subscription&quot; data-icon=&quot;octicon-eye&quot; data-show-count=&quot;true&quot; aria-label=&quot;Watch sempostma/kadaster-app on GitHub&quot;&gt;Watch&lt;/a&gt;
&lt;!-- Place this tag where you want the button to render. --&gt;
&lt;a class=&quot;github-button&quot; href=&quot;https://github.com/sempostma&quot; data-show-count=&quot;true&quot; aria-label=&quot;Follow @sempostma on GitHub&quot;&gt;Follow @sempostma&lt;/a&gt;&lt;/p&gt;

&lt;script async=&quot;&quot; defer=&quot;&quot; src=&quot;https://buttons.github.io/buttons.js&quot;&gt;&lt;/script&gt;</content>

      
      
      
      
      

      <author>
          <name>Sem Postma</name>
        
        
      </author>

      

      

      
        <summary type="html">Met deze gratis kadastrale kaart van nederland kun je heel makkelijk kadaster en BAG (Basisregistraties adressen en gebouwen) informatie opzoeken. De informatie komt rechtstreeks van het kadaster systeem door gebruik te maken van het geodata bestand van het nationaal register. Op de kadaster kaart kun je de volgende informatie vinden:</summary>
      

      
      
        
        <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://esstudio.site/uploads/esstudio.site_kadaster-app_(Nexus%206).png" />
      
    </entry>
  
    
    
    <entry>
      <title type="html">Create draggable elements with Javascript</title>
      <link href="https://esstudio.site/2018/11/01/create-draggable-elements-with-javascript.html" rel="alternate" type="text/html" title="Create draggable elements with Javascript" />
      <published>2018-11-01T20:26:00+01:00</published>
      <updated>2018-11-01T20:26:00+01:00</updated>
      <id>https://esstudio.site/2018/11/01/create-draggable-elements-with-javascript</id>
      <content type="html" xml:base="https://esstudio.site/2018/11/01/create-draggable-elements-with-javascript.html">&lt;p&gt;There are a lot of libraries that offer this type of functionally but this often means, loading hundreds of kilobytes of Javascript and CSS. I my case I justed wanted simple sticky note functionally. I want a draggable element and a “dragger” handle with which I can drag the element. It had to be simple and flexible, extendible, no initialization code, it had to have support for nested draggables and should always stay within the parent element (the draggable area).&lt;/p&gt;

&lt;h3 id=&quot;the-html&quot;&gt;The HTML&lt;/h3&gt;

&lt;p&gt;Let’s begin with creating the draggable area. We will give it a height of 340px, and a border. This makes it easier for the user to see the bounds of the draggable area. The only required elements are: An element with the class “draggable” and within it an element with the class “dragger”.&lt;/p&gt;

&lt;div class=&quot;language-html highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;div&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;style=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;height: 340px; border: 1px solid #ccc&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;div&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;draggable&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;div&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;dragger&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Some content for the draggable sticky note.&lt;span class=&quot;nt&quot;&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Because there is no initialization code, you can dynamically add these elements and it will just work.&lt;/p&gt;

&lt;p&gt;&lt;ins class=&quot;adsbygoogle&quot; style=&quot;display:block&quot; data-ad-client=&quot;ca-pub-9732535637352249&quot; data-ad-slot=&quot;6033478353&quot; data-ad-format=&quot;auto&quot; data-full-width-responsive=&quot;true&quot;&gt;&lt;/ins&gt;
&lt;script&gt;	
(adsbygoogle = window.adsbygoogle || []).push({});	
&lt;/script&gt;&lt;/p&gt;

&lt;h3 id=&quot;the-css&quot;&gt;The CSS&lt;/h3&gt;

&lt;p&gt;Here are the CSS rules that I used. The only required rules are that a “.draggable” must have the “position” rule set to “relative” or “absolute”. This is because we will manipulate the “left” and “top” CSS rules. If you have multiple draggable elements and you’re using “position: absolute”, the elements will initially overlap. And if you haven’t set a fixed height for the draggable area, the draggable area will collapse to “height = 0” and your draggable elements will not be visible/work. If you don’t understand position absolute or position relative, you can check out the &lt;a href=&quot;https://www.w3schools.com/css/css_positioning.asp&quot;&gt;W3Schools tutorial on CSS Layout&lt;/a&gt;.&lt;/p&gt;

&lt;div class=&quot;language-css highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nc&quot;&gt;.draggable&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;300px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;200px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;background&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;#ccc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;position&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;relative&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;nc&quot;&gt;.draggable.dragging&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;py&quot;&gt;user-select&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;none&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;nc&quot;&gt;.dragger&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;30px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;background&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;#555&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;nc&quot;&gt;.dragger&lt;/span&gt;&lt;span class=&quot;nd&quot;&gt;::before&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;content&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&quot;window&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;#fff&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;margin&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;5px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;display&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;inline-block&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;the-javascript&quot;&gt;The Javascript&lt;/h3&gt;

&lt;p&gt;Finally, the Javascript. If you don’t want to create global variables you can wrap the code in an iffy: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;(function(){&amp;lt;code&amp;gt;})()&lt;/code&gt;. This is called an immediately-invoked function expression (or IIFE, pronounced “iffy”).&lt;/p&gt;

&lt;p&gt;Let’s start by listening for “mousedown” events. Then we loop through the event path to see if we clicked on the “dragger” element (the handle). Then we continue until we find the draggable element. We save the draggable element to the variable “target” and save the cursor position relative to the target position (the “left” and “right” CSS rules). We use slice to get rid of the “px” at the end of the CSS rule (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&quot;100px&quot;.slice(0, -2) === &quot;100&quot;&lt;/code&gt;). If the CSS rule string is an empty string the minus operator will type coerce it to zero.&lt;/p&gt;

&lt;p&gt;&lt;ins class=&quot;adsbygoogle&quot; style=&quot;display:block&quot; data-ad-client=&quot;ca-pub-9732535637352249&quot; data-ad-slot=&quot;6033478353&quot; data-ad-format=&quot;auto&quot; data-full-width-responsive=&quot;true&quot;&gt;&lt;/ins&gt;
&lt;script&gt;	
(adsbygoogle = window.adsbygoogle || []).push({});	
&lt;/script&gt;&lt;/p&gt;

&lt;p&gt;Now, let’s listen for the “mousemove” event. If the target is null we immediately return. If it’s not, we move the element using the CSS “top” and “left” rules. Then we check if the element is within the parent. If it’s not, we set change the position so it’s clamped inside the parent.&lt;/p&gt;

&lt;p&gt;We finish by adding a “mouseup” event and setting the target to null when we’ve stopped dragging.&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;y&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;target&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;addEventListener&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;mousedown&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;clickedDragger&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;!==&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;body&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;++&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;classList&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;contains&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;dragger&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;clickedDragger&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;clickedDragger&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;classList&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;contains&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;draggable&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;target&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;];&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;target&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;classList&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;add&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;dragging&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;clientX&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;target&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;style&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;left&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;slice&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;y&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;clientY&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;target&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;style&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;top&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;slice&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;

&lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;addEventListener&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;mouseup&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;target&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;!==&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;target&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;classList&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;remove&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;dragging&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;target&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;

&lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;addEventListener&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;mousemove&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;target&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;target&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;style&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;left&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;clientX&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;px&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;target&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;style&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;top&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;clientY&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;y&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;px&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;pRect&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;target&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;parentElement&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;getBoundingClientRect&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;tgtRect&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;target&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;getBoundingClientRect&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;

  &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;tgtRect&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;left&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;pRect&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;left&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;target&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;style&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;left&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;tgtRect&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;top&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;pRect&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;top&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;target&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;style&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;top&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;tgtRect&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;right&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;pRect&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;right&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;target&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;style&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;left&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;pRect&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;width&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;tgtRect&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;width&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;px&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;tgtRect&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;bottom&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;pRect&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;bottom&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;target&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;style&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;top&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;pRect&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;height&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;tgtRect&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;height&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;px&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;the-full-example&quot;&gt;The full example&lt;/h3&gt;

&lt;p data-height=&quot;414&quot; data-theme-id=&quot;0&quot; data-slug-hash=&quot;rqXxQy&quot; data-default-tab=&quot;js,result&quot; data-user=&quot;Afirus&quot; data-pen-title=&quot;Simple Draggable Elements&quot; class=&quot;codepen&quot;&gt;See the Pen &lt;a href=&quot;https://codepen.io/Afirus/pen/rqXxQy/&quot;&gt;Simple Draggable Elements&lt;/a&gt; by sempostma (&lt;a href=&quot;https://codepen.io/Afirus&quot;&gt;@Afirus&lt;/a&gt;) on &lt;a href=&quot;https://codepen.io&quot;&gt;CodePen&lt;/a&gt;.&lt;/p&gt;
&lt;script async=&quot;&quot; src=&quot;https://static.codepen.io/assets/embed/ei.js&quot;&gt;&lt;/script&gt;

&lt;div class=&quot;affiliate&quot;&gt;
    &lt;h3&gt;Resources:&lt;/h3&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fjavascript-in-24-hours-sams-teach-yourself-9780672338090&quot;&gt;Javascript
            in 24 hours&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fhtml-css-and-javascript-all-in-one-covering-html5-css3-9780672338083&quot;&gt;HTML,
            CSS, ES6 all in one&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Flearning-react-a-hands-on-guide-to-building-web-applications-9780134843551&quot;&gt;A
            Hands-On Guide to Building Web Applications Using React&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Flearning-react-a-hands-on-guide-to-building-web-applications-9780134843551http%3A%2F%2Fwww.informit.com%2Fstore%2Flearning-regular-expressions-9780134757063&quot;&gt;Learning
            Regular Expressions&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fnode.js-mongodb-and-angular-web-development-the-definitive-9780134655536&quot;&gt;Node.js,
            MongoDB, and Angular web development&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;p&gt;&lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=145238.10000683&amp;amp;type=3&amp;amp;subid=0&quot;&gt;InformIT
            eBook Store&lt;/a&gt;&lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.10000683&amp;amp;type=3&amp;amp;subid=0&quot; /&gt;
        has a large number of ebooks on a wide range of topics. I would definitely recommend them.&lt;/p&gt;
    &lt;h3&gt;Great courses:&lt;/h3&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fjavascript-beginner.html&quot;&gt;Javascript
            for beginners in 3 hours&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fjavascript-basics-web-development-building-blocks.html&quot;&gt;Javascript
            basic web development building blocks&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fmobile-ui-and-ux-design.html&quot;&gt;Mobile
            UI and UX Design&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fmobile-ui-and-ux-design.htmlhttps%3A%2F%2Fwww.quickstart.com%2Fbuilding-web-applications-with-react.html&quot;&gt;Building
            web applications with react&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fstarting-with-angular-4.html&quot;&gt;Starting
            with angular 4&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fprogramming-in-c-ms-20483.html&quot;&gt;Programming
            in C#&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt; (recommended)
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Ffind-training%2Ftraining-by-topic%2Fapp-development%2Fweb-development.html&quot;&gt;More
            web development courses&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;p&gt;
        &lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=579862.416&amp;amp;type=3&amp;amp;subid=0&quot;&gt;Quickstart
        &lt;/a&gt;&lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.416&amp;amp;type=3&amp;amp;subid=0&quot; /&gt;
        offers a large amount of (online) courses on web development (&lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=579862.416&amp;amp;type=3&amp;amp;subid=0&quot;&gt;Use
            Code LSOFF50&lt;/a&gt;&lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.416&amp;amp;type=3&amp;amp;subid=0&quot; /&gt;
        to get 50% off ;p)
    &lt;/p&gt;
&lt;/div&gt;</content>

      
      
      
      
      

      <author>
          <name>Sem Postma</name>
        
        
      </author>

      

      

      
        <summary type="html">There are a lot of libraries that offer this type of functionally but this often means, loading hundreds of kilobytes of Javascript and CSS. I my case I justed wanted simple sticky note functionally. I want a draggable element and a “dragger” handle with which I can drag the element. It had to be simple and flexible, extendible, no initialization code, it had to have support for nested draggables and should always stay within the parent element (the draggable area).</summary>
      

      
      
        
        <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://esstudio.site/uploads/simple%20draggable%20elements2.gif" />
      
    </entry>
  
    
    
    <entry>
      <title type="html">Lazy loading images with Javascript</title>
      <link href="https://esstudio.site/2018/11/01/lazyloading-images-with-javascript.html" rel="alternate" type="text/html" title="Lazy loading images with Javascript" />
      <published>2018-11-01T01:00:00+01:00</published>
      <updated>2018-11-01T01:00:00+01:00</updated>
      <id>https://esstudio.site/2018/11/01/lazyloading-images-with-javascript</id>
      <content type="html" xml:base="https://esstudio.site/2018/11/01/lazyloading-images-with-javascript.html">&lt;p&gt;Lazy Loading doesn’t have to be hard. This is a very simple example/tutorial on how to do lazy loading. Lazy loading works best if you have to load in a lot of large images which slows down the page load.&lt;/p&gt;

&lt;p&gt;The only requirement for this implementation is, that you have to have to native image width and native image height. This can easily be done server-side.&lt;/p&gt;

&lt;h3 id=&quot;the-html&quot;&gt;The HTML&lt;/h3&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div class=&quot;language-html highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;img&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;500&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;data-width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;6000&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;data-height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;4000&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;data-src=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;www.example.com/image&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;implementation&quot;&gt;Implementation&lt;/h3&gt;

&lt;p&gt;Because we don’t want the page to wait until all images are loaded until showing the page, and we don’t want the layout to change every time an image is loaded in we have to set an initial width, you can also do this with CSS. You want the img element to have the correct size before the image is even loaded.&lt;/p&gt;

&lt;p&gt;&lt;ins class=&quot;adsbygoogle&quot; style=&quot;display:block&quot; data-ad-client=&quot;ca-pub-9732535637352249&quot; data-ad-slot=&quot;6033478353&quot; data-ad-format=&quot;auto&quot; data-full-width-responsive=&quot;true&quot;&gt;&lt;/ins&gt;
&lt;script&gt;	
(adsbygoogle = window.adsbygoogle || []).push({});	
&lt;/script&gt;&lt;/p&gt;

&lt;p&gt;Now we fill the image to it’s correct size using Javascript.&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;img&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;querySelector&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;img[data-src]&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;ratio&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;img&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;getAttribute&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;data-height&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;img&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;getAttribute&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;data-width&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;img&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;style&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;paddingTop&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;ratio&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;img&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;getBoundingClientRect&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;().&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;width&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;px&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;After adding some CSS we can see a grey box, the size of the image.&lt;/p&gt;

&lt;div class=&quot;language-css highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nt&quot;&gt;img&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;data-src&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;background&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;#aaa&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If you want a nice looking loading animation you can change it to:&lt;/p&gt;

&lt;div class=&quot;language-css highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nt&quot;&gt;img&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;data-src&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;background&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;#aaa&lt;/span&gt; &lt;span class=&quot;sx&quot;&gt;url(&apos;data:image/svg+xml;utf8,&amp;lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;38&quot; height=&quot;38&quot; viewBox=&quot;0 0 38 38&quot; stroke=&quot;#fff&quot; stroke-width=&quot;2&quot; fill=&quot;none&quot;&amp;gt;&amp;lt;circle stroke-opacity=&quot;.5&quot; cx=&quot;19&quot; cy=&quot;19&quot; r=&quot;18&quot;/&amp;gt;&amp;lt;path xmlns=&quot;http://www.w3.org/2000/svg&quot; d=&quot;M36 19c0-9.94-8.06-18-18-18&quot; transform=&quot;rotate(189.606 18 18)&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&quot;&amp;gt;&amp;lt;animateTransform attributeName=&quot;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;transform&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&quot; type=&quot;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;rotate&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&quot; from=&quot;&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;19&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;19&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&quot; to=&quot;&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;360&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;19&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;19&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&quot; dur=&quot;&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;1s&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&quot; repeatCount=&quot;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;indefinite&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;svg&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&amp;gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;no-repeat&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;center&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;center&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;But of course, we want to show the image so let’s change the javascript to the following. Basically we load another image in the background. Once it’s loaded we set it’s “src” to our initial image “src” and remove the padding which we used to fill the image initially.&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;img&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;querySelector&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;img[data-src]&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;ratio&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;img&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;getAttribute&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;data-height&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;img&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;getAttribute&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;data-width&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;img&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;style&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;paddingTop&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;ratio&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;img&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;getBoundingClientRect&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;().&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;width&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;px&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;lazy&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;Image&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;lazy&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onload&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;img&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;src&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;lazy&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;src&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;img&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;style&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;paddingTop&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;img&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;classList&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;remove&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;loading&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;img&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;classList&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;add&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;loaded&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;img&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;classList&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;add&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;loading&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;lazy&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;src&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;img&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;getAttribute&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;data-src&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;ins class=&quot;adsbygoogle&quot; style=&quot;display:block&quot; data-ad-client=&quot;ca-pub-9732535637352249&quot; data-ad-slot=&quot;6033478353&quot; data-ad-format=&quot;auto&quot; data-full-width-responsive=&quot;true&quot;&gt;&lt;/ins&gt;
&lt;script&gt;	
(adsbygoogle = window.adsbygoogle || []).push({});	
&lt;/script&gt;&lt;/p&gt;

&lt;p&gt;But what if we don’t want to start loading every image on the page in the background. Let’s say we only want to load in the images that are currently visible or we want to wait for some kind of event (click, load, DOMContentLoad, etc.).&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;img&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;querySelector&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;img[data-src]&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;ratio&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;img&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;getAttribute&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;data-height&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;img&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;getAttribute&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;data-width&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;img&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;style&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;paddingTop&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;ratio&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;img&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;getBoundingClientRect&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;().&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;width&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;px&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;lazy&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;Image&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;lazy&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onload&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;img&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;src&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;lazy&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;src&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;img&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;style&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;paddingTop&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;img&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;classList&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;remove&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;loading&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;img&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;classList&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;add&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;loaded&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;// Wait for some kind of event. In this example I&apos;m using &quot;window.load&quot;&lt;/span&gt;

&lt;span class=&quot;nb&quot;&gt;window&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;addEventListener&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;load&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;img&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;classList&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;add&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;loading&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;lazy&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;src&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;img&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;getAttribute&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;data-src&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt; 
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;We can wrap this code in a function and return the actual load callback. This makes it even easier.&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;lazyLoad&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;img&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;ratio&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;img&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;getAttribute&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;data-height&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;img&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;getAttribute&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;data-width&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;img&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;style&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;paddingTop&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;ratio&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;img&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;getBoundingClientRect&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;().&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;width&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;px&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;lazy&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;Image&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;lazy&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onload&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;img&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;src&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;lazy&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;src&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;img&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;style&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;paddingTop&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;img&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;classList&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;remove&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;loading&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;img&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;classList&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;add&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;loaded&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;load&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;load&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;load&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; 
    &lt;span class=&quot;nx&quot;&gt;img&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;classList&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;add&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;loading&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;lazy&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;src&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;img&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;getAttribute&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;data-src&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt; 
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;img&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;querySelector&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;img[data-src]&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;load&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;lazyLoad&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;img&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;load&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;// Wait for some kind of event. In this example I&apos;m using &quot;window.load&quot;&lt;/span&gt;

&lt;span class=&quot;nb&quot;&gt;window&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;addEventListener&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;load&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;load&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;ins class=&quot;adsbygoogle&quot; style=&quot;display:block&quot; data-ad-client=&quot;ca-pub-9732535637352249&quot; data-ad-slot=&quot;6033478353&quot; data-ad-format=&quot;auto&quot; data-full-width-responsive=&quot;true&quot;&gt;&lt;/ins&gt;
&lt;script&gt;	
(adsbygoogle = window.adsbygoogle || []).push({});	
&lt;/script&gt;&lt;/p&gt;

&lt;p&gt;And we’re done. This is all you need to lazy load images. I’ve included some extra examples below, their all using the “lazyLoad” function above.&lt;/p&gt;

&lt;h3 id=&quot;start-lazy-loading-images-immediately&quot;&gt;Start lazy loading images immediately&lt;/h3&gt;

&lt;p&gt;&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;querySelectorAll&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;img[data-src]&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;forEach&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;img&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;lazyLoad&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;img&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;load&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;());&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;wait-for-domcontentloaded&quot;&gt;Wait for DOMContentLoaded&lt;/h3&gt;

&lt;p&gt;&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;querySelectorAll&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;img[data-src]&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;forEach&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;img&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;load&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;lazyLoad&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;img&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;load&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;addEventListener&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;DOMContentLoaded&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;load&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;wait-until-image-is-visible&quot;&gt;Wait until image is visible&lt;/h3&gt;

&lt;p&gt;&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;querySelectorAll&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;img[data-src]&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;forEach&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;img&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;load&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;lazyLoad&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;img&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;load&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;checkViewport&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
  &lt;span class=&quot;nb&quot;&gt;window&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;addEventListener&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;scroll&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;checkViewport&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;nb&quot;&gt;window&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;addEventListener&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;resize&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;checkViewport&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;nb&quot;&gt;window&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;addEventListener&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;orientationchange&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;checkViewport&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;checkViewport&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;rect&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;img&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;getBoundingClientRect&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;isVisible&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;rect&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;top&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;window&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;innerHeight&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;documentElement&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;clientHeight&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt; 
      &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;rect&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;top&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;rect&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
      &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;rect&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;left&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;window&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;innerWidth&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;documentElement&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;clientWidth&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt; 
      &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;rect&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;left&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;rect&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;isVisible&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;nb&quot;&gt;window&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;removeEventListener&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;scroll&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;checkViewport&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
      &lt;span class=&quot;nb&quot;&gt;window&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;removeEventListener&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;resize&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;checkViewport&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
      &lt;span class=&quot;nb&quot;&gt;window&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;removeEventListener&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;orientationchange&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;checkViewport&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;load&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;ins class=&quot;adsbygoogle&quot; style=&quot;display:block&quot; data-ad-client=&quot;ca-pub-9732535637352249&quot; data-ad-slot=&quot;6033478353&quot; data-ad-format=&quot;auto&quot; data-full-width-responsive=&quot;true&quot;&gt;&lt;/ins&gt;
&lt;script&gt;	
(adsbygoogle = window.adsbygoogle || []).push({});	
&lt;/script&gt;&lt;/p&gt;

&lt;h3 id=&quot;full-example&quot;&gt;Full example&lt;/h3&gt;

&lt;p&gt;You edit the full example below and try out the examples above by going to &lt;a href=&quot;https://codepen.io/Afirus/pen/wYVMOw&quot;&gt;the Codepen&lt;/a&gt;.&lt;/p&gt;

&lt;p data-height=&quot;413&quot; data-theme-id=&quot;0&quot; data-slug-hash=&quot;wYVMOw&quot; data-default-tab=&quot;js,result&quot; data-user=&quot;Afirus&quot; data-pen-title=&quot;Easy Lazyloading&quot; class=&quot;codepen&quot;&gt;See the Pen &lt;a href=&quot;https://codepen.io/Afirus/pen/wYVMOw/&quot;&gt;Easy Lazyloading&lt;/a&gt; by sempostma (&lt;a href=&quot;https://codepen.io/Afirus&quot;&gt;@Afirus&lt;/a&gt;) on &lt;a href=&quot;https://codepen.io&quot;&gt;CodePen&lt;/a&gt;.&lt;/p&gt;
&lt;script async=&quot;&quot; src=&quot;https://static.codepen.io/assets/embed/ei.js&quot;&gt;&lt;/script&gt;

&lt;div class=&quot;affiliate&quot;&gt;
    &lt;h3&gt;Resources:&lt;/h3&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fjavascript-in-24-hours-sams-teach-yourself-9780672338090&quot;&gt;Javascript
            in 24 hours&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fhtml-css-and-javascript-all-in-one-covering-html5-css3-9780672338083&quot;&gt;HTML,
            CSS, ES6 all in one&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Flearning-react-a-hands-on-guide-to-building-web-applications-9780134843551&quot;&gt;A
            Hands-On Guide to Building Web Applications Using React&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Flearning-react-a-hands-on-guide-to-building-web-applications-9780134843551http%3A%2F%2Fwww.informit.com%2Fstore%2Flearning-regular-expressions-9780134757063&quot;&gt;Learning
            Regular Expressions&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fnode.js-mongodb-and-angular-web-development-the-definitive-9780134655536&quot;&gt;Node.js,
            MongoDB, and Angular web development&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;p&gt;&lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=145238.10000683&amp;amp;type=3&amp;amp;subid=0&quot;&gt;InformIT
            eBook Store&lt;/a&gt;&lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.10000683&amp;amp;type=3&amp;amp;subid=0&quot; /&gt;
        has a large number of ebooks on a wide range of topics. I would definitely recommend them.&lt;/p&gt;
    &lt;h3&gt;Great courses:&lt;/h3&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fjavascript-beginner.html&quot;&gt;Javascript
            for beginners in 3 hours&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fjavascript-basics-web-development-building-blocks.html&quot;&gt;Javascript
            basic web development building blocks&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fmobile-ui-and-ux-design.html&quot;&gt;Mobile
            UI and UX Design&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fmobile-ui-and-ux-design.htmlhttps%3A%2F%2Fwww.quickstart.com%2Fbuilding-web-applications-with-react.html&quot;&gt;Building
            web applications with react&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fstarting-with-angular-4.html&quot;&gt;Starting
            with angular 4&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fprogramming-in-c-ms-20483.html&quot;&gt;Programming
            in C#&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt; (recommended)
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Ffind-training%2Ftraining-by-topic%2Fapp-development%2Fweb-development.html&quot;&gt;More
            web development courses&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;p&gt;
        &lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=579862.416&amp;amp;type=3&amp;amp;subid=0&quot;&gt;Quickstart
        &lt;/a&gt;&lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.416&amp;amp;type=3&amp;amp;subid=0&quot; /&gt;
        offers a large amount of (online) courses on web development (&lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=579862.416&amp;amp;type=3&amp;amp;subid=0&quot;&gt;Use
            Code LSOFF50&lt;/a&gt;&lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.416&amp;amp;type=3&amp;amp;subid=0&quot; /&gt;
        to get 50% off ;p)
    &lt;/p&gt;
&lt;/div&gt;</content>

      
      
      
      
      

      <author>
          <name>Sem Postma</name>
        
        
      </author>

      

      

      
        <summary type="html">Lazy Loading doesn’t have to be hard. This is a very simple example/tutorial on how to do lazy loading. Lazy loading works best if you have to load in a lot of large images which slows down the page load.</summary>
      

      
      
        
        <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://esstudio.site/uploads/giphy.gif" />
      
    </entry>
  
    
    
    <entry xml:lang="">
      <title type="html">Implementing Binary Heaps with Javascript</title>
      <link href="https://esstudio.site/2018/10/31/implementing-binary-heaps-with-javascript.html" rel="alternate" type="text/html" title="Implementing Binary Heaps with Javascript" />
      <published>2018-10-31T17:23:28+01:00</published>
      <updated>2018-10-31T17:23:28+01:00</updated>
      <id>https://esstudio.site/2018/10/31/implementing-binary-heaps-with-javascript</id>
      <content type="html" xml:base="https://esstudio.site/2018/10/31/implementing-binary-heaps-with-javascript.html">&lt;p&gt;A heap tree is a type of data structure where the each node is either greater than or equal or less than or equal to the node’s children. Binary heaps are often used to implement priority queues. Priority queues are used in path finding for example.&lt;/p&gt;

&lt;p&gt;Even though it might sound like a difficult subject it’s actually not that difficult. We will start by establishing some basics. The first one being that a node will always be equal to or smaller than it’s children. This means that the smallest value is always on top (the root node). The reason that a binary heap is so fast compared to sorting arrays, is that every time we add or delete an item, we “sort” the heap. This heap “sorting” is very fast because we only need to check the parent node if it’s bigger than the child. As the tree grows exponentially the time to sort the heap does not (grow exponentially). This is called time complexity, which is “O(log n)” for heap insertion and deletion. Binary heaps can perform very well with very large data-sets compared to other algorithms.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;        6
      /   \
     7    12
    / \   /
   10 15 17
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;ins class=&quot;adsbygoogle&quot; style=&quot;display:block&quot; data-ad-client=&quot;ca-pub-9732535637352249&quot; data-ad-slot=&quot;6033478353&quot; data-ad-format=&quot;auto&quot; data-full-width-responsive=&quot;true&quot;&gt;&lt;/ins&gt;
&lt;script&gt;	
(adsbygoogle = window.adsbygoogle || []).push({});	
&lt;/script&gt;&lt;/p&gt;

&lt;p&gt;We can implement a heap in two different ways:&lt;/p&gt;

&lt;h4 id=&quot;first---object-reference-implementation&quot;&gt;First - Object reference implementation:&lt;/h4&gt;

&lt;p&gt;&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;node1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;6&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;parent&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;null&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;node2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;parent&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;node1&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;node3&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;12&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;parent&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;node1&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;node4&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;parent&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;node2&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;node5&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;15&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;parent&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;node2&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;node6&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;17&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;parent&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;node3&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h4 id=&quot;second---array-implementation&quot;&gt;Second - Array implementation&lt;/h4&gt;

&lt;p&gt;This might seem strange but we can easily represent a binary heap as an array.&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;tree&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;6&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;12&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;15&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;17&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;];&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The first element in the array is the root node. The left child is the second item and the right child is the third item, etc.&lt;/p&gt;

&lt;p&gt;To navigate the array we use these rules:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;The left child is located at (index + 1) * 2 - 1&lt;/li&gt;
  &lt;li&gt;The right child is located at (index + 1) * 2&lt;/li&gt;
  &lt;li&gt;The parent child is located at Math.floor((i + 1) / 2 - 1)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example if we have a node located at index 7, we know that it’s left child is located at &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;15 = (7 + 1) * 2 - 1&lt;/code&gt;, the right child is located at index &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;16 = (7 + 1) * 2&lt;/code&gt; and the parent is located at index &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;3 = Math.floor((7 + 1) / 2 - 1)&lt;/code&gt;. If you’re still struggling with how binary trees work, you can checkout &lt;a href=&quot;https://www.cs.cmu.edu/\~adamchik/15-121/lectures/Binary%20Heaps/heaps.html&quot;&gt;this article&lt;/a&gt; by Carnegie Mellon University which helped me out a lot.&lt;/p&gt;

&lt;p&gt;&lt;ins class=&quot;adsbygoogle&quot; style=&quot;display:block&quot; data-ad-client=&quot;ca-pub-9732535637352249&quot; data-ad-slot=&quot;6033478353&quot; data-ad-format=&quot;auto&quot; data-full-width-responsive=&quot;true&quot;&gt;&lt;/ins&gt;
&lt;script&gt;	
(adsbygoogle = window.adsbygoogle || []).push({});	
&lt;/script&gt;&lt;/p&gt;

&lt;p&gt;Using these rules we can write the following code:&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kd&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;MinHeap&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;Heap&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;constructor&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;selector&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[];&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;selector&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;selector&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  
  	&lt;span class=&quot;nx&quot;&gt;seek&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;];&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

    &lt;span class=&quot;nx&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;length&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;selector&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;Math&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;floor&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)])&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;selector&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]))&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;t&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;];&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;Math&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;floor&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)];&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;Math&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;floor&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;Math&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;floor&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

    &lt;span class=&quot;nx&quot;&gt;pop&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;length&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;pop&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;ret&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;];&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;pop&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;lowest&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;selector&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;selector&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt; 
                &lt;span class=&quot;p&quot;&gt;?&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;selector&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;selector&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;lowest&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]))&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;t&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;];&lt;/span&gt;
                &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;lowest&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;];&lt;/span&gt;
                &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;lowest&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;lowest&lt;/span&gt;             
            &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;break&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;ret&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

    &lt;span class=&quot;k&quot;&gt;delete&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;indexOf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;c1&quot;&gt;// heapify&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;pop&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;lowest&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;selector&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;selector&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt; 
                &lt;span class=&quot;p&quot;&gt;?&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;selector&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;selector&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;lowest&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]))&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;t&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;];&lt;/span&gt;
                &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;lowest&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;];&lt;/span&gt;
                &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;lowest&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;lowest&lt;/span&gt;             
            &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;break&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

    &lt;span class=&quot;nx&quot;&gt;heapify&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;arr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;arr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;length&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;++&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;arr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]);&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;To create a max heap, where the child nodes are always smaller than or equal to the parent, we can change it do this:&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kd&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;MaxHeap&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;Heap&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;constructor&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;selector&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[];&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;selector&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;selector&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  
  	&lt;span class=&quot;nx&quot;&gt;seek&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;];&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

    &lt;span class=&quot;nx&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;length&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;selector&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;Math&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;floor&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)])&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;selector&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]))&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;t&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;];&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;Math&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;floor&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)];&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;Math&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;floor&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;Math&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;floor&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

    &lt;span class=&quot;nx&quot;&gt;pop&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;length&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;pop&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;ret&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;];&lt;/span&gt;
        &lt;span class=&quot;c1&quot;&gt;// heapify&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;pop&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;lowest&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;selector&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;selector&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt; 
                &lt;span class=&quot;p&quot;&gt;?&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;selector&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;selector&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;lowest&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]))&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;t&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;];&lt;/span&gt;
                &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;lowest&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;];&lt;/span&gt;
                &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;lowest&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;lowest&lt;/span&gt;             
            &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;break&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;ret&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

    &lt;span class=&quot;k&quot;&gt;delete&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;indexOf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;c1&quot;&gt;// heapify&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;pop&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;lowest&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;selector&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;selector&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt; 
                &lt;span class=&quot;p&quot;&gt;?&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;selector&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;selector&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;lowest&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]))&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;t&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;];&lt;/span&gt;
                &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;lowest&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;];&lt;/span&gt;
                &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;lowest&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;lowest&lt;/span&gt;             
            &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;break&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

    &lt;span class=&quot;nx&quot;&gt;heapify&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;arr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;arr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;length&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;++&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;arr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]);&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This basic implementation only implements push, pop and delete, but most of the time this is all you need.&lt;/p&gt;

&lt;p&gt;&lt;ins class=&quot;adsbygoogle&quot; style=&quot;display:block&quot; data-ad-client=&quot;ca-pub-9732535637352249&quot; data-ad-slot=&quot;6033478353&quot; data-ad-format=&quot;auto&quot; data-full-width-responsive=&quot;true&quot;&gt;&lt;/ins&gt;
&lt;script&gt;	
(adsbygoogle = window.adsbygoogle || []).push({});	
&lt;/script&gt;&lt;/p&gt;

&lt;p&gt;We can visualize the tree using the following html and javascript:&lt;/p&gt;

&lt;div class=&quot;language-html highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;input&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;type=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;number&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;val&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;placeholder=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;value&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&amp;lt;/input&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;button&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;push&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;Push&lt;span class=&quot;nt&quot;&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;button&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;pop&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;Pop&lt;span class=&quot;nt&quot;&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;

&lt;span class=&quot;nt&quot;&gt;&amp;lt;canvas&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;heap-visualization&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;600&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;280&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&amp;lt;/canvas&amp;gt;&amp;lt;br&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;heap&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;MinHeap&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;heap&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;heapify&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;([&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;6&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;9&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]);&lt;/span&gt;

&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;ctx&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;getElementById&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;heap-visualization&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;getContext&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;2d&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;visualize&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;ctx&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;heap&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

&lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;getElementById&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;addEventListener&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;click&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;val&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;getElementById&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;isNaN&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;alert&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;Value is not a number&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;heap&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;visualize&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;ctx&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;heap&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt; 

&lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;getElementById&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;pop&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;addEventListener&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;click&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;heap&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;pop&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;visualize&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;ctx&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;heap&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;full-example&quot;&gt;Full example&lt;/h2&gt;

&lt;p&gt;The &lt;a href=&quot;https://codepen.io/Afirus/pen/JmQZeq&quot;&gt;Codepen&lt;/a&gt; below shows the full example, visualization and code.&lt;/p&gt;

&lt;p data-height=&quot;434&quot; data-theme-id=&quot;0&quot; data-slug-hash=&quot;JmQZeq&quot; data-default-tab=&quot;js,result&quot; data-user=&quot;Afirus&quot; data-pen-title=&quot;JmQZeq&quot; class=&quot;codepen&quot;&gt;See the Pen &lt;a href=&quot;https://codepen.io/Afirus/pen/JmQZeq/&quot;&gt;JmQZeq&lt;/a&gt; by sempostma (&lt;a href=&quot;https://codepen.io/Afirus&quot;&gt;@Afirus&lt;/a&gt;) on &lt;a href=&quot;https://codepen.io&quot;&gt;CodePen&lt;/a&gt;.&lt;/p&gt;
&lt;script async=&quot;&quot; src=&quot;https://static.codepen.io/assets/embed/ei.js&quot;&gt;&lt;/script&gt;

&lt;p&gt;An example of using a heap with pathfinding can be found &lt;a href=&quot;https://esstudio.site/maze-solver&quot;&gt;here&lt;/a&gt;. It searches the shortest route from A to B. A min-heap is used as a priority queue in the &lt;a href=&quot;https://en.wikipedia.org/wiki/A*_search_algorithm&quot;&gt;A* search algorithm&lt;/a&gt;.&lt;/p&gt;

&lt;div class=&quot;affiliate&quot;&gt;
    &lt;h3&gt;Resources:&lt;/h3&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fjavascript-in-24-hours-sams-teach-yourself-9780672338090&quot;&gt;Javascript
            in 24 hours&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fhtml-css-and-javascript-all-in-one-covering-html5-css3-9780672338083&quot;&gt;HTML,
            CSS, ES6 all in one&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Flearning-react-a-hands-on-guide-to-building-web-applications-9780134843551&quot;&gt;A
            Hands-On Guide to Building Web Applications Using React&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Flearning-react-a-hands-on-guide-to-building-web-applications-9780134843551http%3A%2F%2Fwww.informit.com%2Fstore%2Flearning-regular-expressions-9780134757063&quot;&gt;Learning
            Regular Expressions&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fnode.js-mongodb-and-angular-web-development-the-definitive-9780134655536&quot;&gt;Node.js,
            MongoDB, and Angular web development&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;p&gt;&lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=145238.10000683&amp;amp;type=3&amp;amp;subid=0&quot;&gt;InformIT
            eBook Store&lt;/a&gt;&lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.10000683&amp;amp;type=3&amp;amp;subid=0&quot; /&gt;
        has a large number of ebooks on a wide range of topics. I would definitely recommend them.&lt;/p&gt;
    &lt;h3&gt;Great courses:&lt;/h3&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fjavascript-beginner.html&quot;&gt;Javascript
            for beginners in 3 hours&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fjavascript-basics-web-development-building-blocks.html&quot;&gt;Javascript
            basic web development building blocks&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fmobile-ui-and-ux-design.html&quot;&gt;Mobile
            UI and UX Design&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fmobile-ui-and-ux-design.htmlhttps%3A%2F%2Fwww.quickstart.com%2Fbuilding-web-applications-with-react.html&quot;&gt;Building
            web applications with react&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fstarting-with-angular-4.html&quot;&gt;Starting
            with angular 4&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fprogramming-in-c-ms-20483.html&quot;&gt;Programming
            in C#&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt; (recommended)
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Ffind-training%2Ftraining-by-topic%2Fapp-development%2Fweb-development.html&quot;&gt;More
            web development courses&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;p&gt;
        &lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=579862.416&amp;amp;type=3&amp;amp;subid=0&quot;&gt;Quickstart
        &lt;/a&gt;&lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.416&amp;amp;type=3&amp;amp;subid=0&quot; /&gt;
        offers a large amount of (online) courses on web development (&lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=579862.416&amp;amp;type=3&amp;amp;subid=0&quot;&gt;Use
            Code LSOFF50&lt;/a&gt;&lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.416&amp;amp;type=3&amp;amp;subid=0&quot; /&gt;
        to get 50% off ;p)
    &lt;/p&gt;
&lt;/div&gt;</content>

      
      
      
      
      

      <author>
          <name>Sem Postma</name>
        
        
      </author>

      

      

      
        <summary type="html">A heap tree is a type of data structure where the each node is either greater than or equal or less than or equal to the node’s children. Binary heaps are often used to implement priority queues. Priority queues are used in path finding for example.</summary>
      

      
      
        
        <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://esstudio.site/uploads/binaryheap.png" />
      
    </entry>
  
    
    
    <entry>
      <title type="html">Creating an Atom feed reader with Javascript</title>
      <link href="https://esstudio.site/2018/10/30/creating-an-atom-feed-reader-with-javascript.html" rel="alternate" type="text/html" title="Creating an Atom feed reader with Javascript" />
      <published>2018-10-30T21:26:22+01:00</published>
      <updated>2018-10-30T21:26:22+01:00</updated>
      <id>https://esstudio.site/2018/10/30/creating-an-atom-feed-reader-with-javascript</id>
      <content type="html" xml:base="https://esstudio.site/2018/10/30/creating-an-atom-feed-reader-with-javascript.html">&lt;p&gt;Atom is an extension of XML, just like RSS. Atom uses the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.atom&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.xml&lt;/code&gt; extensions and the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;application/atom+xml&lt;/code&gt; mimetype. Below is an example of an Atom feed from &lt;a href=&quot;AHS Blog&quot;&gt;https://americanhorrorstory.style/&lt;/a&gt;. Having an atom feed on your website is a good idea, you can get more exposure via rss readers like &lt;a href=&quot;https://feedly.com/i/subscription/feed%2Fhttps%3A%2F%2Famericanhorrorstory.style%2Ffeed&quot;&gt;Feedly&lt;/a&gt;, NewsBlur or &lt;a href=&quot;https://esstudio.site/newsfeeder/&quot;&gt;NewsFeeder (a website/app i created)&lt;/a&gt;.&lt;/p&gt;

&lt;div class=&quot;language-xml highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;cp&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;feed&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;xmlns=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://www.w3.org/2005/Atom&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;xml:lang=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;en&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;generator&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;uri=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;https://jekyllrb.com/&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;version=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;3.7.4&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;Jekyll&lt;span class=&quot;nt&quot;&gt;&amp;lt;/generator&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;link&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;href=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;https://americanhorrorstory.style/feed.xml&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;rel=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;self&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;type=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;application/atom+xml&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;link&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;href=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;https://americanhorrorstory.style/&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;rel=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;alternate&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;type=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;text/html&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;hreflang=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;en&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;updated&amp;gt;&lt;/span&gt;2018-10-21T21:23:56+02:00&lt;span class=&quot;nt&quot;&gt;&amp;lt;/updated&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;id&amp;gt;&lt;/span&gt;https://americanhorrorstory.style/&lt;span class=&quot;nt&quot;&gt;&amp;lt;/id&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;title&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;type=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;html&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;American Horror Story Outfits&lt;span class=&quot;nt&quot;&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;subtitle&amp;gt;&lt;/span&gt;This site is an inspiration style guide to some of the iconic American Horror Story characters. Read about the characters and their unique clothing style.&lt;span class=&quot;nt&quot;&gt;&amp;lt;/subtitle&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;author&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;name&amp;gt;&lt;/span&gt;Eva van der Weide&lt;span class=&quot;nt&quot;&gt;&amp;lt;/name&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;/author&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;entry&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;title&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;type=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;html&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;APOCALYPSE - Madison&lt;span class=&quot;nt&quot;&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;link&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;href=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;https://americanhorrorstory.style/2018/10/18/apocalypse-madison.html&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;rel=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;alternate&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;type=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;text/html&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;title=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;APOCALYPSE - Madison&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;published&amp;gt;&lt;/span&gt;2018-10-18T22:09:00+02:00&lt;span class=&quot;nt&quot;&gt;&amp;lt;/published&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;updated&amp;gt;&lt;/span&gt;2018-10-18T22:09:00+02:00&lt;span class=&quot;nt&quot;&gt;&amp;lt;/updated&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;id&amp;gt;&lt;/span&gt;https://americanhorrorstory.style/2018/10/18/apocalypse-madison&lt;span class=&quot;nt&quot;&gt;&amp;lt;/id&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;content&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;type=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;html&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;xml:base=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;https://americanhorrorstory.style/2018/10/18/apocalypse-madison.html&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
          The witches are back! Who would’ve thought the witches from season 3 would make a comeback in season 8 of American Horror Story (named: Apocalypse).&lt;span class=&quot;nt&quot;&gt;&amp;lt;/content&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;author&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;nt&quot;&gt;&amp;lt;name&amp;gt;&lt;/span&gt;Eva van der Weide&lt;span class=&quot;nt&quot;&gt;&amp;lt;/name&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;/author&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;summary&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;type=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;html&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;The witches are back!&lt;span class=&quot;nt&quot;&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;media:thumbnail&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;xmlns:media=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://search.yahoo.com/mrss/&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;url=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;https://americanhorrorstory.style/images/meta-icons/android-chrome-512x512.png&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;/entry&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/feed&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;ins class=&quot;adsbygoogle&quot; style=&quot;display:block&quot; data-ad-client=&quot;ca-pub-9732535637352249&quot; data-ad-slot=&quot;6033478353&quot; data-ad-format=&quot;auto&quot; data-full-width-responsive=&quot;true&quot;&gt;&lt;/ins&gt;
&lt;script&gt;	
(adsbygoogle = window.adsbygoogle || []).push({});	
&lt;/script&gt;&lt;/p&gt;

&lt;p&gt;Let’s fetch the feed with &lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API&quot;&gt;Fetch API&lt;/a&gt;. You can use any valid Atom feed you want.&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nx&quot;&gt;fetch&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;https://americanhorrorstory.style/feed&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;then&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;response&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;response&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;())&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;then&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;xml&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;We will use the well supported &lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/API/DOMParser&quot;&gt;DOMParser&lt;/a&gt; to parse the feed into a document. It’s important to set the type to “text/xml”, because it will default to “text/html”.&lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;language-javacript&quot;&gt;const parser = new DOMParser();
const xmlDoc = parser.parseFromString(xml,&quot;text/xml&quot;);
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Let’s log the “xmlDoc” to the console. This will show a list of entry elements, which we need to display our posts.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/uploads/rssfeed.PNG&quot; alt=&quot;Atom Feed console.log&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;ins class=&quot;adsbygoogle&quot; style=&quot;display:block&quot; data-ad-client=&quot;ca-pub-9732535637352249&quot; data-ad-slot=&quot;6033478353&quot; data-ad-format=&quot;auto&quot; data-full-width-responsive=&quot;true&quot;&gt;&lt;/ins&gt;
&lt;script&gt;	
(adsbygoogle = window.adsbygoogle || []).push({});	
&lt;/script&gt;&lt;/p&gt;

&lt;p&gt;Because the xmlDoc is of type “Document” and not “HTMLDocument”, we can’t use functions like “.querySelector” so we will use “.getElementsByTagName” to select the entry tags. This will return an array like object. To convert an array like object or iterable object, to an array, use &lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from&quot;&gt;Array.from(arrayLikeObject)&lt;/a&gt;.&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;html&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;Array&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;from&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;xmlDoc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;getElementsByTagName&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;entry&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;map&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;entry&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;`&amp;lt;div class=&quot;entry&quot;&amp;gt;&amp;lt;/div&amp;gt;`&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This will return an array of strings containing HTML markup for our feed. Now we need to fill up the entry elements with content from the Atom feed. We can make this a bit easier by writing some helper functions.&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c1&quot;&gt;// Get&apos;s a single child element by tag name&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;t&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;entry&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;tname&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;entry&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;getElementsByTagName&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;tname&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;];&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;// Get date from an entry element&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;date&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;entry&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;Date&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;entry&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;published&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;textContent&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;getDate&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;// Strip html tags to remove html tags like b, i, h1, etc.&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;html2txt&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;html&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;html&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;replace&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;/&amp;lt;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;(?:&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;.|&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n)&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;?&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;&amp;gt;/gm&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;// Get excerpt from an entry content&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;content&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;entry&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;html2txt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;entry&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;content&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;textContent&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;slice&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;200&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Now, replace the template string&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;s2&quot;&gt;`&amp;lt;div class=&quot;entry&quot;&amp;gt;&amp;lt;/div&amp;gt;`&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;with the template string below.&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;s2&quot;&gt;`&amp;lt;div class=&quot;entry&quot;&amp;gt;
  &amp;lt;div class=&quot;timestamp&quot;&amp;gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;date&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;entry&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;lt;/div&amp;gt;
  &amp;lt;a href=&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;entry&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;link&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;getAttribute&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;href&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&amp;gt;
  &amp;lt;h2 class=&quot;entry-title&quot;&amp;gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;entry&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;innerHTML&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;lt;/h2&amp;gt;
  &amp;lt;/a&amp;gt;
  &amp;lt;div class=&quot;content&quot;&amp;gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;content&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;entry&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;amp;hellip;&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;`&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Let’s join the html strings together and put it on the page.&lt;/p&gt;

&lt;div class=&quot;language-html highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;div&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;items&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;loading........&lt;span class=&quot;nt&quot;&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;getElementById&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;innerHTML&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;html&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;ins class=&quot;adsbygoogle&quot; style=&quot;display:block&quot; data-ad-client=&quot;ca-pub-9732535637352249&quot; data-ad-slot=&quot;6033478353&quot; data-ad-format=&quot;auto&quot; data-full-width-responsive=&quot;true&quot;&gt;&lt;/ins&gt;
&lt;script&gt;	
(adsbygoogle = window.adsbygoogle || []).push({});	
&lt;/script&gt;&lt;/p&gt;

&lt;p&gt;You can checkout the full example, with code below. I’ve also added some extra css and html markup.&lt;/p&gt;

&lt;p data-height=&quot;265&quot; data-theme-id=&quot;0&quot; data-slug-hash=&quot;mzYKYW&quot; data-default-tab=&quot;css,result&quot; data-user=&quot;Afirus&quot; data-pen-title=&quot;Atom Feed Reader&quot; class=&quot;codepen&quot;&gt;See the Pen &lt;a href=&quot;https://codepen.io/Afirus/pen/mzYKYW/&quot;&gt;Atom Feed Reader&lt;/a&gt; by sempostma (&lt;a href=&quot;https://codepen.io/Afirus&quot;&gt;@Afirus&lt;/a&gt;) on &lt;a href=&quot;https://codepen.io&quot;&gt;CodePen&lt;/a&gt;.&lt;/p&gt;
&lt;script async=&quot;&quot; src=&quot;https://static.codepen.io/assets/embed/ei.js&quot;&gt;&lt;/script&gt;

&lt;p&gt;The RSS reader I talked about earlier is a serverless javascript website/app called &lt;a href=&quot;https://esstudio.site/newsfeeder/&quot;&gt;NewsFeeder&lt;/a&gt;. I’t parses Atom and RSS feeds, it’s free, it’s safe and has no sign-up.&lt;/p&gt;

&lt;div class=&quot;app-portal&quot; style=&quot;width: 400px; max-width: 100%; padding: 10px&quot;&gt;
    &lt;img src=&quot;https://esstudio.site/uploads/logo-6c4e4d.png&quot; alt=&quot;&quot; style=&quot;max-width: 50%; margin: 20px auto&quot; /&gt;
    &lt;h1&gt;NewsFeeder&lt;/h1&gt;
    &lt;p&gt;Easily search for news on multiple platforms, find feeds on popular websites and more. Also works as a classic RSS/Atom reader.&lt;/p&gt;
    &lt;a class=&quot;btn&quot; href=&quot;https://esstudio.site/newsfeeder&quot;&gt;
        &lt;span&gt;Launch&lt;/span&gt;
        &lt;svg viewBox=&quot;0 0 10 18&quot; style=&quot;height: 1.2em&quot;&gt;&lt;path d=&quot;m0.8,1l8,8l-8,8&quot; fill=&quot;none&quot; stroke-width=&quot;2&quot; style=&quot;stroke: currentColor;&quot; /&gt;&lt;/svg&gt;
    &lt;/a&gt;
&lt;/div&gt;

&lt;p&gt;&lt;a href=&quot;https://play.google.com/store/apps/details?id=com.EchoSierraStudio.Newsfeeder&quot;&gt;NewsFeeder on Google Play&lt;/a&gt;.&lt;/p&gt;

&lt;div class=&quot;affiliate&quot;&gt;
    &lt;h3&gt;Resources:&lt;/h3&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fjavascript-in-24-hours-sams-teach-yourself-9780672338090&quot;&gt;Javascript
            in 24 hours&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fhtml-css-and-javascript-all-in-one-covering-html5-css3-9780672338083&quot;&gt;HTML,
            CSS, ES6 all in one&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Flearning-react-a-hands-on-guide-to-building-web-applications-9780134843551&quot;&gt;A
            Hands-On Guide to Building Web Applications Using React&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Flearning-react-a-hands-on-guide-to-building-web-applications-9780134843551http%3A%2F%2Fwww.informit.com%2Fstore%2Flearning-regular-expressions-9780134757063&quot;&gt;Learning
            Regular Expressions&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fnode.js-mongodb-and-angular-web-development-the-definitive-9780134655536&quot;&gt;Node.js,
            MongoDB, and Angular web development&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;p&gt;&lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=145238.10000683&amp;amp;type=3&amp;amp;subid=0&quot;&gt;InformIT
            eBook Store&lt;/a&gt;&lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.10000683&amp;amp;type=3&amp;amp;subid=0&quot; /&gt;
        has a large number of ebooks on a wide range of topics. I would definitely recommend them.&lt;/p&gt;
    &lt;h3&gt;Great courses:&lt;/h3&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fjavascript-beginner.html&quot;&gt;Javascript
            for beginners in 3 hours&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fjavascript-basics-web-development-building-blocks.html&quot;&gt;Javascript
            basic web development building blocks&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fmobile-ui-and-ux-design.html&quot;&gt;Mobile
            UI and UX Design&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fmobile-ui-and-ux-design.htmlhttps%3A%2F%2Fwww.quickstart.com%2Fbuilding-web-applications-with-react.html&quot;&gt;Building
            web applications with react&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fstarting-with-angular-4.html&quot;&gt;Starting
            with angular 4&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fprogramming-in-c-ms-20483.html&quot;&gt;Programming
            in C#&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt; (recommended)
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Ffind-training%2Ftraining-by-topic%2Fapp-development%2Fweb-development.html&quot;&gt;More
            web development courses&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;p&gt;
        &lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=579862.416&amp;amp;type=3&amp;amp;subid=0&quot;&gt;Quickstart
        &lt;/a&gt;&lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.416&amp;amp;type=3&amp;amp;subid=0&quot; /&gt;
        offers a large amount of (online) courses on web development (&lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=579862.416&amp;amp;type=3&amp;amp;subid=0&quot;&gt;Use
            Code LSOFF50&lt;/a&gt;&lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.416&amp;amp;type=3&amp;amp;subid=0&quot; /&gt;
        to get 50% off ;p)
    &lt;/p&gt;
&lt;/div&gt;</content>

      
      
      
      
      

      <author>
          <name>Sem Postma</name>
        
        
      </author>

      

      

      
        <summary type="html">Atom is an extension of XML, just like RSS. Atom uses the .atom and .xml extensions and the application/atom+xml mimetype. Below is an example of an Atom feed from https://americanhorrorstory.style/. Having an atom feed on your website is a good idea, you can get more exposure via rss readers like Feedly, NewsBlur or NewsFeeder (a website/app i created).</summary>
      

      
      
        
        <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://esstudio.site/uploads/rssreader.jpg" />
      
    </entry>
  
    
    
    <entry>
      <title type="html">Base Converter</title>
      <link href="https://esstudio.site/2018/10/30/base-converter.html" rel="alternate" type="text/html" title="Base Converter" />
      <published>2018-10-30T11:50:18+01:00</published>
      <updated>2018-10-30T11:50:18+01:00</updated>
      <id>https://esstudio.site/2018/10/30/base-converter</id>
      <content type="html" xml:base="https://esstudio.site/2018/10/30/base-converter.html">&lt;p&gt;This simple simple conversion tool converts the same number between different number systems. You can convert from any base, for example, hexadecimal, decimal, binary, octal, up to base 36, which is the largest base you can represent using letters, and numbers (0-9 + A-Z).&lt;/p&gt;

&lt;div class=&quot;app-portal&quot; style=&quot;width: 400px; max-width: 100%; padding: 10px&quot;&gt;
    &lt;img src=&quot;https://esstudio.site/uploads/basecalc.png&quot; alt=&quot;&quot; style=&quot;max-width: 50%; margin: 20px auto&quot; /&gt;
    &lt;h1&gt;Base Converter&lt;/h1&gt;
    &lt;p&gt;An easy to use application which converts to different numerical systems.&lt;/p&gt;
    &lt;a class=&quot;btn&quot; href=&quot;https://basecalc.esstudio.site/&quot;&gt;
        &lt;span&gt;Launch&lt;/span&gt;
        &lt;svg viewBox=&quot;0 0 10 18&quot; style=&quot;height: 1.2em&quot;&gt;&lt;path d=&quot;m0.8,1l8,8l-8,8&quot; fill=&quot;none&quot; stroke-width=&quot;2&quot; style=&quot;stroke: currentColor;&quot; /&gt;&lt;/svg&gt;
    &lt;/a&gt;
&lt;/div&gt;

&lt;p&gt;You can also find it in the &lt;a href=&quot;https://play.google.com/store/apps/details?id=com.EchoSierraStudio.NumericCalculator&quot;&gt;play store&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;For example: If we convert the decimal number “123456789” to base 16 (hexadecimal) we get: “75bcd15”, octal is “726746425” and with binary we get “111010110111100110100010101”. You can use the tool to automate or simplify your work.&lt;/p&gt;

&lt;p&gt;Also, checkout &lt;a href=&quot;https://esstudio.site/SimpleFunctionPlotter&quot;&gt;simple function plotter&lt;/a&gt; which allows you to plot, visualize and save algebraic formula’s.&lt;/p&gt;</content>

      
      
      
      
      

      <author>
          <name>Sem Postma</name>
        
        
      </author>

      

      

      
        <summary type="html">This simple simple conversion tool converts the same number between different number systems. You can convert from any base, for example, hexadecimal, decimal, binary, octal, up to base 36, which is the largest base you can represent using letters, and numbers (0-9 + A-Z).</summary>
      

      
      
        
        <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://esstudio.site/uploads/basecalc.png" />
      
    </entry>
  
    
    
    <entry>
      <title type="html">Creating a Javascript spellingchecker with bjspell</title>
      <link href="https://esstudio.site/2018/10/22/javascript-spellingchecker.html" rel="alternate" type="text/html" title="Creating a Javascript spellingchecker with bjspell" />
      <published>2018-10-22T22:11:31+02:00</published>
      <updated>2018-10-22T22:11:31+02:00</updated>
      <id>https://esstudio.site/2018/10/22/javascript-spellingchecker</id>
      <content type="html" xml:base="https://esstudio.site/2018/10/22/javascript-spellingchecker.html">&lt;p&gt;I saw this question on stackoverflow: &lt;a href=&quot;https://stackoverflow.com/questions/6252358/need-client-side-spell-checker-for-div&quot;&gt;Need Client side spell checker for DIV&lt;/a&gt;. There are not a lot of libraries available that will allow you to do this but I did find an older library called &lt;a href=&quot;http://code.google.com/p/bjspell&quot;&gt;bjspell&lt;/a&gt; which does the job.&lt;/p&gt;

&lt;p&gt;BJSpell in production: &lt;a href=&quot;https://spell-checker.site&quot;&gt;spell-checker.site&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let’s start with writing the HTML. We need a contenteditable div with the spellcheck attribute set to false. This is because we don’t want to use the default browser spellchecking, we want our own implementation.&lt;/p&gt;

&lt;div class=&quot;language-html highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;div&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;text&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;contenteditable&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;spellcheck=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;false&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;

&lt;span class=&quot;nt&quot;&gt;&amp;lt;button&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;check&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;disabled&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;Check&lt;span class=&quot;nt&quot;&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;button&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;reset&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;Reset&lt;span class=&quot;nt&quot;&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;It’s best to add some css rules to the contenteditbale div because we want to style it as an inputfield. The minimum height is required because otherwise the div will collapse to height = 0. Also, let’s add some styling to correct and misspelled words, so users can spot their spelling mistakes.&lt;/p&gt;

&lt;p&gt;&lt;ins class=&quot;adsbygoogle&quot; style=&quot;display:block&quot; data-ad-client=&quot;ca-pub-9732535637352249&quot; data-ad-slot=&quot;6033478353&quot; data-ad-format=&quot;auto&quot; data-full-width-responsive=&quot;true&quot;&gt;&lt;/ins&gt;
&lt;script&gt;	
(adsbygoogle = window.adsbygoogle || []).push({});	
&lt;/script&gt;&lt;/p&gt;

&lt;div class=&quot;language-css highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nf&quot;&gt;#text&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;min-height&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;100px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;border&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;1px&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;solid&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;#ccc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;nf&quot;&gt;#text&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;.correct&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;border-bottom&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;2px&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;solid&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;green&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;nf&quot;&gt;#text&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;.misspelled&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;border-bottom&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;2px&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;solid&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;red&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Let’s load in bjspell from the &lt;a href=&quot;https://github.com/maheshmurag/bjspell&quot;&gt;bjspell repository&lt;/a&gt;. In this example I’m using the en_US dictionary. The available dictionaries are de_DE, en_GB, en_USE, es_ES, fr_FR, it_IT. You can also compile your own but that’s beyond the scope of this tutorial. Call the BJSpell function with url of the dictionary, and a callback. The callback will be fired when bjspell has loaded and parsed the dictionary. In this case, we will set the disabled attriute of the “check button” to false.&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;check&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;  &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;querySelector&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;#check&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;div&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;querySelector&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;#text&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;use&lt;/span&gt; 
&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;reset&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;querySelector&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;#reset&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;dictionary&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;https://rawcdn.githack.com/maheshmurag/bjspell/master/dictionary.js/en_US.js&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;lang&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;BJSpell&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;dictionary&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;check&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;disabled&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Next, add a click handler to the “check button”. Below is a very simple implementation. You could do a spelling check everytime the div changes, and save/store the user selection and cursor position. In short, we get all words from the div as text. Then we individually check every word for spelling mistakes. If we find a spelling mistake, we add a list of suggestions and save the word as a span element. After we’ve finished mapping every word, we join the all the span elements together and store it in the div’s innerHTML.&lt;/p&gt;

&lt;p&gt;&lt;ins class=&quot;adsbygoogle&quot; style=&quot;display:block&quot; data-ad-client=&quot;ca-pub-9732535637352249&quot; data-ad-slot=&quot;6033478353&quot; data-ad-format=&quot;auto&quot; data-full-width-responsive=&quot;true&quot;&gt;&lt;/ins&gt;
&lt;script&gt;	
(adsbygoogle = window.adsbygoogle || []).push({});	
&lt;/script&gt;&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nx&quot;&gt;check&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;addEventListener&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;click&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;text&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;div&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;innerText&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;words&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;split&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\s&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  
  &lt;span class=&quot;nx&quot;&gt;div&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;innerHTML&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;words&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;map&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;word&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
     &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;correct&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;lang&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;check&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;word&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
     &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;className&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;correct&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;?&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;correct&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;misspelled&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
     &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;title&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;correct&lt;/span&gt; 
      &lt;span class=&quot;p&quot;&gt;?&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;Correct spelling&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt; 
      &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;`Did you mean &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;lang&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;suggest&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;word&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;?`&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
     &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;`&amp;lt;span title=&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot; class=&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;className&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&amp;gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;word&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;lt;/span&amp;gt;`&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;p&quot;&gt;}).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt; &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;We also want a way for our user to reset the div:&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nx&quot;&gt;reset&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;addEventListener&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;click&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;div&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;innerText&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;div&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;innerText&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h4 id=&quot;full-example&quot;&gt;Full example:&lt;/h4&gt;

&lt;p data-height=&quot;265&quot; data-theme-id=&quot;0&quot; data-slug-hash=&quot;VEGdqo&quot; data-default-tab=&quot;js,result&quot; data-user=&quot;Afirus&quot; data-pen-title=&quot;Client-side spellchecking, contenteditable DIV&quot; class=&quot;codepen&quot;&gt;See the Pen &lt;a href=&quot;https://codepen.io/Afirus/pen/VEGdqo/&quot;&gt;Client-side spellchecking, contenteditable DIV&lt;/a&gt; by sempostma (&lt;a href=&quot;https://codepen.io/Afirus&quot;&gt;@Afirus&lt;/a&gt;) on &lt;a href=&quot;https://codepen.io&quot;&gt;CodePen&lt;/a&gt;.&lt;/p&gt;
&lt;script async=&quot;&quot; src=&quot;https://static.codepen.io/assets/embed/ei.js&quot;&gt;&lt;/script&gt;

&lt;p&gt;&lt;ins class=&quot;adsbygoogle&quot; style=&quot;display:block&quot; data-ad-client=&quot;ca-pub-9732535637352249&quot; data-ad-slot=&quot;6033478353&quot; data-ad-format=&quot;auto&quot; data-full-width-responsive=&quot;true&quot;&gt;&lt;/ins&gt;
&lt;script&gt;	
(adsbygoogle = window.adsbygoogle || []).push({});	
&lt;/script&gt;&lt;/p&gt;

&lt;p&gt;A complete spellchecker using BJSpell: &lt;a href=&quot;https://spell-checker.site&quot;&gt;spell-checker.site&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;div class=&quot;affiliate&quot;&gt;
    &lt;h3&gt;Resources:&lt;/h3&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fjavascript-in-24-hours-sams-teach-yourself-9780672338090&quot;&gt;Javascript
            in 24 hours&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fhtml-css-and-javascript-all-in-one-covering-html5-css3-9780672338083&quot;&gt;HTML,
            CSS, ES6 all in one&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Flearning-react-a-hands-on-guide-to-building-web-applications-9780134843551&quot;&gt;A
            Hands-On Guide to Building Web Applications Using React&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Flearning-react-a-hands-on-guide-to-building-web-applications-9780134843551http%3A%2F%2Fwww.informit.com%2Fstore%2Flearning-regular-expressions-9780134757063&quot;&gt;Learning
            Regular Expressions&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fnode.js-mongodb-and-angular-web-development-the-definitive-9780134655536&quot;&gt;Node.js,
            MongoDB, and Angular web development&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;p&gt;&lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=145238.10000683&amp;amp;type=3&amp;amp;subid=0&quot;&gt;InformIT
            eBook Store&lt;/a&gt;&lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.10000683&amp;amp;type=3&amp;amp;subid=0&quot; /&gt;
        has a large number of ebooks on a wide range of topics. I would definitely recommend them.&lt;/p&gt;
    &lt;h3&gt;Great courses:&lt;/h3&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fjavascript-beginner.html&quot;&gt;Javascript
            for beginners in 3 hours&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fjavascript-basics-web-development-building-blocks.html&quot;&gt;Javascript
            basic web development building blocks&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fmobile-ui-and-ux-design.html&quot;&gt;Mobile
            UI and UX Design&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fmobile-ui-and-ux-design.htmlhttps%3A%2F%2Fwww.quickstart.com%2Fbuilding-web-applications-with-react.html&quot;&gt;Building
            web applications with react&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fstarting-with-angular-4.html&quot;&gt;Starting
            with angular 4&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fprogramming-in-c-ms-20483.html&quot;&gt;Programming
            in C#&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt; (recommended)
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Ffind-training%2Ftraining-by-topic%2Fapp-development%2Fweb-development.html&quot;&gt;More
            web development courses&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;p&gt;
        &lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=579862.416&amp;amp;type=3&amp;amp;subid=0&quot;&gt;Quickstart
        &lt;/a&gt;&lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.416&amp;amp;type=3&amp;amp;subid=0&quot; /&gt;
        offers a large amount of (online) courses on web development (&lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=579862.416&amp;amp;type=3&amp;amp;subid=0&quot;&gt;Use
            Code LSOFF50&lt;/a&gt;&lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.416&amp;amp;type=3&amp;amp;subid=0&quot; /&gt;
        to get 50% off ;p)
    &lt;/p&gt;
&lt;/div&gt;</content>

      
      
      
      
      

      <author>
          <name>Sem Postma</name>
        
        
      </author>

      

      

      
        <summary type="html">I saw this question on stackoverflow: Need Client side spell checker for DIV. There are not a lot of libraries available that will allow you to do this but I did find an older library called bjspell which does the job.</summary>
      

      
      
        
        <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://esstudio.site/uploads/spellchecker.jpg" />
      
    </entry>
  
    
    
    <entry>
      <title type="html">ATC Manager 2 - Text Commands Tutorial</title>
      <link href="https://esstudio.site/2018/10/22/atc-manager-2-text-commands-tutorial.html" rel="alternate" type="text/html" title="ATC Manager 2 - Text Commands Tutorial" />
      <published>2018-10-22T21:49:22+02:00</published>
      <updated>2018-10-22T21:49:22+02:00</updated>
      <id>https://esstudio.site/2018/10/22/atc-manager-2-text-commands-tutorial</id>
      <content type="html" xml:base="https://esstudio.site/2018/10/22/atc-manager-2-text-commands-tutorial.html">&lt;p&gt;All Tutorials&lt;/p&gt;

&lt;h3 id=&quot;text-comands-tutorial&quot;&gt;Text Comands Tutorial&lt;/h3&gt;

&lt;h4 id=&quot;enable-text-commands&quot;&gt;Enable text commands&lt;/h4&gt;

&lt;p&gt;To enable text commands you have to go into advanced settings.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://esstudio.site/atc-manager-2/assets/images/tutorials/text-commands/advanced-settings.png&quot; alt=&quot;Open advanced settings&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Then switch the “Text commands” to “On”&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://esstudio.site/atc-manager-2/assets/images/tutorials/text-commands/text-commands.png&quot; alt=&quot;Enable text commands&quot; /&gt;&lt;/p&gt;

&lt;h4 id=&quot;command-formats&quot;&gt;Command formats&lt;/h4&gt;

&lt;p&gt;Commands are case insensitive&lt;/p&gt;

&lt;h6 id=&quot;changing-heading&quot;&gt;Changing heading&lt;/h6&gt;

&lt;p&gt;&amp;lt;airplane callsign&amp;gt; HDG &amp;lt;heading in degrees&amp;gt;&lt;/p&gt;

&lt;p&gt;&amp;lt;airplane callsign&amp;gt; turn &amp;lt;heading in degrees&amp;gt;&lt;/p&gt;

&lt;p&gt;&amp;lt;airplane callsign&amp;gt; turn left heading &amp;lt;heading in degrees&amp;gt;&lt;/p&gt;

&lt;p&gt;e.g DLH213 turn left heading 200&lt;/p&gt;

&lt;h6 id=&quot;changing-altitude&quot;&gt;Changing altitude&lt;/h6&gt;

&lt;p&gt;&amp;lt;airplane callsign&amp;gt; alt &amp;lt;flightlevel or altitude in feet&amp;gt;&lt;/p&gt;

&lt;p&gt;&amp;lt;airplane callsign&amp;gt; climb and maintain &amp;lt;flightlevel or altitude in feet&amp;gt;&lt;/p&gt;

&lt;p&gt;DLH213 alt fl230&lt;/p&gt;

&lt;h6 id=&quot;changing-direct-to&quot;&gt;Changing “Direct to”&lt;/h6&gt;

&lt;p&gt;&amp;lt;airplane callsign&amp;gt; dct &amp;lt;waypoint/runway callsign&amp;gt;&lt;/p&gt;

&lt;p&gt;&amp;lt;airplane callsign&amp;gt; direct &amp;lt;waypoint/runway callsign&amp;gt;&lt;/p&gt;

&lt;p&gt;&amp;lt;airplane callsign&amp;gt; direct to &amp;lt;waypoint/runway callsign&amp;gt;&lt;/p&gt;

&lt;p&gt;e.g DLH213 dct EH11&lt;/p&gt;

&lt;h6 id=&quot;changing-speed&quot;&gt;Changing speed&lt;/h6&gt;

&lt;p&gt;&amp;lt;airplane callsign&amp;gt; spd &amp;lt;speed in knots&amp;gt;&lt;/p&gt;

&lt;p&gt;&amp;lt;airplane callsign&amp;gt; increase speed &amp;lt;speed in knots&amp;gt;&lt;/p&gt;

&lt;p&gt;&amp;lt;airplane callsign&amp;gt; reduce speed &amp;lt;speed in knots&amp;gt;&lt;/p&gt;

&lt;p&gt;&amp;lt;airplane callsign&amp;gt; reduce speed to &amp;lt;speed in knots&amp;gt;&lt;/p&gt;

&lt;p&gt;e.g DLH213 spd 200&lt;/p&gt;

&lt;h6 id=&quot;takeoff&quot;&gt;Takeoff&lt;/h6&gt;

&lt;p&gt;&amp;lt;airplane callsign&amp;gt; takeoff&lt;/p&gt;

&lt;p&gt;&amp;lt;airplane callsign&amp;gt; clear for takeoff&lt;/p&gt;

&lt;p&gt;e.g DLH213 clear for takeoff&lt;/p&gt;

&lt;h6 id=&quot;go-around&quot;&gt;Go-around&lt;/h6&gt;

&lt;p&gt;&amp;lt;airplane callsign&amp;gt; go around&lt;/p&gt;

&lt;p&gt;&amp;lt;airplane callsign&amp;gt; goaround&lt;/p&gt;

&lt;p&gt;e.g DLH213 go around&lt;/p&gt;

&lt;h6 id=&quot;target-state-vfr&quot;&gt;Target State (VFR)&lt;/h6&gt;

&lt;p&gt;&amp;lt;airplane callsign&amp;gt; extend &amp;lt;vfr state&amp;gt;&lt;/p&gt;

&lt;p&gt;e.g DLH213 extend downwind&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;div class=&quot;affiliate&quot;&gt;
    &lt;h3&gt;Resources:&lt;/h3&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fjavascript-in-24-hours-sams-teach-yourself-9780672338090&quot;&gt;Javascript
            in 24 hours&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fhtml-css-and-javascript-all-in-one-covering-html5-css3-9780672338083&quot;&gt;HTML,
            CSS, ES6 all in one&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Flearning-react-a-hands-on-guide-to-building-web-applications-9780134843551&quot;&gt;A
            Hands-On Guide to Building Web Applications Using React&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Flearning-react-a-hands-on-guide-to-building-web-applications-9780134843551http%3A%2F%2Fwww.informit.com%2Fstore%2Flearning-regular-expressions-9780134757063&quot;&gt;Learning
            Regular Expressions&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fnode.js-mongodb-and-angular-web-development-the-definitive-9780134655536&quot;&gt;Node.js,
            MongoDB, and Angular web development&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;p&gt;&lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=145238.10000683&amp;amp;type=3&amp;amp;subid=0&quot;&gt;InformIT
            eBook Store&lt;/a&gt;&lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.10000683&amp;amp;type=3&amp;amp;subid=0&quot; /&gt;
        has a large number of ebooks on a wide range of topics. I would definitely recommend them.&lt;/p&gt;
    &lt;h3&gt;Great courses:&lt;/h3&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fjavascript-beginner.html&quot;&gt;Javascript
            for beginners in 3 hours&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fjavascript-basics-web-development-building-blocks.html&quot;&gt;Javascript
            basic web development building blocks&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fmobile-ui-and-ux-design.html&quot;&gt;Mobile
            UI and UX Design&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fmobile-ui-and-ux-design.htmlhttps%3A%2F%2Fwww.quickstart.com%2Fbuilding-web-applications-with-react.html&quot;&gt;Building
            web applications with react&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fstarting-with-angular-4.html&quot;&gt;Starting
            with angular 4&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fprogramming-in-c-ms-20483.html&quot;&gt;Programming
            in C#&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt; (recommended)
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Ffind-training%2Ftraining-by-topic%2Fapp-development%2Fweb-development.html&quot;&gt;More
            web development courses&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;p&gt;
        &lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=579862.416&amp;amp;type=3&amp;amp;subid=0&quot;&gt;Quickstart
        &lt;/a&gt;&lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.416&amp;amp;type=3&amp;amp;subid=0&quot; /&gt;
        offers a large amount of (online) courses on web development (&lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=579862.416&amp;amp;type=3&amp;amp;subid=0&quot;&gt;Use
            Code LSOFF50&lt;/a&gt;&lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.416&amp;amp;type=3&amp;amp;subid=0&quot; /&gt;
        to get 50% off ;p)
    &lt;/p&gt;
&lt;/div&gt;</content>

      
      
      
      
      

      <author>
          <name>Sem Postma</name>
        
        
      </author>

      

      

      
        <summary type="html">All Tutorials</summary>
      

      
      
        
        <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://esstudio.site/uploads/text-commands2-1.png" />
      
    </entry>
  
    
    
    <entry>
      <title type="html">ATC Manager 2 - Tutorial</title>
      <link href="https://esstudio.site/2018/10/22/atc-manager-2-tutorial.html" rel="alternate" type="text/html" title="ATC Manager 2 - Tutorial" />
      <published>2018-10-22T21:35:23+02:00</published>
      <updated>2018-10-22T21:35:23+02:00</updated>
      <id>https://esstudio.site/2018/10/22/atc-manager-2-tutorial</id>
      <content type="html" xml:base="https://esstudio.site/2018/10/22/atc-manager-2-tutorial.html">&lt;p&gt;All Tutorials&lt;/p&gt;

&lt;h3 id=&quot;intro-tutorial&quot;&gt;Intro Tutorial&lt;/h3&gt;

&lt;h4 id=&quot;index&quot;&gt;Index&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;Starting&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Giving commands&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Landing&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;starting&quot;&gt;Starting&lt;/h4&gt;

&lt;p&gt;Start by selecting an area (default). You can leave everything on default except for the difficulty setting.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://esstudio.site/atc-manager-2/assets/images/tutorials/intro/start-panel.png&quot; alt=&quot;The start panel&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Press “START”. You will now see something like this:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://esstudio.site/atc-manager-2/assets/images/tutorials/intro/start-atc-view.png&quot; alt=&quot;The game&quot; /&gt;&lt;/p&gt;

&lt;p&gt;There are 3 elements on your screen. The radar in the middle is your overview. The panel in the top right (see image below) is a list of flight strips. These are all the flights you’re managing.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://esstudio.site/atc-manager-2/assets/images/tutorials/intro/traffic-stack.png&quot; alt=&quot;Flight strips&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The buttons in the bottom right (see image below) allow you to pause, save, change optons, view logs and view information about your airfield and the game.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://esstudio.site/atc-manager-2/assets/images/tutorials/intro/btns.png&quot; alt=&quot;Buttons&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Every airplane on the radar screen has text next to it. It includes the altitude in feet or flight level and the planes airspeed in knots &lt;a href=&quot;[https://en.wikipedia.org/wiki/Knot_](https://en.wikipedia.org/wiki/Knot_&quot; title=&quot;https://en.wikipedia.org/wiki/Knot_&quot;&gt;(wiki)&lt;/a&gt;(unit)). Flight level &lt;a href=&quot;[https://en.wikipedia.org/wiki/Flight_level](https://en.wikipedia.org/wiki/Flight_level&quot; title=&quot;https://en.wikipedia.org/wiki/Flight_level&quot;&gt;(wiki)&lt;/a&gt;) or “FL” is roughly one hundredth of a feet (12,000 ft is FL120). Flight levels depend on air pressure while altitude in feet references the altitude above mean sea level (MSL). Transition altitude (TA) is when airplanes switch over to using flight levels. This is usually 18,000 ft. You can view more information about an airplane by clicking the question mark on the airplane’s flight strip (see image below).&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://esstudio.site/atc-manager-2/assets/images/tutorials/intro/question-mark.png&quot; alt=&quot;Question mark button&quot; /&gt;&lt;/p&gt;

&lt;p&gt;This opens a panel which includes information about the plane, like the operator, the callsign, airplane specification, etc.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://esstudio.site/atc-manager-2/assets/images/tutorials/intro/airplane-info.png&quot; alt=&quot;Airplane information panel&quot; /&gt;&lt;/p&gt;

&lt;p&gt;If you click on an airplane in the flight strips list or on the radar screen the airplane becomes highlighted.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://esstudio.site/atc-manager-2/assets/images/tutorials/intro/airplane.png&quot; alt=&quot;Airplane not selected&quot; /&gt;&lt;img src=&quot;https://esstudio.site/atc-manager-2/assets/images/tutorials/intro/airplane-selected.png&quot; alt=&quot;Airplane selected&quot; /&gt;&lt;/p&gt;

&lt;p&gt;A fourth element will appear on your screen. The “commands” panel (see image below).&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://esstudio.site/atc-manager-2/assets/images/tutorials/intro/commands.png&quot; alt=&quot;Commands panel&quot; /&gt;&lt;/p&gt;

&lt;p&gt;This can be used to give airplanes commands. Like the airplanes direction (heading), it’s altitude, speed, and other commands like “go-around” and “takeoff”.&lt;/p&gt;

&lt;h4 id=&quot;giving-commands&quot;&gt;Giving commands&lt;/h4&gt;

&lt;p&gt;Let’s start by changing the airplane’s direction. As a reference let’s look at this compass:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://esstudio.site/atc-manager-2/assets/images/tutorials/intro/compass.jpg&quot; alt=&quot;Compass&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Every direction is given in degrees. There are a total of 360 different directions. 0 or 360° is north, 90° is east, 180° is south and 270° is west. Let’s change heading to 180° (south).&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://esstudio.site/atc-manager-2/assets/images/tutorials/intro/heading.png&quot; alt=&quot;Heading south&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Then press the “GIVE COMMAND” button.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://esstudio.site/atc-manager-2/assets/images/tutorials/intro/give-command.png&quot; alt=&quot;Give command&quot; /&gt;&lt;/p&gt;

&lt;p&gt;You will notice the airplane slowly turning to left until it reaches a heading of 180°.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://esstudio.site/atc-manager-2/assets/images/tutorials/intro/airplane-south.png&quot; alt=&quot;Airplane turning to the south&quot; /&gt;&lt;/p&gt;

&lt;p&gt;You can do the same thing for the “Direct to”, “Speed” and “Altitude” boxes. The reason the airplane was turning so slow is because it’s still flying at cruise speed. Let’s lower it’s speed to 270 knots. The knot is a unit of speed equel to one nautical mile per hour, exactly 1.852 km/h and approximately 1.15078 mph&lt;a href=&quot;[https://en.wikipedia.org/wiki/Knot_](https://en.wikipedia.org/wiki/Knot_&quot; title=&quot;https://en.wikipedia.org/wiki/Knot_&quot;&gt;(wiki)&lt;/a&gt;(unit)). After you’ve changed the speed box to “270”, press “GIVE COMMAND”. You will notice a red arrow pointing down next to the airspeed. This means the airplane is reducing it’s speed.&lt;/p&gt;

&lt;h4 id=&quot;landing&quot;&gt;Landing&lt;/h4&gt;

&lt;p&gt;To land an airplane you first have to line it up with the runway (see image below), it has be less then 3200 feet above the airport and has to flying in the general direction of the runway.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://esstudio.site/atc-manager-2/assets/images/tutorials/intro/ils.png&quot; alt=&quot;Airplane lining up with the ILS&quot; /&gt;&lt;/p&gt;

&lt;p&gt;If this is all correct, you will see the message, “Land using ‘Direct to’”, under the “GIVE COMMAND” button. Select the runway in the “Direct to” input box.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://esstudio.site/atc-manager-2/assets/images/tutorials/intro/dct-rwy.png&quot; alt=&quot;Select runway&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Then click “GIVE COMMAND”.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://esstudio.site/atc-manager-2/assets/images/tutorials/intro/dct-rwy-cmd.png&quot; alt=&quot;Select runway command&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Hopefully you know how to start. If you don’t or you have a question,&lt;a href=&quot;[https://en.wikipedia.org/wiki/Knot_](https://en.wikipedia.org/wiki/Knot_&quot; title=&quot;https://en.wikipedia.org/wiki/Knot_&quot;&gt;visit the subreddit&lt;/a&gt;(unit)). If you want to continue learning, you can check out more tutorials by clicking the “All TUTORIALS” button below.&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;div class=&quot;affiliate&quot;&gt;
    &lt;h3&gt;Resources:&lt;/h3&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fjavascript-in-24-hours-sams-teach-yourself-9780672338090&quot;&gt;Javascript
            in 24 hours&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fhtml-css-and-javascript-all-in-one-covering-html5-css3-9780672338083&quot;&gt;HTML,
            CSS, ES6 all in one&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Flearning-react-a-hands-on-guide-to-building-web-applications-9780134843551&quot;&gt;A
            Hands-On Guide to Building Web Applications Using React&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Flearning-react-a-hands-on-guide-to-building-web-applications-9780134843551http%3A%2F%2Fwww.informit.com%2Fstore%2Flearning-regular-expressions-9780134757063&quot;&gt;Learning
            Regular Expressions&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fnode.js-mongodb-and-angular-web-development-the-definitive-9780134655536&quot;&gt;Node.js,
            MongoDB, and Angular web development&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;p&gt;&lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=145238.10000683&amp;amp;type=3&amp;amp;subid=0&quot;&gt;InformIT
            eBook Store&lt;/a&gt;&lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.10000683&amp;amp;type=3&amp;amp;subid=0&quot; /&gt;
        has a large number of ebooks on a wide range of topics. I would definitely recommend them.&lt;/p&gt;
    &lt;h3&gt;Great courses:&lt;/h3&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fjavascript-beginner.html&quot;&gt;Javascript
            for beginners in 3 hours&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fjavascript-basics-web-development-building-blocks.html&quot;&gt;Javascript
            basic web development building blocks&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fmobile-ui-and-ux-design.html&quot;&gt;Mobile
            UI and UX Design&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fmobile-ui-and-ux-design.htmlhttps%3A%2F%2Fwww.quickstart.com%2Fbuilding-web-applications-with-react.html&quot;&gt;Building
            web applications with react&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fstarting-with-angular-4.html&quot;&gt;Starting
            with angular 4&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fprogramming-in-c-ms-20483.html&quot;&gt;Programming
            in C#&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt; (recommended)
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Ffind-training%2Ftraining-by-topic%2Fapp-development%2Fweb-development.html&quot;&gt;More
            web development courses&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;p&gt;
        &lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=579862.416&amp;amp;type=3&amp;amp;subid=0&quot;&gt;Quickstart
        &lt;/a&gt;&lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.416&amp;amp;type=3&amp;amp;subid=0&quot; /&gt;
        offers a large amount of (online) courses on web development (&lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=579862.416&amp;amp;type=3&amp;amp;subid=0&quot;&gt;Use
            Code LSOFF50&lt;/a&gt;&lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.416&amp;amp;type=3&amp;amp;subid=0&quot; /&gt;
        to get 50% off ;p)
    &lt;/p&gt;
&lt;/div&gt;</content>

      
      
      
      
      

      <author>
          <name>Sem Postma</name>
        
        
      </author>

      

      

      
        <summary type="html">All Tutorials</summary>
      

      
      
        
        <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://esstudio.site/uploads/atctut2.png" />
      
    </entry>
  
    
    
    <entry>
      <title type="html">ATC Manager 2 - Tutorials and General Aviation</title>
      <link href="https://esstudio.site/2018/09/27/atc-manager-2-tutorials-and-general-aviation.html" rel="alternate" type="text/html" title="ATC Manager 2 - Tutorials and General Aviation" />
      <published>2018-09-27T17:57:08+02:00</published>
      <updated>2018-09-27T17:57:08+02:00</updated>
      <id>https://esstudio.site/2018/09/27/atc-manager-2---tutorials-and-general-aviation</id>
      <content type="html" xml:base="https://esstudio.site/2018/09/27/atc-manager-2-tutorials-and-general-aviation.html">&lt;p&gt;&lt;strong&gt;Tutorials&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I’m in the process of writing tutorials for the general aviation feature of the game (which will soon be added). I thought it would be cool to include some tutorials from the community in the game! If anyone is interested you could message me a pastebin link or a youtube video etc. You will of course be credited along with the tutorial and in the about section as a top contributor of the game.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;General Aviation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The next update of the game will include general aviation. It will be put behind a checkbox to keep the game simple (and because there could be a lot of changed to it in the future). I really like the feature because it makes the game a lot more dynamic.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/uploads/vfr.png&quot; alt=&quot;&quot; /&gt;
General Aviation&lt;/p&gt;

&lt;p&gt;Some work needs to to be put in to collision avoidance, correct states for each type of VFR (visual flight rules) flight (Inbound, Outbound, Enroute, Closed Pattern), Go-arounds, Touch and go’s and new general aviation airplanes. Feedback is welcome because the feature is not done yet, so i can still change things without to much hassle. General aviation airplanes do not always fly VFR, you will also see them in the regular IFR (instrument flight rules) traffic.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/uploads/vfrpanel.png&quot; alt=&quot;&quot; /&gt;
VFR Traffic&lt;/p&gt;

&lt;p&gt;VFR traffic is not controlled by setting heading and altitude. You can give the instructions listed above.&lt;/p&gt;

&lt;div class=&quot;affiliate&quot;&gt;
    &lt;h3&gt;Resources:&lt;/h3&gt;

    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fweb-game-developers-cookbook-using-javascript-and-html5-9780134788333&quot;&gt;Web
            game developers cookbook using javascript and html5&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;

    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fintroduction-to-game-design-prototyping-and-development-9780134659862&quot;&gt;Game
            design with unity and C#&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;

    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Funity-2018-game-development-in-24-hours-sams-teach-9780134998138&quot;&gt;Unity
            game development in 24 hours&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;

    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fgame-programming-in-c-plus-plus-creating-3d-games-9780134597201&quot;&gt;Creating
            3D games in C++&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;

    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fdeveloping-ai-with-unreal-engine-4-breathe-life-into-9780134999951&quot;&gt;Developing
            AI with Unreal Engine&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;

    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Ffind-training%2Ftraining-by-topic%2Fapp-development%2Fweb-development.html&quot;&gt;More
            web development courses&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;

    &lt;p&gt;&lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=145238.10000683&amp;amp;type=3&amp;amp;subid=0&quot;&gt;InformIT
            eBook Store&lt;/a&gt;&lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.10000683&amp;amp;type=3&amp;amp;subid=0&quot; /&gt;
        has a large number of ebooks on a wide range of topcis. I would definitely recommend them&lt;/p&gt;
    &lt;h3&gt;Great courses:&lt;/h3&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fgame-development-fundamentals-with-python.html&quot;&gt;Game
            development fundamentals with python&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;

    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fpython-game-development-create-a-flappy-bird-clone.html&quot;&gt;Create
            a Flappy Bird Clone with Python&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;

    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fgame-development-on-unity.html&quot;&gt;Game
            Development on Unity&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;

    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fhtml5-game-from-scratch-step-by-step-learning-javascript.html&quot;&gt;HTML5
            Game from scratch step by step learning JavaScript&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;

    &lt;p&gt;
        &lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=579862.416&amp;amp;type=3&amp;amp;subid=0&quot;&gt;Quickstart
        &lt;/a&gt;&lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.416&amp;amp;type=3&amp;amp;subid=0&quot; /&gt;
        offers a large amount of (online) courses on game development (&lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=579862.416&amp;amp;type=3&amp;amp;subid=0&quot;&gt;Use
            Code LSOFF50&lt;/a&gt;&lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.416&amp;amp;type=3&amp;amp;subid=0&quot; /&gt;
        to get 50% off ;p).
    &lt;/p&gt;
&lt;/div&gt;

&lt;div class=&quot;app-portal&quot; style=&quot;width: 400px; max-width: 100%; padding: 10px&quot;&gt;
    &lt;img src=&quot;https://esstudio.site/uploads/vfr.png&quot; alt=&quot;&quot; style=&quot;max-width: 50%; margin: 20px auto&quot; /&gt;
    &lt;h1&gt;ATC Manager 2&lt;/h1&gt;
    &lt;p&gt;Web based air traffic control game. Manage airspace of busy airports like Schiphol or Heathrow in a realistic simulator.&lt;/p&gt;
    &lt;a class=&quot;btn&quot; href=&quot;https://esstudio.site/atc-manager-2&quot;&gt;
        &lt;span&gt;Launch&lt;/span&gt;
        &lt;svg viewBox=&quot;0 0 10 18&quot; style=&quot;height: 1.2em&quot;&gt;&lt;path d=&quot;m0.8,1l8,8l-8,8&quot; fill=&quot;none&quot; stroke-width=&quot;2&quot; style=&quot;stroke: currentColor;&quot; /&gt;&lt;/svg&gt;
    &lt;/a&gt;
&lt;/div&gt;

&lt;blockquote class=&quot;reddit-card&quot; data-card-created=&quot;1538064249&quot;&gt;&lt;a href=&quot;https://www.reddit.com/r/ATCManager2/comments/9jb89w/tutorials_and_general_aviation/&quot;&gt;Tutorials and General Aviation&lt;/a&gt; from &lt;a href=&quot;http://www.reddit.com/r/ATCManager2&quot;&gt;r/ATCManager2&lt;/a&gt;&lt;/blockquote&gt;
&lt;script async=&quot;&quot; src=&quot;//embed.redditmedia.com/widgets/platform.js&quot; charset=&quot;UTF-8&quot;&gt;&lt;/script&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;div class=&quot;affiliate&quot;&gt;
    &lt;h3&gt;Resources:&lt;/h3&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fjavascript-in-24-hours-sams-teach-yourself-9780672338090&quot;&gt;Javascript
            in 24 hours&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fhtml-css-and-javascript-all-in-one-covering-html5-css3-9780672338083&quot;&gt;HTML,
            CSS, ES6 all in one&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Flearning-react-a-hands-on-guide-to-building-web-applications-9780134843551&quot;&gt;A
            Hands-On Guide to Building Web Applications Using React&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Flearning-react-a-hands-on-guide-to-building-web-applications-9780134843551http%3A%2F%2Fwww.informit.com%2Fstore%2Flearning-regular-expressions-9780134757063&quot;&gt;Learning
            Regular Expressions&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fnode.js-mongodb-and-angular-web-development-the-definitive-9780134655536&quot;&gt;Node.js,
            MongoDB, and Angular web development&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;p&gt;&lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=145238.10000683&amp;amp;type=3&amp;amp;subid=0&quot;&gt;InformIT
            eBook Store&lt;/a&gt;&lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.10000683&amp;amp;type=3&amp;amp;subid=0&quot; /&gt;
        has a large number of ebooks on a wide range of topics. I would definitely recommend them.&lt;/p&gt;
    &lt;h3&gt;Great courses:&lt;/h3&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fjavascript-beginner.html&quot;&gt;Javascript
            for beginners in 3 hours&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fjavascript-basics-web-development-building-blocks.html&quot;&gt;Javascript
            basic web development building blocks&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fmobile-ui-and-ux-design.html&quot;&gt;Mobile
            UI and UX Design&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fmobile-ui-and-ux-design.htmlhttps%3A%2F%2Fwww.quickstart.com%2Fbuilding-web-applications-with-react.html&quot;&gt;Building
            web applications with react&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fstarting-with-angular-4.html&quot;&gt;Starting
            with angular 4&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fprogramming-in-c-ms-20483.html&quot;&gt;Programming
            in C#&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt; (recommended)
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Ffind-training%2Ftraining-by-topic%2Fapp-development%2Fweb-development.html&quot;&gt;More
            web development courses&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;p&gt;
        &lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=579862.416&amp;amp;type=3&amp;amp;subid=0&quot;&gt;Quickstart
        &lt;/a&gt;&lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.416&amp;amp;type=3&amp;amp;subid=0&quot; /&gt;
        offers a large amount of (online) courses on web development (&lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=579862.416&amp;amp;type=3&amp;amp;subid=0&quot;&gt;Use
            Code LSOFF50&lt;/a&gt;&lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.416&amp;amp;type=3&amp;amp;subid=0&quot; /&gt;
        to get 50% off ;p)
    &lt;/p&gt;
&lt;/div&gt;</content>

      
      
      
      
      

      <author>
          <name>Sem Postma</name>
        
        
      </author>

      

      

      
        <summary type="html">Tutorials</summary>
      

      
      
        
        <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://esstudio.site/uploads/vfr.png" />
      
    </entry>
  
    
    
    <entry xml:lang="">
      <title type="html">3D Texturing using curvature maps.</title>
      <link href="https://esstudio.site/2018/09/10/3d-texturing-using-curvature-maps.html" rel="alternate" type="text/html" title="3D Texturing using curvature maps." />
      <published>2018-09-10T13:30:08+02:00</published>
      <updated>2018-09-10T13:30:08+02:00</updated>
      <id>https://esstudio.site/2018/09/10/3d-texturing-using-curvature-maps</id>
      <content type="html" xml:base="https://esstudio.site/2018/09/10/3d-texturing-using-curvature-maps.html">&lt;p&gt;Using curvature maps is a great way of improving your diffuse/occlusion maps and potentially also other kind of UV maps. Im sorry if I’m not the most educated on this subject but I was very pleased with the final result. I decided to create eight meshes which I then unwrapped on a single 4096 by 4096 px image. Creating each map for all of the meshes and then combining them took a long time to complete. But the fun part was generating the curvature maps. In short the curvature map stores the convexity of the mesh in the Red color value, and concavity in the Green color value. Convexity of the mesh means the places on the model where the mesh is curving outwards. Concavity means basically the opposite so the places on the model where the mesh is “hollow”. In my case, only the Convexity was important because i wanted to outline the spots on the mesh where a lot of wear could occur. I only used the Red channel (convexity), and desaturated it. And used the white color to brighten parts of the diffuse map. I also applied this technique to the metalness map.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/uploads/diffuse2-1.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/uploads/diffuse2.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;ins class=&quot;adsbygoogle&quot; style=&quot;display:block&quot; data-ad-client=&quot;ca-pub-9732535637352249&quot; data-ad-slot=&quot;6033478353&quot; data-ad-format=&quot;auto&quot; data-full-width-responsive=&quot;true&quot;&gt;&lt;/ins&gt;
&lt;script&gt;	
(adsbygoogle = window.adsbygoogle || []).push({});	
&lt;/script&gt;&lt;/p&gt;

&lt;p&gt;On the left the basic Diffuse map, on the right the Diffuse map with the convexity layer added.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/uploads/normal.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/uploads/occlusion.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;ins class=&quot;adsbygoogle&quot; style=&quot;display:block&quot; data-ad-client=&quot;ca-pub-9732535637352249&quot; data-ad-slot=&quot;6033478353&quot; data-ad-format=&quot;auto&quot; data-full-width-responsive=&quot;true&quot;&gt;&lt;/ins&gt;
&lt;script&gt;	
(adsbygoogle = window.adsbygoogle || []).push({});	
&lt;/script&gt;&lt;/p&gt;

&lt;p&gt;On the left the normal map and on the right the height map.&lt;/p&gt;

&lt;p&gt;Final results:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/uploads/unityeditor2.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/uploads/unityeditor.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;ins class=&quot;adsbygoogle&quot; style=&quot;display:block&quot; data-ad-client=&quot;ca-pub-9732535637352249&quot; data-ad-slot=&quot;6033478353&quot; data-ad-format=&quot;auto&quot; data-full-width-responsive=&quot;true&quot;&gt;&lt;/ins&gt;
&lt;script&gt;	
(adsbygoogle = window.adsbygoogle || []).push({});	
&lt;/script&gt;&lt;/p&gt;

&lt;div class=&quot;affiliate&quot;&gt;
    &lt;h3&gt;Resources:&lt;/h3&gt;

    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Flearn-adobe-photoshop-cc-for-visual-design-adobe-certified-9780134878256&quot;&gt;Learn Adobe Photoshop CC for Visual Design: Adobe Certified Associate Exam Preparation, 2nd Edition&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;

    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Ffinal-cut-pro-x-10.4-apple-pro-training-series-professional-9780135171738&quot;&gt;Final Cut Pro X 10.4 - Apple Pro Training Series: Professional Post-Production&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;

    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Flearn-adobe-premiere-pro-cc-for-video-communication-9780134878577&quot;&gt;Learn Adobe Premiere Pro CC for Video Communication: Adobe Certified Associate Exam Preparation&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;

    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Flearn-adobe-dreamweaver-cc-for-web-authoring-adobe-9780134892658&quot;&gt;Learn Adobe Dreamweaver CC for Web Authoring: Adobe Certified Associate Exam Preparation, 2nd Edition&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;

    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fdiscovering-autocad-2017-9780134506890&quot;&gt;Discovering AutoCAD 2017&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;

    &lt;p&gt;
        &lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=145238.10000683&amp;amp;type=3&amp;amp;subid=0&quot;&gt;InformIT eBook Store&lt;/a&gt;
        &lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.10000683&amp;amp;type=3&amp;amp;subid=0&quot; /&gt; has a large number of ebooks on a wide range of topcis. I would definitely recommend them&lt;/p&gt;
    &lt;h3&gt;Great courses:&lt;/h3&gt;

    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fphotoshop-cs6-beginner.html&quot;&gt;Photoshop CS6 Beginner&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;

    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fillustrator-cs6-advanced.html&quot;&gt;Illustrator CS6 Advanced&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;

    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Findesign-cs6-advanced.html&quot;&gt;InDesign CS6 Advanced&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;

    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fadobe-audition-cc-basics.html&quot;&gt;Adobe Audition CC Basics&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;

    &lt;p&gt;
        &lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=579862.416&amp;amp;type=3&amp;amp;subid=0&quot;&gt;Quickstart
        &lt;/a&gt;
        &lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.416&amp;amp;type=3&amp;amp;subid=0&quot; /&gt; offers a large amount of (online) courses on game development (
        &lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=579862.416&amp;amp;type=3&amp;amp;subid=0&quot;&gt;Use Code LSOFF50&lt;/a&gt;
        &lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.416&amp;amp;type=3&amp;amp;subid=0&quot; /&gt; to get 50% off ;p).
    &lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</content>

      
      
      
      
      

      <author>
          <name>Sem Postma</name>
        
        
      </author>

      

      

      
        <summary type="html">Using curvature maps is a great way of improving your diffuse/occlusion maps and potentially also other kind of UV maps. Im sorry if I’m not the most educated on this subject but I was very pleased with the final result. I decided to create eight meshes which I then unwrapped on a single 4096 by 4096 px image. Creating each map for all of the meshes and then combining them took a long time to complete. But the fun part was generating the curvature maps. In short the curvature map stores the convexity of the mesh in the Red color value, and concavity in the Green color value. Convexity of the mesh means the places on the model where the mesh is curving outwards. Concavity means basically the opposite so the places on the model where the mesh is “hollow”. In my case, only the Convexity was important because i wanted to outline the spots on the mesh where a lot of wear could occur. I only used the Red channel (convexity), and desaturated it. And used the white color to brighten parts of the diffuse map. I also applied this technique to the metalness map.</summary>
      

      
      
        
        <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://esstudio.site/uploads/rocks1.png" />
      
    </entry>
  
    
    
    <entry>
      <title type="html">Amsterdam Outdoor Urinals</title>
      <link href="https://esstudio.site/2018/09/05/amsterdam-outdoor-urinals.html" rel="alternate" type="text/html" title="Amsterdam Outdoor Urinals" />
      <published>2018-09-05T18:48:00+02:00</published>
      <updated>2018-09-05T18:48:00+02:00</updated>
      <id>https://esstudio.site/2018/09/05/amsterdam-outdoor-urinals</id>
      <content type="html" xml:base="https://esstudio.site/2018/09/05/amsterdam-outdoor-urinals.html">&lt;p&gt;Searching for Amsterdam Outdoor Urinals or a public toilet near you? You can use this website to find a public bathroom in the city of Amsterdam. You can also find information about the restroom like: Does the restroom or urinal have lighting? Does it have a roof?&lt;/p&gt;

&lt;div class=&quot;app-portal&quot; style=&quot;width: 400px; max-width: 100%; padding: 10px&quot;&gt;
    &lt;img src=&quot;https://esstudio.site/uploads/android-chrome-512x512-7ca550.png&quot; alt=&quot;&quot; style=&quot;max-width: 50%; margin: 20px auto&quot; /&gt;
    &lt;h1&gt;Amsterdam Public Toilets&lt;/h1&gt;
    &lt;p&gt;Amsterdam urinals and bathrooms. &lt;a href=&quot;https://play.google.com/store/apps/details?id=com.EchoSierraStudio.Amsterdam_Public_Toilets&quot; target=&quot;_blank&quot;&gt;Google Play&lt;/a&gt;&lt;/p&gt;
    &lt;a class=&quot;btn&quot; href=&quot;https://esstudio.site/public-toilets-amsterdam&quot;&gt;
        &lt;span&gt;Launch&lt;/span&gt;
        &lt;svg viewBox=&quot;0 0 10 18&quot; style=&quot;height: 1.2em&quot;&gt;&lt;path d=&quot;m0.8,1l8,8l-8,8&quot; fill=&quot;none&quot; stroke-width=&quot;2&quot; style=&quot;stroke: currentColor;&quot; /&gt;&lt;/svg&gt;
    &lt;/a&gt;
&lt;/div&gt;

&lt;p&gt;Need a rental to bike to get there? Check out this app:&lt;/p&gt;

&lt;div class=&quot;app-portal&quot; style=&quot;width: 400px; max-width: 100%; padding: 10px&quot;&gt;
    &lt;img src=&quot;https://esstudio.site/uploads/my_logo_512.png&quot; alt=&quot;&quot; style=&quot;max-width: 50%; margin: 20px auto&quot; /&gt;
    &lt;h1&gt;OV Bike Rentals&lt;/h1&gt;
    &lt;p&gt;NS bikes rental locations in Amsterdam/The Netherlands. &lt;a href=&quot;https://play.google.com/store/apps/details?id=com.EchoSierraStudio.Ov_Fiets_App&quot; target=&quot;_blank&quot;&gt;Google Play&lt;/a&gt;&lt;/p&gt;
    &lt;a class=&quot;btn&quot; href=&quot;https://esstudio.site/ov-fiets-app&quot;&gt;
        &lt;span&gt;Launch&lt;/span&gt;
        &lt;svg viewBox=&quot;0 0 10 18&quot; style=&quot;height: 1.2em&quot;&gt;&lt;path d=&quot;m0.8,1l8,8l-8,8&quot; fill=&quot;none&quot; stroke-width=&quot;2&quot; style=&quot;stroke: currentColor;&quot; /&gt;&lt;/svg&gt;
    &lt;/a&gt;
&lt;/div&gt;</content>

      
      
      
      
      

      <author>
          <name>Sem Postma</name>
        
        
      </author>

      

      

      
        <summary type="html">Searching for Amsterdam Outdoor Urinals or a public toilet near you? You can use this website to find a public bathroom in the city of Amsterdam. You can also find information about the restroom like: Does the restroom or urinal have lighting? Does it have a roof?</summary>
      

      
      
        
        <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://esstudio.site/uploads/urinal-amsterdam.jpg" />
      
    </entry>
  
    
    
    <entry>
      <title type="html">Bike Rental Amsterdam</title>
      <link href="https://esstudio.site/2018/09/05/bike-rental-amsterdam.html" rel="alternate" type="text/html" title="Bike Rental Amsterdam" />
      <published>2018-09-05T18:25:00+02:00</published>
      <updated>2018-09-05T18:25:00+02:00</updated>
      <id>https://esstudio.site/2018/09/05/bike-rental-amsterdam</id>
      <content type="html" xml:base="https://esstudio.site/2018/09/05/bike-rental-amsterdam.html">&lt;p&gt;Having trouble finding a bike rental location in Amsterdam? View all NS bikes, bike hire and NS rental locations in Amsterdam and the rest of Holland/the Netherlands.&lt;/p&gt;

&lt;div class=&quot;app-portal&quot; style=&quot;width: 400px; max-width: 100%; padding: 10px&quot;&gt;
    &lt;img src=&quot;https://esstudio.site/uploads/my_logo_512.png&quot; alt=&quot;&quot; style=&quot;max-width: 50%; margin: 20px auto&quot; /&gt;
    &lt;h1&gt;OV Bike Rentals&lt;/h1&gt;
    &lt;p&gt;NS bikes rental locations in Amsterdam/The Netherlands. &lt;a href=&quot;https://play.google.com/store/apps/details?id=com.EchoSierraStudio.Ov_Fiets_App&quot; target=&quot;_blank&quot;&gt;Google Play&lt;/a&gt;&lt;/p&gt;
    &lt;a class=&quot;btn&quot; href=&quot;https://esstudio.site/ov-fiets-app&quot;&gt;
        &lt;span&gt;Launch&lt;/span&gt;
        &lt;svg viewBox=&quot;0 0 10 18&quot; style=&quot;height: 1.2em&quot;&gt;&lt;path d=&quot;m0.8,1l8,8l-8,8&quot; fill=&quot;none&quot; stroke-width=&quot;2&quot; style=&quot;stroke: currentColor;&quot; /&gt;&lt;/svg&gt;
    &lt;/a&gt;
&lt;/div&gt;

&lt;p&gt;You can use the “OV Fiets App” to easily find information about NS bike rental locations. When you type in a city or location, the app will show you a list of suggested bike rental locations. When you’ve found the right rental location you click the “Go” button or select the station. This will open a page showing  the location’s status (open or closed), the amount of bikes available, time since the last update, opening hours and the position of the bike rental location.&lt;/p&gt;

&lt;p&gt;&lt;ins class=&quot;adsbygoogle&quot; style=&quot;display:block&quot; data-ad-client=&quot;ca-pub-9732535637352249&quot; data-ad-slot=&quot;6033478353&quot; data-ad-format=&quot;auto&quot; data-full-width-responsive=&quot;true&quot;&gt;&lt;/ins&gt;
&lt;script&gt;	
(adsbygoogle = window.adsbygoogle || []).push({});	
&lt;/script&gt;&lt;/p&gt;

&lt;p&gt;If you’re visiting Amsterdam this app might also come in handy:&lt;/p&gt;

&lt;div class=&quot;app-portal&quot; style=&quot;width: 400px; max-width: 100%; padding: 10px&quot;&gt;
    &lt;img src=&quot;https://esstudio.site/uploads/android-chrome-512x512-7ca550.png&quot; alt=&quot;&quot; style=&quot;max-width: 50%; margin: 20px auto&quot; /&gt;
    &lt;h1&gt;Amsterdam Public Toilets&lt;/h1&gt;
    &lt;p&gt;Searching for public urinals in amsterdam? this interactive chart shows all the public toilets/urinals/bathrooms in the city center of Amsterdam. &lt;a href=&quot;https://play.google.com/store/apps/details?id=com.EchoSierraStudio.Amsterdam_Public_Toilets&quot; target=&quot;_blank&quot;&gt;Google Play&lt;/a&gt;&lt;/p&gt;
    &lt;a class=&quot;btn&quot; href=&quot;https://esstudio.site/public-toilets-amsterdam&quot;&gt;
        &lt;span&gt;Launch&lt;/span&gt;
        &lt;svg viewBox=&quot;0 0 10 18&quot; style=&quot;height: 1.2em&quot;&gt;&lt;path d=&quot;m0.8,1l8,8l-8,8&quot; fill=&quot;none&quot; stroke-width=&quot;2&quot; style=&quot;stroke: currentColor;&quot; /&gt;&lt;/svg&gt;
    &lt;/a&gt;
&lt;/div&gt;

&lt;p&gt;The OV Fiets App uses open data from &lt;a href=&quot;https://openov.nl/&quot;&gt;openov.nl&lt;/a&gt; and is provided by the NS-Lab.&lt;/p&gt;</content>

      
      
      
      
      

      <author>
          <name>Sem Postma</name>
        
        
      </author>

      

      

      
        <summary type="html">Having trouble finding a bike rental location in Amsterdam? View all NS bikes, bike hire and NS rental locations in Amsterdam and the rest of Holland/the Netherlands.</summary>
      

      
      
        
        <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://esstudio.site/uploads/ov-fiets-amsterdam.jpg" />
      
    </entry>
  
    
    
    <entry>
      <title type="html">Air Traffic Controller Games</title>
      <link href="https://esstudio.site/2018/09/04/air-traffic-controller-games.html" rel="alternate" type="text/html" title="Air Traffic Controller Games" />
      <published>2018-09-04T12:48:00+02:00</published>
      <updated>2018-09-04T12:48:00+02:00</updated>
      <id>https://esstudio.site/2018/09/04/air-traffic-controller-games</id>
      <content type="html" xml:base="https://esstudio.site/2018/09/04/air-traffic-controller-games.html">&lt;p&gt;Not all of the ATC apps listed here are games. Alot of them are simulators. If you are a real Air Traffic Controller and like to preted to be at work when you come home. Not all of these ATC games are free but i will take that into account.&lt;/p&gt;

&lt;h2 id=&quot;air-control-madness&quot;&gt;&lt;a href=&quot;https://play.google.com/store/apps/details?id=com.EchoSierraStudio.AirControlMadness&amp;amp;hl=en_US&quot;&gt;Air Control Madness&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;&lt;img src=&quot;/uploads/image-a460e5.png&quot; alt=&quot;image-a460e5.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Air Control Madness is an adictive  atc game which puts the job of handling incoming traffic, in your hands. &lt;a href=&quot;https://play.google.com/store/apps/details?id=com.EchoSierraStudio.AirControlMadness&quot;&gt;Link.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;ins class=&quot;adsbygoogle&quot; style=&quot;display:block&quot; data-ad-client=&quot;ca-pub-9732535637352249&quot; data-ad-slot=&quot;6033478353&quot; data-ad-format=&quot;auto&quot; data-full-width-responsive=&quot;true&quot;&gt;&lt;/ins&gt;
&lt;script&gt;	
(adsbygoogle = window.adsbygoogle || []).push({});	
&lt;/script&gt;&lt;/p&gt;

&lt;h2 id=&quot;atc-manager&quot;&gt;&lt;a href=&quot;https://play.google.com/store/apps/details?id=com.EchoSierraStudio.ATCManager&quot;&gt;ATC Manager&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;&lt;img src=&quot;/uploads/atc-manager.png&quot; alt=&quot;atc-manager.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/uploads/atc-manager-screenshot.png&quot; alt=&quot;atc-manager-screenshot.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://play.google.com/store/apps/details?id=com.EchoSierraStudio.ATCManager&quot;&gt;Checkout the App.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;ATC Manager is an ATC TRACON sim. Load and save your progress. It features a variety of real world airlines and aircraft (all with their own specifications) dynamic runway use, infinite flights, different speed settings and an easy to use interface.&lt;/p&gt;

&lt;h2 id=&quot;atc-manager-2-️&quot;&gt;&lt;a href=&quot;https://esstudio.site/atc-manager-2&quot;&gt;ATC Manager 2 ✈️&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;&lt;img src=&quot;/uploads/atc.PNG&quot; alt=&quot;atc.PNG&quot; /&gt;&lt;/p&gt;

&lt;div class=&quot;app-portal&quot; style=&quot;width: 400px; max-width: 100%; padding: 10px&quot;&gt;
    &lt;img src=&quot;https://esstudio.site/uploads/schiphol.PNG&quot; alt=&quot;&quot; style=&quot;max-width: 50%; margin: 20px auto&quot; /&gt;
    &lt;h1&gt;ATC Manager 2&lt;/h1&gt;
    &lt;p&gt;ATC Manager 2 is a web based air traffic control game. Manage airspace of busy airports like Schiphol or Heathrow in a realistic simulator.&lt;/p&gt;
    &lt;a class=&quot;btn&quot; href=&quot;https://esstudio.site/atc-manager-2&quot;&gt;
        &lt;span&gt;Launch&lt;/span&gt;
        &lt;svg viewBox=&quot;0 0 10 18&quot; style=&quot;height: 1.2em&quot;&gt;&lt;path d=&quot;m0.8,1l8,8l-8,8&quot; fill=&quot;none&quot; stroke-width=&quot;2&quot; style=&quot;stroke: currentColor;&quot; /&gt;&lt;/svg&gt;
    &lt;/a&gt;
&lt;/div&gt;

&lt;p&gt;ATC Manager 2 is a free web based app with a ton of features. It has support for speech synthesis. It has alot of customization options. Unlike alot of other ATC games it allows you to save and load progress.&lt;/p&gt;

&lt;h2 id=&quot;unmatched-air-traffic-control&quot;&gt;&lt;a href=&quot;https://www.facebook.com/unmatchedairtraffic/&quot;&gt;&lt;strong&gt;Unmatched Air Traffic Control&lt;/strong&gt;&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;Unmatched Air Traffic Controll is a very fun 3D air traffic control game. Unmatched Air traffic Control is a game for Android iOS and Windows Phone. A new version of this game, Unmatched Air Traffic Control 2, has also been released.&lt;/p&gt;

&lt;p&gt;&lt;ins class=&quot;adsbygoogle&quot; style=&quot;display:block&quot; data-ad-client=&quot;ca-pub-9732535637352249&quot; data-ad-slot=&quot;6033478353&quot; data-ad-format=&quot;auto&quot; data-full-width-responsive=&quot;true&quot;&gt;&lt;/ins&gt;
&lt;script&gt;	
(adsbygoogle = window.adsbygoogle || []).push({});	
&lt;/script&gt;&lt;/p&gt;

&lt;h2 id=&quot;air-traffic-controller-4&quot;&gt;&lt;a href=&quot;https://www.amazon.com/Techno-Traffic-Controller-International-Airport/dp/B01EK2460S&quot;&gt;&lt;strong&gt;Air Traffic Controller 4&lt;/strong&gt;&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;Air Traffic Controller 4 is a simulator game  that simulates the operation of an airport. The player’s mission is to direct planes onto the correct ILS, land them on the runway, taxi them to the correct gate, and to direct takeoffs.&lt;/p&gt;

&lt;h2 id=&quot;take-control-of-the-tower&quot;&gt;&lt;a href=&quot;https://play.google.com/store/apps/details?id=air.nu.strafwerk.takecontrol&quot;&gt;&lt;strong&gt;Take Control of the Tower&lt;/strong&gt;&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;This game is rather more difficulat. You must align the aircraft with the runway while separating between arrivals and departure.&lt;/p&gt;

&lt;h2 id=&quot;atc-sim&quot;&gt;&lt;a href=&quot;https://atc-sim.com/&quot;&gt;&lt;strong&gt;ATC-SIM&lt;/strong&gt;&lt;/a&gt;&lt;/h2&gt;

&lt;h2&gt;&lt;img src=&quot;/uploads/maxresdefault.jpg&quot; alt=&quot;maxresdefault.jpg&quot; /&gt;&lt;/h2&gt;

&lt;p&gt;ATC-SIM is a browser-based air traffic control simulator. It works by typing commands into a textbox. The game is simple and very addictive to play.&lt;/p&gt;

&lt;p&gt;&lt;ins class=&quot;adsbygoogle&quot; style=&quot;display:block&quot; data-ad-client=&quot;ca-pub-9732535637352249&quot; data-ad-slot=&quot;6033478353&quot; data-ad-format=&quot;auto&quot; data-full-width-responsive=&quot;true&quot;&gt;&lt;/ins&gt;
&lt;script&gt;	
(adsbygoogle = window.adsbygoogle || []).push({});	
&lt;/script&gt;&lt;/p&gt;

&lt;h2 id=&quot;air-control-lite&quot;&gt;&lt;a href=&quot;https://play.google.com/store/apps/details?id=dk.logisoft.aircontrol&amp;amp;hl=nl&quot;&gt;&lt;strong&gt;Air Control Lite&lt;/strong&gt;&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;&lt;img src=&quot;/uploads/download.jpg&quot; alt=&quot;download.jpg&quot; /&gt;&lt;/p&gt;

&lt;p&gt;This simple and addictive game where the player has to control an airport with two runways and one helipad. The planes have different colors, Red, Blue and Green. Red for large incoming flights, blue for smaller planes, and green for incoming helicopters. It has the number one ranking in ATC games category on Google Play Store.&lt;/p&gt;

&lt;h2 id=&quot;endless-atc&quot;&gt;&lt;a href=&quot;https://store.steampowered.com/app/666610/Endless_ATC/&quot;&gt;&lt;strong&gt;Endless ATC&lt;/strong&gt;&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;Endless ATC is an easy to play simulation game, where you are an air traffic controller at the approach radar of a busy airport. The goal is to guide the planes safely to the runways to get a high score. If you make no errors, the number of planes you have to control gets larger and larger. How many flights at a time can you handle?&lt;/p&gt;

&lt;h2 id=&quot;flightradar24&quot;&gt;&lt;a href=&quot;https://www.flightradar24.com/60,15/6&quot;&gt;&lt;strong&gt;FlightRadar24&lt;/strong&gt;&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;The world’s most popular flight tracker. Watch aircraft move around the world in real-time on detailed map, get up-to-date flight status &amp;amp; airport information.&lt;/p&gt;

&lt;p&gt;&lt;ins class=&quot;adsbygoogle&quot; style=&quot;display:block&quot; data-ad-client=&quot;ca-pub-9732535637352249&quot; data-ad-slot=&quot;6033478353&quot; data-ad-format=&quot;auto&quot; data-full-width-responsive=&quot;true&quot;&gt;&lt;/ins&gt;
&lt;script&gt;	
(adsbygoogle = window.adsbygoogle || []).push({});	
&lt;/script&gt;&lt;/p&gt;</content>

      
      
      
      
      

      <author>
          <name>Sem Postma</name>
        
        
      </author>

      

      

      
        <summary type="html">Not all of the ATC apps listed here are games. Alot of them are simulators. If you are a real Air Traffic Controller and like to preted to be at work when you come home. Not all of these ATC games are free but i will take that into account.</summary>
      

      
      
        
        <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://esstudio.site/uploads/tracon.jpg" />
      
    </entry>
  
    
    
    <entry>
      <title type="html">Youtube Comment Generator</title>
      <link href="https://esstudio.site/2018/08/31/youtube-comment-generator.html" rel="alternate" type="text/html" title="Youtube Comment Generator" />
      <published>2018-08-31T04:05:00+02:00</published>
      <updated>2018-08-31T04:05:00+02:00</updated>
      <id>https://esstudio.site/2018/08/31/youtube-comment-generator</id>
      <content type="html" xml:base="https://esstudio.site/2018/08/31/youtube-comment-generator.html">&lt;p&gt;Searching for a good youtube comments generator?&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/uploads/youtube-comments-are-evil-screenshot.png&quot; alt=&quot;youtube-comments-are-evil-screenshot.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;ins class=&quot;adsbygoogle&quot; style=&quot;display:block&quot; data-ad-client=&quot;ca-pub-9732535637352249&quot; data-ad-slot=&quot;6033478353&quot; data-ad-format=&quot;auto&quot; data-full-width-responsive=&quot;true&quot;&gt;&lt;/ins&gt;
&lt;script&gt;	
(adsbygoogle = window.adsbygoogle || []).push({});	
&lt;/script&gt;&lt;/p&gt;

&lt;p&gt;This website is a free youtube comments generator. The created random comments are based on the existing comments on that video. If a youtube video has a lot of comments the results will be best.&lt;/p&gt;

&lt;div class=&quot;app-portal&quot; style=&quot;width: 400px; max-width: 100%; padding: 10px&quot;&gt;
    &lt;img src=&quot;https://esstudio.site/uploads/comment.PNG&quot; alt=&quot;&quot; style=&quot;max-width: 50%; margin: 20px auto&quot; /&gt;
    &lt;h1&gt;Youtube Comments are Evil&lt;/h1&gt;
    &lt;p&gt;Generate fake youtube comments.&lt;/p&gt;
    &lt;a class=&quot;btn&quot; href=&quot;https://ycae.esstudio.site/&quot;&gt;
        &lt;span&gt;Launch&lt;/span&gt;
        &lt;svg viewBox=&quot;0 0 10 18&quot; style=&quot;height: 1.2em&quot;&gt;&lt;path d=&quot;m0.8,1l8,8l-8,8&quot; fill=&quot;none&quot; stroke-width=&quot;2&quot; style=&quot;stroke: currentColor;&quot; /&gt;&lt;/svg&gt;
    &lt;/a&gt;
&lt;/div&gt;</content>

      
      
      
      
      

      <author>
          <name>Sem Postma</name>
        
        
      </author>

      

      

      
        <summary type="html">Searching for a good youtube comments generator?</summary>
      

      
      
        
        <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://esstudio.site/uploads/comment.PNG" />
      
    </entry>
  
    
    
    <entry>
      <title type="html">Earth at Night</title>
      <link href="https://esstudio.site/2018/08/30/earth-at-night.html" rel="alternate" type="text/html" title="Earth at Night" />
      <published>2018-08-30T18:31:00+02:00</published>
      <updated>2018-08-30T18:31:00+02:00</updated>
      <id>https://esstudio.site/2018/08/30/earth-at-night</id>
      <content type="html" xml:base="https://esstudio.site/2018/08/30/earth-at-night.html">&lt;p&gt;Check out how the earth looks from space and view NASA’s image of the day. This world map/chart is provided by NASA satellite images. The map wil always show the most recent earth imaging. You can even add the page as an app to your homescreen (desktop and mobile), you can find the instructions at the bottom of the &lt;a href=&quot;https://esstudio.site/earthatnight/&quot;&gt;page&lt;/a&gt;.&lt;/p&gt;

&lt;div class=&quot;app-portal&quot; style=&quot;width: 400px; max-width: 100%; padding: 10px&quot;&gt;
    &lt;img src=&quot;https://esstudio.site/uploads/earthatnight-2f3131.png&quot; alt=&quot;&quot; style=&quot;max-width: 50%; margin: 20px auto&quot; /&gt;
    &lt;h1&gt;Earth at Night&lt;/h1&gt;
    &lt;p&gt;View the earth at night.&lt;/p&gt;
    &lt;a class=&quot;btn&quot; href=&quot;https://esstudio.site/earthatnight&quot;&gt;
        &lt;span&gt;Launch&lt;/span&gt;
        &lt;svg viewBox=&quot;0 0 10 18&quot; style=&quot;height: 1.2em&quot;&gt;&lt;path d=&quot;m0.8,1l8,8l-8,8&quot; fill=&quot;none&quot; stroke-width=&quot;2&quot; style=&quot;stroke: currentColor;&quot; /&gt;&lt;/svg&gt;
    &lt;/a&gt;
&lt;/div&gt;

&lt;p&gt;Imagery provided by services from the Global Imagery Browse Services (GIBS), operated by the NASA/GSFC/Earth Science Data and Information System (&lt;a href=&quot;https://earthdata.nasa.gov/&quot;&gt;ESDIS&lt;/a&gt;) with funding provided by NASA/HQ.&lt;/p&gt;</content>

      
      
      
      
      

      <author>
          <name>Sem Postma</name>
        
        
      </author>

      

      

      
        <summary type="html">Check out how the earth looks from space and view NASA’s image of the day. This world map/chart is provided by NASA satellite images. The map wil always show the most recent earth imaging. You can even add the page as an app to your homescreen (desktop and mobile), you can find the instructions at the bottom of the page.</summary>
      

      
      
        
        <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://esstudio.site/uploads/earthatnight.png" />
      
    </entry>
  
    
    
    <entry>
      <title type="html">ATC Manager</title>
      <link href="https://esstudio.site/2018/08/30/atc-manager.html" rel="alternate" type="text/html" title="ATC Manager" />
      <published>2018-08-30T18:07:00+02:00</published>
      <updated>2018-08-30T18:07:00+02:00</updated>
      <id>https://esstudio.site/2018/08/30/atc-manager</id>
      <content type="html" xml:base="https://esstudio.site/2018/08/30/atc-manager.html">&lt;p&gt;&lt;strong&gt;Version 2 is out!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;New planes, new operators, new airfields, save your progress and new features!&lt;/p&gt;

&lt;p&gt;You can find the game in the &lt;a href=&quot;https://play.google.com/store/apps/details?id=com.EchoSierraStudio.ATCManager&amp;amp;hl=en_US&quot;&gt;Google Play&lt;/a&gt; store.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/uploads/Screenshot_20180830-181002.png&quot; alt=&quot;Screenshot_20180830-181002.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/uploads/Screenshot_20180830-181005.png&quot; alt=&quot;Screenshot_20180830-181005.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/uploads/Screenshot_20180830-181012.png&quot; alt=&quot;Screenshot_20180830-181012.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/uploads/Screenshot_20180830-181018.png&quot; alt=&quot;Screenshot_20180830-181018.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;WHAT’S NEW&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Design changes&lt;/li&gt;
  &lt;li&gt;Different font&lt;/li&gt;
  &lt;li&gt;More maps&lt;/li&gt;
  &lt;li&gt;More planes&lt;/li&gt;
  &lt;li&gt;More operators&lt;/li&gt;
  &lt;li&gt;Timer&lt;/li&gt;
  &lt;li&gt;Toggleable labels&lt;/li&gt;
  &lt;li&gt;Realistic locations&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;ATC Manager is a realistic Air Traffic Control manager which features a variety of real world airlines and aircraft (all with their own specifications) dynamic runway use, infinite flights, different speed settings and an easy to use interface.&lt;/p&gt;

&lt;p&gt;Download it on &lt;a href=&quot;https://play.google.com/store/apps/details?id=com.EchoSierraStudio.ATCManager&amp;amp;hl=en_US&quot;&gt;Google Play&lt;/a&gt;. Also check out the web based ATC Manager, which was also previously updated, &lt;a href=&quot;https://esstudio.site/atc-manager-2/&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Road map:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Commands to speech ability&lt;/li&gt;
  &lt;li&gt;Editable content (create your own airplanes &amp;amp; airports)&lt;/li&gt;
  &lt;li&gt;More realistic flight behavior&lt;/li&gt;
  &lt;li&gt;SID/STARS&lt;/li&gt;
  &lt;li&gt;General Aviation (GA)&lt;/li&gt;
  &lt;li&gt;More interesting weather dynamics&lt;/li&gt;
  &lt;li&gt;Scenario’s&lt;/li&gt;
  &lt;li&gt;ATC log&lt;/li&gt;
  &lt;li&gt;Time limitations&lt;/li&gt;
  &lt;li&gt;Better penalties system&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;h2 id=&quot;learning-how-to-program-or-improving-programmings-skills&quot;&gt;Learning how to program or improving programmings skills:&lt;/h2&gt;

&lt;div class=&quot;affiliate&quot;&gt;
    &lt;h3&gt;Resources:&lt;/h3&gt;

    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fweb-game-developers-cookbook-using-javascript-and-html5-9780134788333&quot;&gt;Web
            game developers cookbook using javascript and html5&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;

    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fintroduction-to-game-design-prototyping-and-development-9780134659862&quot;&gt;Game
            design with unity and C#&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;

    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Funity-2018-game-development-in-24-hours-sams-teach-9780134998138&quot;&gt;Unity
            game development in 24 hours&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;

    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fgame-programming-in-c-plus-plus-creating-3d-games-9780134597201&quot;&gt;Creating
            3D games in C++&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;

    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fdeveloping-ai-with-unreal-engine-4-breathe-life-into-9780134999951&quot;&gt;Developing
            AI with Unreal Engine&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;

    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Ffind-training%2Ftraining-by-topic%2Fapp-development%2Fweb-development.html&quot;&gt;More
            web development courses&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;

    &lt;p&gt;&lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=145238.10000683&amp;amp;type=3&amp;amp;subid=0&quot;&gt;InformIT
            eBook Store&lt;/a&gt;&lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.10000683&amp;amp;type=3&amp;amp;subid=0&quot; /&gt;
        has a large number of ebooks on a wide range of topcis. I would definitely recommend them&lt;/p&gt;
    &lt;h3&gt;Great courses:&lt;/h3&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fgame-development-fundamentals-with-python.html&quot;&gt;Game
            development fundamentals with python&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;

    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fpython-game-development-create-a-flappy-bird-clone.html&quot;&gt;Create
            a Flappy Bird Clone with Python&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;

    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fgame-development-on-unity.html&quot;&gt;Game
            Development on Unity&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;

    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fhtml5-game-from-scratch-step-by-step-learning-javascript.html&quot;&gt;HTML5
            Game from scratch step by step learning JavaScript&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;

    &lt;p&gt;
        &lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=579862.416&amp;amp;type=3&amp;amp;subid=0&quot;&gt;Quickstart
        &lt;/a&gt;&lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.416&amp;amp;type=3&amp;amp;subid=0&quot; /&gt;
        offers a large amount of (online) courses on game development (&lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=579862.416&amp;amp;type=3&amp;amp;subid=0&quot;&gt;Use
            Code LSOFF50&lt;/a&gt;&lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.416&amp;amp;type=3&amp;amp;subid=0&quot; /&gt;
        to get 50% off ;p).
    &lt;/p&gt;
&lt;/div&gt;</content>

      
      
      
      
      

      <author>
          <name>Sem Postma</name>
        
        
      </author>

      

      

      
        <summary type="html">Version 2 is out!</summary>
      

      
      
        
        <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://esstudio.site/uploads/Screenshot_20180830-180953.png" />
      
    </entry>
  
    
    
    <entry xml:lang="nl-nl">
      <title type="html">Kadaster Kaart</title>
      <link href="https://esstudio.site/2018/08/29/kadaster-kaart.html" rel="alternate" type="text/html" title="Kadaster Kaart" />
      <published>2018-08-29T12:23:00+02:00</published>
      <updated>2018-08-29T12:23:00+02:00</updated>
      <id>https://esstudio.site/2018/08/29/kadaster-kaart</id>
      <content type="html" xml:base="https://esstudio.site/2018/08/29/kadaster-kaart.html">&lt;p&gt;Met de kadaster kaart kunt u gemakkelijk online kadasterdata bekijken in Nederland. De actuele gegevens zijn makkelijk in te zien en op te slaan. Vind voor elk perceel, ligplaats, pand, verblijfplaats en standplaats in Nederland en groot aantal andere gegevens. De app gebruikt een minimaal gedeelte van u opslag en is zeer gemakkelijk te gebruiken. Wilt u bij Kadasterplan online een kadasterplan opvragen, bekijk dan eerst of u deze app kunt gebruiken.&lt;/p&gt;

&lt;p&gt;U kunt verschillende kaarten gebruiken zoals satelliet en plattegrond of de map van Nederland.&lt;/p&gt;

&lt;p&gt;Deze digitale kaart gebruikt open data die voor iedereen beschikbaar is (zie: &lt;a href=&quot;https://www.pdok.nl/&quot;&gt;Publieke Dienstverlening Op de Kaart (PDOK)&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;&lt;a class=&quot;button&quot; href=&quot;https://play.google.com/store/apps/details?id=com.EchoSierraStudio.Kadaster_Kaart&quot;&gt;Download de App&lt;/a&gt;&lt;/p&gt;</content>

      
      
      
      
      

      <author>
          <name>Sem Postma</name>
        
        
      </author>

      

      

      
        <summary type="html">Met de kadaster kaart kunt u gemakkelijk online kadasterdata bekijken in Nederland. De actuele gegevens zijn makkelijk in te zien en op te slaan. Vind voor elk perceel, ligplaats, pand, verblijfplaats en standplaats in Nederland en groot aantal andere gegevens. De app gebruikt een minimaal gedeelte van u opslag en is zeer gemakkelijk te gebruiken. Wilt u bij Kadasterplan online een kadasterplan opvragen, bekijk dan eerst of u deze app kunt gebruiken.</summary>
      

      
      
        
        <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://esstudio.site/uploads/screenshot2-cropped-95167b.png" />
      
    </entry>
  
    
    
    <entry>
      <title type="html">ATC Manager 2 - version 2</title>
      <link href="https://esstudio.site/2018/08/26/atc-manager-2-version-2.html" rel="alternate" type="text/html" title="ATC Manager 2 - version 2" />
      <published>2018-08-26T18:38:00+02:00</published>
      <updated>2018-08-26T18:38:00+02:00</updated>
      <id>https://esstudio.site/2018/08/26/atc-manager-2-version-2</id>
      <content type="html" xml:base="https://esstudio.site/2018/08/26/atc-manager-2-version-2.html">&lt;p&gt;With the release of version 2 a lot of things have changed (check out the changelog below). New airplanes, operators, icons, ATIS info and a bunch of improvements.&lt;/p&gt;

&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https://www.youtube-nocookie.com/embed/w--RyJ3FaBk?rel=0&amp;amp;showinfo=0&quot; frameborder=&quot;0&quot; allow=&quot;autoplay; encrypted-media&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;

&lt;div class=&quot;app-portal&quot; style=&quot;width: 400px; max-width: 100%; padding: 10px&quot;&gt;
    &lt;img src=&quot;https://esstudio.site/uploads/schiphol.PNG&quot; alt=&quot;&quot; style=&quot;max-width: 50%; margin: 20px auto&quot; /&gt;
    &lt;h1&gt;ATC Manager 2&lt;/h1&gt;
    &lt;p&gt;ATC Manager on the web.

&lt;/p&gt;
    &lt;a class=&quot;btn&quot; href=&quot;https://esstudio.site/atc-manager-2/&quot;&gt;
        &lt;span&gt;Launch&lt;/span&gt;
        &lt;svg viewBox=&quot;0 0 10 18&quot; style=&quot;height: 1.2em&quot;&gt;&lt;path d=&quot;m0.8,1l8,8l-8,8&quot; fill=&quot;none&quot; stroke-width=&quot;2&quot; style=&quot;stroke: currentColor;&quot; /&gt;&lt;/svg&gt;
    &lt;/a&gt;
&lt;/div&gt;

&lt;p&gt;&lt;a href=&quot;https://play.google.com/store/apps/details?id=com.EchoSierraStudio.ATCManager&quot;&gt;Also check out the android app&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Check out the &lt;a href=&quot;https://www.reddit.com/r/ATC/comments/8r1843/i_created_an_atc_simulator_game_in_the_browser&quot;&gt;reddit post&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you like the game and you want the game to stay (advertisement) free, please consider giving a small amount💰.&lt;/p&gt;

&lt;h2 id=&quot;goals&quot;&gt;Goals:&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;1€ Bug fixing&lt;/li&gt;
  &lt;li&gt;2€ Buy me a coffee&lt;/li&gt;
  &lt;li&gt;100€ New airlines&lt;/li&gt;
  &lt;li&gt;200€ New airplanes&lt;/li&gt;
  &lt;li&gt;250€ Custom Feature (for individual donation, include your email, also the feature - - request has to be fair and achievable)&lt;/li&gt;
  &lt;li&gt;500€ Speech synthesis for pilots&lt;/li&gt;
  &lt;li&gt;1000€ Speech recognition&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Check out the &lt;a href=&quot;https://www.gofundme.com/manage/atc-manager-2&quot;&gt;gofundme page&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can also donate using &lt;a href=&quot;https://bit.ly/2vTu7jp&quot;&gt;paypal&lt;/a&gt;&lt;/p&gt;

&lt;h1 id=&quot;changelog&quot;&gt;Changelog&lt;/h1&gt;

&lt;h2 id=&quot;120---2018-08-26&quot;&gt;[1.2.0] - 2018-08-26&lt;/h2&gt;

&lt;h3 id=&quot;added&quot;&gt;Added✅&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;Better icons&lt;/li&gt;
  &lt;li&gt;Android icons&lt;/li&gt;
  &lt;li&gt;Apple icons&lt;/li&gt;
  &lt;li&gt;Microsoft icons&lt;/li&gt;
  &lt;li&gt;Safari icons&lt;/li&gt;
  &lt;li&gt;Updated theme colors&lt;/li&gt;
  &lt;li&gt;In-game icons&lt;/li&gt;
  &lt;li&gt;Safety prompts when discarding unsaved data&lt;/li&gt;
  &lt;li&gt;Info panel&lt;/li&gt;
  &lt;li&gt;About panel&lt;/li&gt;
  &lt;li&gt;Logs panel&lt;/li&gt;
  &lt;li&gt;Donation info&lt;/li&gt;
  &lt;li&gt;More (realistic) logs&lt;/li&gt;
  &lt;li&gt;Tab close message if the user has unsaved progress&lt;/li&gt;
  &lt;li&gt;New planes
    &lt;ul&gt;
      &lt;li&gt;Boeing 757&lt;/li&gt;
      &lt;li&gt;Boeing 767&lt;/li&gt;
      &lt;li&gt;Boeing 777&lt;/li&gt;
      &lt;li&gt;Airbus A380&lt;/li&gt;
      &lt;li&gt;Airbus A330&lt;/li&gt;
      &lt;li&gt;Boeing 787 Dreamliner&lt;/li&gt;
      &lt;li&gt;Airbus A319&lt;/li&gt;
      &lt;li&gt;Airbus A320&lt;/li&gt;
      &lt;li&gt;Airbus A321&lt;/li&gt;
      &lt;li&gt;Airbus A350&lt;/li&gt;
      &lt;li&gt;Boeing 717&lt;/li&gt;
      &lt;li&gt;McDonell Douglas MD-88&lt;/li&gt;
      &lt;li&gt;McDonell Douglas MD-90&lt;/li&gt;
      &lt;li&gt;Embraer 190&lt;/li&gt;
      &lt;li&gt;McDonell Douglas MD-82&lt;/li&gt;
      &lt;li&gt;McDonell Douglas MD-83&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;New operators&lt;/li&gt;
  &lt;li&gt;Southwest Airlines&lt;/li&gt;
  &lt;li&gt;American Airlines&lt;/li&gt;
  &lt;li&gt;British Airways&lt;/li&gt;
  &lt;li&gt;Continental Airlines&lt;/li&gt;
  &lt;li&gt;Lufthansa&lt;/li&gt;
  &lt;li&gt;Air France&lt;/li&gt;
  &lt;li&gt;China Southern Airlines&lt;/li&gt;
  &lt;li&gt;China Eastern Airlines&lt;/li&gt;
  &lt;li&gt;All Nippon Airways&lt;/li&gt;
  &lt;li&gt;Ryanair&lt;/li&gt;
  &lt;li&gt;Turkish Airlines&lt;/li&gt;
  &lt;li&gt;Emirates&lt;/li&gt;
  &lt;li&gt;FedEx Express&lt;/li&gt;
  &lt;li&gt;UPS Airlines&lt;/li&gt;
  &lt;li&gt;Cathay Pacific&lt;/li&gt;
  &lt;li&gt;Qatar Airways&lt;/li&gt;
  &lt;li&gt;Korean Air&lt;/li&gt;
  &lt;li&gt;Cargolux&lt;/li&gt;
  &lt;li&gt;Air China&lt;/li&gt;
  &lt;li&gt;Egyptair&lt;/li&gt;
  &lt;li&gt;App caching (performance &amp;amp; offline use)&lt;/li&gt;
  &lt;li&gt;Altimeter setting&lt;/li&gt;
  &lt;li&gt;Atis info&lt;/li&gt;
  &lt;li&gt;Pilot messages are now included in the logs
&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;changed-&quot;&gt;Changed ❗&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;Fixed an issue where saving a map without a name caused issues&lt;/li&gt;
  &lt;li&gt;Better checkboxes (the old ones were ugly)&lt;/li&gt;
  &lt;li&gt;Styling tweaks&lt;/li&gt;
  &lt;li&gt;Game not updating in the background fixed&lt;/li&gt;
  &lt;li&gt;Updated operators on some aircraft&lt;/li&gt;
  &lt;li&gt;Speech synthesis default rate&lt;/li&gt;
  &lt;li&gt;Runway left/right switched fix&lt;/li&gt;
  &lt;li&gt;Default airport/map colors changed&lt;/li&gt;
  &lt;li&gt;Optimized web-app size
&lt;br /&gt;
&lt;br /&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;removed&quot;&gt;Removed❌&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;Speech recognition option is removed (because it hasn’t yet been implemented)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;</content>

      
      
      
      
      

      <author>
          <name>Sem Postma</name>
        
        
      </author>

      

      

      
        <summary type="html">With the release of version 2 a lot of things have changed (check out the changelog below). New airplanes, operators, icons, ATIS info and a bunch of improvements.</summary>
      

      
      
        
        <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://esstudio.site/uploads/schiphol.PNG" />
      
    </entry>
  
    
    
    <entry>
      <title type="html">Converting JSON from and to XML in Javascript</title>
      <link href="https://esstudio.site/2018/08/14/json2xml.html" rel="alternate" type="text/html" title="Converting JSON from and to XML in Javascript" />
      <published>2018-08-14T00:26:00+02:00</published>
      <updated>2018-08-14T00:26:00+02:00</updated>
      <id>https://esstudio.site/2018/08/14/json2xml</id>
      <content type="html" xml:base="https://esstudio.site/2018/08/14/json2xml.html">&lt;p&gt;Checkout the website: &lt;a href=&quot;https://esstudio.site/json2xml&quot;&gt;JSON2XML&lt;/a&gt; or the &lt;a href=&quot;#full-example&quot;&gt;full example&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;As it turns out, finding a good xml to json javascript library is not as easy as it sounds. I did find &lt;a href=&quot;https://davidwalsh.name/convert-xml-json&quot;&gt;this&lt;/a&gt; implementation does the job but sometimes the output can be a bit confusing:&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nx&quot;&gt;xmlToJson&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;DOMParser&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;parseFromString&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;lt;root root-attr=&quot;value&quot;&amp;gt;    &amp;lt;child child-attr=&quot;value&quot;&amp;gt; text  &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;  &amp;lt;/child&amp;gt;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;lt;/root&amp;gt;&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;application/xml&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;will output:&lt;/p&gt;

&lt;div class=&quot;language-json highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;root&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;@attributes&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
            &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;root-attr&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;value&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;#text&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
            &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;    &quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
            &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;child&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
            &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;@attributes&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
                &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;child-attr&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;value&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
            &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
            &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;#text&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot; text  &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;  &quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Borrowing from &lt;a href=&quot;https://davidwalsh.name/convert-xml-json&quot;&gt;David Walsh’s&lt;/a&gt; implementation, let’s implement the obj2xml function:&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;xml2obj&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;xml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;opt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;typeof&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;xml&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;string&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;dom&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;DOMParser&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;parseFromString&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;xml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;application/xml&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;xml&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;dom&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;childNodes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;dom&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;childNodes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;length&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;];&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;opt&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;opt&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{};&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;attrPrefix&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;opt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;attrPrefix&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;toObj&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;xml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;o&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{};&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;xml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;nodeType&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;xml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;attributes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;length&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;xml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;attributes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;length&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;++&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                    &lt;span class=&quot;nx&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;attrPrefix&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;xml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;attributes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;nodeName&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;xml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;attributes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;nodeValue&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;toString&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
                &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;xml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;firstChild&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;textChild&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;cdataChild&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;hasElementChild&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;xml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;firstChild&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;nextSibling&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;nodeType&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                        &lt;span class=&quot;nx&quot;&gt;hasElementChild&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
                    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;nodeType&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;nodeValue&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;match&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;[^&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt; &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\f\n\r\t\v]&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                            &lt;span class=&quot;nx&quot;&gt;textChild&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;++&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
                        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                            &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;nodeType&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                                &lt;span class=&quot;nx&quot;&gt;cdataChild&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;++&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
                            &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
                        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
                    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
                &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
                &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;hasElementChild&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;textChild&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;cdataChild&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                        &lt;span class=&quot;nx&quot;&gt;removeWhite&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;xml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                        &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;xml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;firstChild&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;nextSibling&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                            &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;nodeType&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                                &lt;span class=&quot;nx&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;#text&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;escape&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;nodeValue&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                            &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                                &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;nodeType&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                                    &lt;span class=&quot;nx&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;#cdata&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;escape&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;nodeValue&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                                &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                                    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;nodeName&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                                        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;nodeName&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;instanceof&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;Array&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                                            &lt;span class=&quot;nx&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;nodeName&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;][&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;nodeName&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;length&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;toObj&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                                        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                                            &lt;span class=&quot;nx&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;nodeName&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;nodeName&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;toObj&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)];&lt;/span&gt;
                                        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
                                    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                                        &lt;span class=&quot;nx&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;nodeName&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;toObj&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                                    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
                                &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
                            &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
                        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
                    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;xml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;attributes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;length&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                            &lt;span class=&quot;nx&quot;&gt;o&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;escape&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;innerXml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;xml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;));&lt;/span&gt;
                        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                            &lt;span class=&quot;nx&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;#text&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;escape&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;innerXml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;xml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;));&lt;/span&gt;
                        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
                    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
                &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;textChild&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;xml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;attributes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;length&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                            &lt;span class=&quot;nx&quot;&gt;o&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;escape&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;innerXml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;xml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;));&lt;/span&gt;
                        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                            &lt;span class=&quot;nx&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;#text&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;escape&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;innerXml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;xml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;));&lt;/span&gt;
                        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
                    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;cdataChild&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                            &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;cdataChild&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                                &lt;span class=&quot;nx&quot;&gt;o&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;escape&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;innerXml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;xml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;));&lt;/span&gt;
                            &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                                &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;xml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;firstChild&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;nextSibling&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                                    &lt;span class=&quot;nx&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;#cdata&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;escape&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;nodeValue&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                                &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
                            &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
                        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
                    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
                &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;xml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;attributes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;length&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;xml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;firstChild&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;nx&quot;&gt;o&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;xml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;nodeType&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;9&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;nx&quot;&gt;o&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;toObj&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;xml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;documentElement&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;nx&quot;&gt;alert&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;unhandled node type: &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;xml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;nodeType&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;o&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;innerXml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;node&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;s&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;innerHTML&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;node&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;nx&quot;&gt;s&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;node&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;innerHTML&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;asXml&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;s&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;nodeType&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                    &lt;span class=&quot;nx&quot;&gt;s&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;nodeName&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
                    &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;attributes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;length&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;++&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                        &lt;span class=&quot;nx&quot;&gt;s&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt; &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;attributes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;nodeName&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;=&quot;&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;attributes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;nodeValue&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;toString&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
                    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
                    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;firstChild&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                        &lt;span class=&quot;nx&quot;&gt;s&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
                        &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;c&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;firstChild&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;c&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;nextSibling&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                            &lt;span class=&quot;nx&quot;&gt;s&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;asXml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
                        &lt;span class=&quot;nx&quot;&gt;s&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;nodeName&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
                    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                        &lt;span class=&quot;nx&quot;&gt;s&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
                    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
                &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;nodeType&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                        &lt;span class=&quot;nx&quot;&gt;s&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;nodeValue&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
                    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;nodeType&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                            &lt;span class=&quot;nx&quot;&gt;s&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;lt;![CDATA[&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;nodeValue&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;]]&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;x3e&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
                        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
                    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
                &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
                &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;s&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;c&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;node&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;firstChild&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;c&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;nextSibling&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;nx&quot;&gt;s&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;asXml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;s&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;escape&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;txt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;txt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;replace&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;[\\]&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;/g&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\\\\&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;replace&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;/g&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\\&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;replace&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;[\n]&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;/g&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\\&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;replace&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;[\r]&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;/g&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\\&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;r&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;removeWhite&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;normalize&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;firstChild&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;nodeType&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;nodeValue&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;match&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;[^&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt; &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\f\n\r\t\v]&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                    &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;nxt&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;nextSibling&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
                    &lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;removeChild&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                    &lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;nxt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                    &lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;nextSibling&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;nodeType&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                    &lt;span class=&quot;nx&quot;&gt;removeWhite&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                    &lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;nextSibling&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                    &lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;nextSibling&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;xml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;nodeType&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;9&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;xml&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;xml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;documentElement&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;obj&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;toObj&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;removeWhite&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;xml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;));&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;obj&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This will return the desired output. The function takes in an xml string or an &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;XMLDocument&lt;/code&gt;.&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nx&quot;&gt;xml2obj&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;lt;root root-attr=&quot;value&quot;&amp;gt;    &amp;lt;child child-attr=&quot;value&quot;&amp;gt; text  &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;  &amp;lt;/child&amp;gt;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;lt;/root&amp;gt;&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;For example this xml string will become:&lt;/p&gt;

&lt;div class=&quot;language-json highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;root-attr&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;value&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;child&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;child-attr&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;value&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;#text&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot; text  &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\\&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;n  &quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;You can also pass in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;{ attrPrefix: &apos;@&apos; }&lt;/code&gt; as a second argument to prevent name collisions between attributes and child elements:&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nx&quot;&gt;xml2obj&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;lt;root samename=&quot;value&quot;&amp;gt;    &amp;lt;samename child-attr=&quot;value&quot;&amp;gt; text  &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;  &amp;lt;/samename&amp;gt;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;lt;/root&amp;gt;&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;attrPrefix&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Will become:&lt;/p&gt;

&lt;div class=&quot;language-json highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;@samename&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;value&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;samename&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;@child-attr&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;value&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;#text&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot; text  &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\\&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;n  &quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;To convert a json object to xml, you can use the following function.:&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;endScopeObj&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{};&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;window&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;obj2xml&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;obj&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;opt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;opt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;opt&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{};&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;rootName&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;opt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;rootName&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;root&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;declaration&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;opt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;declaration&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;auto&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;?&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;opt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;declaration&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;indentation&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;opt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;indentation&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;generateDtd&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;opt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;doctype&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;auto&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;opt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;doctype&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;generate&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;declaration&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;useAttributes&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;opt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;attributes&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;false&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;?&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;false&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;scope_indent&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;generateDtd&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;dtdAttr&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{};&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;dtdElem&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{};&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;ret&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[];&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;tagContent&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;isArr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;curs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;_t&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;_ti&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;innerKey&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;queue&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;obj&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;rootName&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;];&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;queue&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;length&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;queue&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;pop&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;curs&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;queue&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;pop&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;generateDtd&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
            &lt;span class=&quot;nx&quot;&gt;dtdElem&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;dtdElem&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{};&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;curs&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;endScopeObj&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;nx&quot;&gt;scope_indent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;--&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;indentation&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;ret&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt; &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;repeat&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;indentation&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;scope_indent&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;));&lt;/span&gt;
            &lt;span class=&quot;nx&quot;&gt;ret&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;continue&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;typeof&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;curs&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;object&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;nx&quot;&gt;queue&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;endScopeObj&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;nx&quot;&gt;queue&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;nx&quot;&gt;tagContent&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;];&lt;/span&gt;
            &lt;span class=&quot;nx&quot;&gt;isArr&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;Array&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;isArray&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;curs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;isArr&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;generateDtd&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;nx&quot;&gt;dtdElem&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;][&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;Item*&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;key&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;curs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;curs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;hasOwnProperty&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;isArr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                        &lt;span class=&quot;nx&quot;&gt;queue&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;curs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]);&lt;/span&gt;
                        &lt;span class=&quot;nx&quot;&gt;queue&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;typeof&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;curs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;object&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;useAttributes&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                        &lt;span class=&quot;nx&quot;&gt;queue&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;curs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]);&lt;/span&gt;
                        &lt;span class=&quot;nx&quot;&gt;queue&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;generateDtd&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
                            &lt;span class=&quot;nx&quot;&gt;dtdElem&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;][&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
                    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;generateDtd&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                            &lt;span class=&quot;nx&quot;&gt;dtdAttr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;dtdAttr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{};&lt;/span&gt;
                            &lt;span class=&quot;nx&quot;&gt;dtdAttr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;][&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
                        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
                        &lt;span class=&quot;nx&quot;&gt;tagContent&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;key&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;curs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
                &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;indentation&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;ret&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt; &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;repeat&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;indentation&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;scope_indent&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;));&lt;/span&gt;
            &lt;span class=&quot;nx&quot;&gt;ret&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;tagContent&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt; &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;nx&quot;&gt;scope_indent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;++&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;generateDtd&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
                &lt;span class=&quot;nx&quot;&gt;dtdElem&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;][&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;#PCDATA&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;indentation&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;ret&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt; &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;repeat&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;indentation&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;scope_indent&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;));&lt;/span&gt;
            &lt;span class=&quot;nx&quot;&gt;ret&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;nx&quot;&gt;ret&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;nx&quot;&gt;ret&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;nx&quot;&gt;ret&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;curs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;nx&quot;&gt;ret&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;nx&quot;&gt;ret&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;nx&quot;&gt;ret&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;generateDtd&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;dtd&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;lt;!DOCTYPE &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;rootName&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt; [&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;];&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;key&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;dtdAttr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;dtdAttr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;hasOwnProperty&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;innerKey&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;dtdAttr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;dtdAttr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;hasOwnProperty&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;innerKey&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;indentation&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;dtd&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                        &lt;span class=&quot;nx&quot;&gt;dtd&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;lt;!ATTLIST &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt; &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;innerKey&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt; CDATA #IMPLIED&amp;gt;&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
                &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;key&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;dtdElem&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;dtdElem&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;hasOwnProperty&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;nx&quot;&gt;innerKey&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;nx&quot;&gt;_t&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;lt;!ELEMENT &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt; (&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;];&lt;/span&gt;
                &lt;span class=&quot;nx&quot;&gt;_ti&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[];&lt;/span&gt;
                &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;innerKey&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;dtdElem&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;dtdElem&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;hasOwnProperty&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;innerKey&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                        &lt;span class=&quot;nx&quot;&gt;_ti&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;innerKey&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
                &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
                &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;indentation&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;dtd&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;innerKey&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// no children&lt;/span&gt;
                    &lt;span class=&quot;nx&quot;&gt;dtd&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;lt;!ELEMENT &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt; EMPTY&amp;gt;&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                    &lt;span class=&quot;nx&quot;&gt;_t&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;_ti&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;));&lt;/span&gt;
                    &lt;span class=&quot;nx&quot;&gt;_t&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;)&amp;gt;&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                    &lt;span class=&quot;nx&quot;&gt;dtd&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;apply&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;dtd&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;_t&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;dtd&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;]&amp;gt;&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;ret&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;unshift&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;apply&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;ret&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;dtd&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;declaration&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;ret&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;unshift&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;opt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;doctype&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;?&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;opt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;doctype&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;lt;!DOCTYPE &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;rootName&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;declaration&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;ret&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;unshift&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;declaration&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;ret&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Which turns:&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nx&quot;&gt;obj2xml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;({&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;child&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;into:&lt;/p&gt;

&lt;div class=&quot;language-xml highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;root&amp;gt;&amp;lt;child&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;key=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;value&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&amp;lt;/child&amp;gt;&amp;lt;/root&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The function &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;obj2xml(obj, {...options})&lt;/code&gt; takes the following options:&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;rootName&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;name of the root&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// defaults to &apos;root&apos;&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;declaration&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;auto&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;lt;a custom declaration&amp;gt;&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// defaults to undefined&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;indentation&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;number&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// defaults to 0&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;doctype&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;auto&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// defaults to undefined&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;attributes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;false&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// defaults to true&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;ins class=&quot;adsbygoogle&quot; style=&quot;display:block&quot; data-ad-client=&quot;ca-pub-9732535637352249&quot; data-ad-slot=&quot;6033478353&quot; data-ad-format=&quot;auto&quot; data-full-width-responsive=&quot;true&quot;&gt;&lt;/ins&gt;
&lt;script&gt;	
(adsbygoogle = window.adsbygoogle || []).push({});	
&lt;/script&gt;&lt;/p&gt;

&lt;p&gt;I used the code in this example to build a json2xml/xml2json converter which can be found &lt;a href=&quot;https://esstudio.site/json2xml&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;div id=&quot;full-example&quot;&gt;
&lt;h2&gt;Full Example:&lt;/h2&gt;
&lt;/div&gt;

&lt;script src=&quot;https://gist.github.com/9bf7b79fc9c02c525e4ddffcfdc8bea6.js&quot;&gt; &lt;/script&gt;

&lt;p&gt;&lt;ins class=&quot;adsbygoogle&quot; style=&quot;display:block&quot; data-ad-client=&quot;ca-pub-9732535637352249&quot; data-ad-slot=&quot;6033478353&quot; data-ad-format=&quot;auto&quot; data-full-width-responsive=&quot;true&quot;&gt;&lt;/ins&gt;
&lt;script&gt;	
(adsbygoogle = window.adsbygoogle || []).push({});	
&lt;/script&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;div class=&quot;affiliate&quot;&gt;
    &lt;h3&gt;Resources:&lt;/h3&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fjavascript-in-24-hours-sams-teach-yourself-9780672338090&quot;&gt;Javascript
            in 24 hours&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fhtml-css-and-javascript-all-in-one-covering-html5-css3-9780672338083&quot;&gt;HTML,
            CSS, ES6 all in one&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Flearning-react-a-hands-on-guide-to-building-web-applications-9780134843551&quot;&gt;A
            Hands-On Guide to Building Web Applications Using React&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Flearning-react-a-hands-on-guide-to-building-web-applications-9780134843551http%3A%2F%2Fwww.informit.com%2Fstore%2Flearning-regular-expressions-9780134757063&quot;&gt;Learning
            Regular Expressions&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fnode.js-mongodb-and-angular-web-development-the-definitive-9780134655536&quot;&gt;Node.js,
            MongoDB, and Angular web development&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;p&gt;&lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=145238.10000683&amp;amp;type=3&amp;amp;subid=0&quot;&gt;InformIT
            eBook Store&lt;/a&gt;&lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.10000683&amp;amp;type=3&amp;amp;subid=0&quot; /&gt;
        has a large number of ebooks on a wide range of topics. I would definitely recommend them.&lt;/p&gt;
    &lt;h3&gt;Great courses:&lt;/h3&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fjavascript-beginner.html&quot;&gt;Javascript
            for beginners in 3 hours&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fjavascript-basics-web-development-building-blocks.html&quot;&gt;Javascript
            basic web development building blocks&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fmobile-ui-and-ux-design.html&quot;&gt;Mobile
            UI and UX Design&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fmobile-ui-and-ux-design.htmlhttps%3A%2F%2Fwww.quickstart.com%2Fbuilding-web-applications-with-react.html&quot;&gt;Building
            web applications with react&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fstarting-with-angular-4.html&quot;&gt;Starting
            with angular 4&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fprogramming-in-c-ms-20483.html&quot;&gt;Programming
            in C#&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt; (recommended)
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Ffind-training%2Ftraining-by-topic%2Fapp-development%2Fweb-development.html&quot;&gt;More
            web development courses&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;p&gt;
        &lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=579862.416&amp;amp;type=3&amp;amp;subid=0&quot;&gt;Quickstart
        &lt;/a&gt;&lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.416&amp;amp;type=3&amp;amp;subid=0&quot; /&gt;
        offers a large amount of (online) courses on web development (&lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=579862.416&amp;amp;type=3&amp;amp;subid=0&quot;&gt;Use
            Code LSOFF50&lt;/a&gt;&lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.416&amp;amp;type=3&amp;amp;subid=0&quot; /&gt;
        to get 50% off ;p)
    &lt;/p&gt;
&lt;/div&gt;</content>

      
      
      
      
      

      <author>
          <name>Sem Postma</name>
        
        
      </author>

      

      

      
        <summary type="html">Checkout the website: JSON2XML or the full example.</summary>
      

      
      
        
        <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://esstudio.site/uploads/logo-json2xml.png" />
      
    </entry>
  
    
    
    <entry xml:lang="nl-NL">
      <title type="html">Bioscopen Nederland</title>
      <link href="https://esstudio.site/2018/08/11/bioscopen-nederland.html" rel="alternate" type="text/html" title="Bioscopen Nederland" />
      <published>2018-08-11T03:02:00+02:00</published>
      <updated>2018-08-11T03:02:00+02:00</updated>
      <id>https://esstudio.site/2018/08/11/bioscopen-nederland</id>
      <content type="html" xml:base="https://esstudio.site/2018/08/11/bioscopen-nederland.html">&lt;p&gt;Deze app maakt het mogelijk om bioscopen in Nederland te zoeken. Je kunt gemakkelijk het adres, het aantal doeken en stoelen vinden. De app kan ook offline gebruikt worden. De app gebruikt een offline kaart waardoor je deze zonder internet nog steeds kan gebruiken.&lt;/p&gt;

&lt;div class=&quot;app-portal&quot; style=&quot;width: 400px; max-width: 100%; padding: 10px&quot;&gt;
    &lt;img src=&quot;https://esstudio.site/uploads/logo.png&quot; alt=&quot;&quot; style=&quot;max-width: 50%; margin: 20px auto&quot; /&gt;
    &lt;h1&gt;Bioscopen Nederland&lt;/h1&gt;
    &lt;p&gt;Zoek bioscopen in Nederland.&lt;/p&gt;
    &lt;a class=&quot;btn&quot; href=&quot;https://esstudio.site/bioscopen-nederland/&quot;&gt;
        &lt;span&gt;Launch&lt;/span&gt;
        &lt;svg viewBox=&quot;0 0 10 18&quot; style=&quot;height: 1.2em&quot;&gt;&lt;path d=&quot;m0.8,1l8,8l-8,8&quot; fill=&quot;none&quot; stroke-width=&quot;2&quot; style=&quot;stroke: currentColor;&quot; /&gt;&lt;/svg&gt;
    &lt;/a&gt;
&lt;/div&gt;

&lt;p&gt;Download op &lt;a href=&quot;https://play.google.com/store/apps/details?id=com.EchoSierraStudio.Bioscopen_Nederland&quot;&gt;google play&lt;/a&gt;.&lt;/p&gt;</content>

      
      
      
      
      

      <author>
          <name>Sem Postma</name>
        
        
      </author>

      

      

      
        <summary type="html">Deze app maakt het mogelijk om bioscopen in Nederland te zoeken. Je kunt gemakkelijk het adres, het aantal doeken en stoelen vinden. De app kan ook offline gebruikt worden. De app gebruikt een offline kaart waardoor je deze zonder internet nog steeds kan gebruiken.</summary>
      

      
      
        
        <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://esstudio.site/uploads/logo.png" />
      
    </entry>
  
    
    
    <entry xml:lang="nl-NL">
      <title type="html">Rustplekken Utrecht</title>
      <link href="https://esstudio.site/2018/08/11/rustplekken-utrecht.html" rel="alternate" type="text/html" title="Rustplekken Utrecht" />
      <published>2018-08-11T02:59:00+02:00</published>
      <updated>2018-08-11T02:59:00+02:00</updated>
      <id>https://esstudio.site/2018/08/11/rustplekken-utrecht</id>
      <content type="html" xml:base="https://esstudio.site/2018/08/11/rustplekken-utrecht.html">&lt;p&gt;Interactieve kaart met rustpunten in Utrecht. De app bevat ook een offline kaartje zodat je de app ook offline kan gebruiken.&lt;/p&gt;

&lt;div class=&quot;app-portal&quot; style=&quot;width: 400px; max-width: 100%; padding: 10px&quot;&gt;
    &lt;img src=&quot;https://esstudio.site/uploads/logo-054ffa.png&quot; alt=&quot;&quot; style=&quot;max-width: 50%; margin: 20px auto&quot; /&gt;
    &lt;h1&gt;Rustplekken Utrecht&lt;/h1&gt;
    &lt;p&gt;Interactieve kaart met rustpunten in Utrecht.&lt;/p&gt;
    &lt;a class=&quot;btn&quot; href=&quot;https://esstudio.site/rustplekken-utrecht/&quot;&gt;
        &lt;span&gt;Launch&lt;/span&gt;
        &lt;svg viewBox=&quot;0 0 10 18&quot; style=&quot;height: 1.2em&quot;&gt;&lt;path d=&quot;m0.8,1l8,8l-8,8&quot; fill=&quot;none&quot; stroke-width=&quot;2&quot; style=&quot;stroke: currentColor;&quot; /&gt;&lt;/svg&gt;
    &lt;/a&gt;
&lt;/div&gt;

&lt;p&gt;Download op &lt;a href=&quot;https://play.google.com/store/apps/details?id=com.EchoSierraStudio.Rustplekken_Utrecht&quot;&gt;google-play&lt;/a&gt;.&lt;/p&gt;</content>

      
      
      
      
      

      <author>
          <name>Sem Postma</name>
        
        
      </author>

      

      

      
        <summary type="html">Interactieve kaart met rustpunten in Utrecht. De app bevat ook een offline kaartje zodat je de app ook offline kan gebruiken.</summary>
      

      
      
        
        <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://esstudio.site/uploads/logo-054ffa.png" />
      
    </entry>
  
    
    
    <entry>
      <title type="html">Public Toilets Amsterdam</title>
      <link href="https://esstudio.site/2018/08/11/public-toilets-amsterdam.html" rel="alternate" type="text/html" title="Public Toilets Amsterdam" />
      <published>2018-08-11T02:55:00+02:00</published>
      <updated>2018-08-11T02:55:00+02:00</updated>
      <id>https://esstudio.site/2018/08/11/public-toilets-amsterdam</id>
      <content type="html" xml:base="https://esstudio.site/2018/08/11/public-toilets-amsterdam.html">&lt;p&gt;Interactive chart showing public toilets in the city centre of amsterdam. The chart also shows your current location for easy navigation. This app also loads in a small offline map (only about ~4.3MB), so you don’t have to worry about your internet connection when you install this app on your device.&lt;/p&gt;

&lt;p&gt;&lt;ins class=&quot;adsbygoogle&quot; style=&quot;display:block&quot; data-ad-client=&quot;ca-pub-9732535637352249&quot; data-ad-slot=&quot;6033478353&quot; data-ad-format=&quot;auto&quot; data-full-width-responsive=&quot;true&quot;&gt;&lt;/ins&gt;
&lt;script&gt;	
(adsbygoogle = window.adsbygoogle || []).push({});	
&lt;/script&gt;&lt;/p&gt;

&lt;div class=&quot;app-portal&quot; style=&quot;width: 400px; max-width: 100%; padding: 10px&quot;&gt;
    &lt;img src=&quot;https://esstudio.site/uploads/android-chrome-512x512-7ca550.png&quot; alt=&quot;&quot; style=&quot;max-width: 50%; margin: 20px auto&quot; /&gt;
    &lt;h1&gt;Public Toilets Amsterdam&lt;/h1&gt;
    &lt;p&gt;Interactive chart showing public toilets in the city centre of amsterdam.&lt;/p&gt;
    &lt;a class=&quot;btn&quot; href=&quot;https://esstudio.site/public-toilets-amsterdam/&quot;&gt;
        &lt;span&gt;Launch&lt;/span&gt;
        &lt;svg viewBox=&quot;0 0 10 18&quot; style=&quot;height: 1.2em&quot;&gt;&lt;path d=&quot;m0.8,1l8,8l-8,8&quot; fill=&quot;none&quot; stroke-width=&quot;2&quot; style=&quot;stroke: currentColor;&quot; /&gt;&lt;/svg&gt;
    &lt;/a&gt;
&lt;/div&gt;

&lt;p&gt;Download op &lt;a href=&quot;https://play.google.com/store/apps/details?id=com.EchoSierraStudio.Amsterdam_Public_Toilets&quot;&gt;google play&lt;/a&gt;&lt;/p&gt;</content>

      
      
      
      
      

      <author>
          <name>Sem Postma</name>
        
        
      </author>

      

      

      
        <summary type="html">Interactive chart showing public toilets in the city centre of amsterdam. The chart also shows your current location for easy navigation. This app also loads in a small offline map (only about ~4.3MB), so you don’t have to worry about your internet connection when you install this app on your device.</summary>
      

      
      
        
        <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://esstudio.site/uploads/android-chrome-512x512-7ca550.png" />
      
    </entry>
  
    
    
    <entry>
      <title type="html">Echochamber Affinity</title>
      <link href="https://esstudio.site/2018/08/11/echochamber-affinity.html" rel="alternate" type="text/html" title="Echochamber Affinity" />
      <published>2018-08-11T02:50:00+02:00</published>
      <updated>2018-08-11T02:50:00+02:00</updated>
      <id>https://esstudio.site/2018/08/11/echochamber-affinity</id>
      <content type="html" xml:base="https://esstudio.site/2018/08/11/echochamber-affinity.html">&lt;p&gt;Check your twitter personality. On which side of the political spectrum do you fall?&lt;/p&gt;

&lt;div class=&quot;app-portal&quot; style=&quot;width: 400px; max-width: 100%; padding: 10px&quot;&gt;
    &lt;img src=&quot;https://esstudio.site/uploads/android-chrome-512x512.png&quot; alt=&quot;&quot; style=&quot;max-width: 50%; margin: 20px auto&quot; /&gt;
    &lt;h1&gt;Echochamber Affinity&lt;/h1&gt;
    &lt;p&gt;Check your twitter personality. On which side of the political spectrum do you fall?&lt;/p&gt;
    &lt;a class=&quot;btn&quot; href=&quot;https://esstudio.site/echochamber-affinity/&quot;&gt;
        &lt;span&gt;Launch&lt;/span&gt;
        &lt;svg viewBox=&quot;0 0 10 18&quot; style=&quot;height: 1.2em&quot;&gt;&lt;path d=&quot;m0.8,1l8,8l-8,8&quot; fill=&quot;none&quot; stroke-width=&quot;2&quot; style=&quot;stroke: currentColor;&quot; /&gt;&lt;/svg&gt;
    &lt;/a&gt;
&lt;/div&gt;</content>

      
      
      
      
      

      <author>
          <name>Sem Postma</name>
        
        
      </author>

      

      

      
        <summary type="html">Check your twitter personality. On which side of the political spectrum do you fall?</summary>
      

      
      
        
        <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://esstudio.site/uploads/android-chrome-512x512.png" />
      
    </entry>
  
    
    
    <entry>
      <title type="html">Simple Function Plotter</title>
      <link href="https://esstudio.site/2018/08/11/simple-function-plotter.html" rel="alternate" type="text/html" title="Simple Function Plotter" />
      <published>2018-08-11T02:40:00+02:00</published>
      <updated>2018-08-11T02:40:00+02:00</updated>
      <id>https://esstudio.site/2018/08/11/simple-function-plotter</id>
      <content type="html" xml:base="https://esstudio.site/2018/08/11/simple-function-plotter.html">&lt;p&gt;This app let’s you plot algebreic equations, plot computational expressions, solve conversions, do matrix operations, etc. You can save the graph as a vector image (svg) and easily create a lot of graphs.&lt;/p&gt;

&lt;div class=&quot;app-portal&quot; style=&quot;width: 400px; max-width: 100%; padding: 10px&quot;&gt;
    &lt;img src=&quot;https://esstudio.site/uploads/function.png&quot; alt=&quot;&quot; style=&quot;max-width: 50%; margin: 20px auto&quot; /&gt;
    &lt;h1&gt;Function Plotter&lt;/h1&gt;
    &lt;p&gt;Expression solver.&lt;/p&gt;
    &lt;a class=&quot;btn&quot; href=&quot;https://esstudio.site/SimpleFunctionPlotter/&quot;&gt;
        &lt;span&gt;Launch&lt;/span&gt;
        &lt;svg viewBox=&quot;0 0 10 18&quot; style=&quot;height: 1.2em&quot;&gt;&lt;path d=&quot;m0.8,1l8,8l-8,8&quot; fill=&quot;none&quot; stroke-width=&quot;2&quot; style=&quot;stroke: currentColor;&quot; /&gt;&lt;/svg&gt;
    &lt;/a&gt;
&lt;/div&gt;

&lt;p&gt;Download op &lt;a href=&quot;https://play.google.com/store/apps/details?id=com.EchoSierraStudio.Simple_Function_Plotter&quot;&gt;google-play&lt;/a&gt;.&lt;/p&gt;</content>

      
      
      
      
      

      <author>
          <name>Sem Postma</name>
        
        
      </author>

      

      

      
        <summary type="html">This app let’s you plot algebreic equations, plot computational expressions, solve conversions, do matrix operations, etc. You can save the graph as a vector image (svg) and easily create a lot of graphs.</summary>
      

      
      
        
        <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://esstudio.site/uploads/function-plotter-website.PNG" />
      
    </entry>
  
    
    
    <entry>
      <title type="html">ATC Manager 2</title>
      <link href="https://esstudio.site/2018/08/11/atc-manager-2.html" rel="alternate" type="text/html" title="ATC Manager 2" />
      <published>2018-08-11T02:30:00+02:00</published>
      <updated>2018-08-11T02:30:00+02:00</updated>
      <id>https://esstudio.site/2018/08/11/atc-manager-2</id>
      <content type="html" xml:base="https://esstudio.site/2018/08/11/atc-manager-2.html">&lt;p&gt;Web based air traffic control game. Manage airspace of busy airports like Schiphol or Heathrow in a realistic simulator.&lt;/p&gt;

&lt;div class=&quot;app-portal&quot; style=&quot;width: 400px; max-width: 100%; padding: 10px&quot;&gt;
    &lt;img src=&quot;https://esstudio.site/uploads/schiphol.PNG&quot; alt=&quot;&quot; style=&quot;max-width: 50%; margin: 20px auto&quot; /&gt;
    &lt;h1&gt;ATC Manager 2&lt;/h1&gt;
    &lt;p&gt;ATC Manager on the web.&lt;/p&gt;
    &lt;a class=&quot;btn&quot; href=&quot;https://esstudio.site/atc-manager-2/&quot;&gt;
        &lt;span&gt;Launch&lt;/span&gt;
        &lt;svg viewBox=&quot;0 0 10 18&quot; style=&quot;height: 1.2em&quot;&gt;&lt;path d=&quot;m0.8,1l8,8l-8,8&quot; fill=&quot;none&quot; stroke-width=&quot;2&quot; style=&quot;stroke: currentColor;&quot; /&gt;&lt;/svg&gt;
    &lt;/a&gt;
&lt;/div&gt;</content>

      
      
      
      
      

      <author>
          <name>Sem Postma</name>
        
        
      </author>

      

      

      
        <summary type="html">Web based air traffic control game. Manage airspace of busy airports like Schiphol or Heathrow in a realistic simulator.</summary>
      

      
      
        
        <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://esstudio.site/uploads/schiphol.PNG" />
      
    </entry>
  
    
    
    <entry>
      <title type="html">Youtube Comments are Evil</title>
      <link href="https://esstudio.site/2018/08/11/youtube-comments-are-evil.html" rel="alternate" type="text/html" title="Youtube Comments are Evil" />
      <published>2018-08-11T02:21:00+02:00</published>
      <updated>2018-08-11T02:21:00+02:00</updated>
      <id>https://esstudio.site/2018/08/11/youtube-comments-are-evil</id>
      <content type="html" xml:base="https://esstudio.site/2018/08/11/youtube-comments-are-evil.html">&lt;p&gt;Generates fake youtube comments for a given video using a markov model. The created comments are based on the existing comments on that video. If a youtube video has alot of comments the results will be best.&lt;/p&gt;

&lt;div class=&quot;app-portal&quot; style=&quot;width: 400px; max-width: 100%; padding: 10px&quot;&gt;
    &lt;img src=&quot;https://ycae.esstudio.site/assets/img/comment-black.png&quot; alt=&quot;&quot; style=&quot;max-width: 50%; margin: 20px auto&quot; /&gt;
    &lt;h1&gt;YCAE&lt;/h1&gt;
    &lt;p&gt;Generates fake youtube comments for a given video.&lt;/p&gt;
    &lt;a class=&quot;btn&quot; href=&quot;https://ycae.esstudio.site/&quot;&gt;
        &lt;span&gt;Launch&lt;/span&gt;
        &lt;svg viewBox=&quot;0 0 10 18&quot; style=&quot;height: 1.2em&quot;&gt;&lt;path d=&quot;m0.8,1l8,8l-8,8&quot; fill=&quot;none&quot; stroke-width=&quot;2&quot; style=&quot;stroke: currentColor;&quot; /&gt;&lt;/svg&gt;
    &lt;/a&gt;
&lt;/div&gt;</content>

      
      
      
      
      

      <author>
          <name>Sem Postma</name>
        
        
      </author>

      

      

      
        <summary type="html">Generates fake youtube comments for a given video using a markov model. The created comments are based on the existing comments on that video. If a youtube video has alot of comments the results will be best.</summary>
      

      
      
        
        <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://esstudio.site/uploads/comment.PNG" />
      
    </entry>
  
    
    
    <entry>
      <title type="html">Laika Notes</title>
      <link href="https://esstudio.site/2018/08/11/laika-notes.html" rel="alternate" type="text/html" title="Laika Notes" />
      <published>2018-08-11T02:15:00+02:00</published>
      <updated>2018-08-11T02:15:00+02:00</updated>
      <id>https://esstudio.site/2018/08/11/laika-notes</id>
      <content type="html" xml:base="https://esstudio.site/2018/08/11/laika-notes.html">&lt;p&gt;A simple notes managing app inspired by laika the dog. Can be added to your homescreen and works offline.&lt;/p&gt;

&lt;div class=&quot;app-portal&quot; style=&quot;width: 400px; max-width: 100%; padding: 10px&quot;&gt;
    &lt;img src=&quot;https://esstudio.site/uploads/laika.png&quot; alt=&quot;&quot; style=&quot;max-width: 50%; margin: 20px auto&quot; /&gt;
    &lt;h1&gt;Laika Notes&lt;/h1&gt;
    &lt;p&gt;A simple notes managing app.&lt;/p&gt;
    &lt;a class=&quot;btn&quot; href=&quot;https://esstudio.site/laika-notes/&quot;&gt;
        &lt;span&gt;Launch&lt;/span&gt;
        &lt;svg viewBox=&quot;0 0 10 18&quot; style=&quot;height: 1.2em&quot;&gt;&lt;path d=&quot;m0.8,1l8,8l-8,8&quot; fill=&quot;none&quot; stroke-width=&quot;2&quot; style=&quot;stroke: currentColor;&quot; /&gt;&lt;/svg&gt;
    &lt;/a&gt;
&lt;/div&gt;

&lt;p&gt;Download op &lt;a href=&quot;https://play.google.com/store/apps/details?id=com.EchoSierraStudio.Laika_Notes&quot;&gt;google play&lt;/a&gt;&lt;/p&gt;</content>

      
      
      
      
      

      <author>
          <name>Sem Postma</name>
        
        
      </author>

      

      

      
        <summary type="html">A simple notes managing app inspired by laika the dog. Can be added to your homescreen and works offline.</summary>
      

      
      
        
        <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://esstudio.site/uploads/laika-notes-sm.png" />
      
    </entry>
  
    
    
    <entry>
      <title type="html">Newsfeeder</title>
      <link href="https://esstudio.site/2018/08/11/newsfeeder.html" rel="alternate" type="text/html" title="Newsfeeder" />
      <published>2018-08-11T01:45:00+02:00</published>
      <updated>2018-08-11T01:45:00+02:00</updated>
      <id>https://esstudio.site/2018/08/11/newsfeeder</id>
      <content type="html" xml:base="https://esstudio.site/2018/08/11/newsfeeder.html">&lt;p&gt;Newsfeeder (also known as “feedfetish”) is a search engine and modern RSS/Atom reader. It let’s you combine all of your different news/blog, like Reddit, Cnn, Lifehacker, etc. All of your your favorite websites, blogs in one place. Get started for free without the need to sign up below by clicking the launch button.&lt;/p&gt;

&lt;p&gt;Its a free open source desktop and web app. You don’t have to create an account. There are no cookies except for one anonymized analytics cookie (so i know how many people are using the app). There’s no event tracking like tracking the user’s mouse or scroll behavior. It only works on a secure connection (https). It has an offline mode. To install it on your desktop, you can follow the instructions under the about section. Its licensed under MIT which permits any form of (re)use. Its open source. You can find the source code here: &lt;a href=&quot;https://newsfeeder.esstudio.site&quot; title=&quot;https://newsfeeder.esstudio.site&quot;&gt;https://github.com/sempostma/newsfeeder&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/uploads/newsfeeder-screenshot.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The app is available in the browser and on the google play store.&lt;/p&gt;

&lt;div class=&quot;app-portal&quot; style=&quot;width: 400px; max-width: 100%; padding: 10px&quot;&gt;
    &lt;img src=&quot;https://esstudio.site/uploads/logo-6c4e4d.png&quot; alt=&quot;&quot; style=&quot;max-width: 50%; margin: 20px auto&quot; /&gt;
    &lt;h1&gt;Newsfeeder&lt;/h1&gt;
    &lt;p&gt;The easiest way to follow news from your favorite websites and blogs and news sites. Easily search for news on multiple platforms, find feeds on popular websites and more. Also works as a classic RSS/Atom reader.&lt;/p&gt;
    &lt;a class=&quot;btn&quot; href=&quot;https://esstudio.site/newsfeeder/&quot;&gt;
        &lt;span&gt;Launch&lt;/span&gt;
        &lt;svg viewBox=&quot;0 0 10 18&quot; style=&quot;height: 1.2em&quot;&gt;&lt;path d=&quot;m0.8,1l8,8l-8,8&quot; fill=&quot;none&quot; stroke-width=&quot;2&quot; style=&quot;stroke: currentColor;&quot; /&gt;&lt;/svg&gt;
    &lt;/a&gt;
&lt;/div&gt;</content>

      
      
      
      
      

      <author>
          <name>Sem Postma</name>
        
        
      </author>

      

      

      
        <summary type="html">Newsfeeder (also known as “feedfetish”) is a search engine and modern RSS/Atom reader. It let’s you combine all of your different news/blog, like Reddit, Cnn, Lifehacker, etc. All of your your favorite websites, blogs in one place. Get started for free without the need to sign up below by clicking the launch button.</summary>
      

      
      
        
        <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://esstudio.site/uploads/logo-6c4e4d.png" />
      
    </entry>
  
    
    
    <entry>
      <title type="html">Pure CSS Progress Circles</title>
      <link href="https://esstudio.site/2018/07/08/pure-css-progress-circles.html" rel="alternate" type="text/html" title="Pure CSS Progress Circles" />
      <published>2018-07-08T15:31:00+02:00</published>
      <updated>2018-07-08T15:31:00+02:00</updated>
      <id>https://esstudio.site/2018/07/08/pure-css-progress-circles</id>
      <content type="html" xml:base="https://esstudio.site/2018/07/08/pure-css-progress-circles.html">&lt;p&gt;Progress elements can be usefull in alot of different situations. Showing them as loading indicators, using them as part of a task flow or for data visualization.&lt;/p&gt;

&lt;p&gt;Let’s start by creating the html:&lt;/p&gt;

&lt;div class=&quot;language-html highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;div&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;player&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;div&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;player-icon&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;div&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;progress&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;div&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;right-side&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;div&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;left-side&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;div&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;player-text&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;div&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;player-title&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Now let’s add some CSS:&lt;/p&gt;

&lt;div class=&quot;language-css highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;
&lt;span class=&quot;o&quot;&gt;*,&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;nd&quot;&gt;::before&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;nd&quot;&gt;::after&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;box-sizing&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;border-box&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;nt&quot;&gt;body&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;margin&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;font-family&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;sans-serif&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Arial&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Helvetica&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;nc&quot;&gt;.player&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;100px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;100px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;background&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;#eee&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;position&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;relative&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;border-radius&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;50%&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;overflow&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;visible&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;margin&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;80px&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;auto&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;nc&quot;&gt;.player&lt;/span&gt;&lt;span class=&quot;nd&quot;&gt;:hover&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;opacity&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;.8&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;nc&quot;&gt;.player-text&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;position&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;absolute&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;left&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;50%&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;top&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;50%&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;transform&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;translate&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;-50%&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;-50%&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;#4beade&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;font-weight&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;700&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;font-size&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;20px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;nc&quot;&gt;.player-title&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;position&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;absolute&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;left&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nl&quot;&gt;right&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;top&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;calc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;50%&lt;/span&gt; &lt;span class=&quot;err&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;55px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;text-align&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;center&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;#999&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Next we have to create a round border on the element with a variable circumference. Using a few tricks this can be achieved whith pure CSS. We need to halfs of a circle, a left side and a right side. If the progress is less than 50% we rotate the left side over the right side and give the left side the same color as the background. This allows us to hide the right side and show values from 0% to 50%. To show values above 50%. We chage the color of the left side to the color of the progress circle and do essentially the same thing as before only now we are extending the other circle from 50% to a 100%.&lt;/p&gt;

&lt;p&gt;&lt;ins class=&quot;adsbygoogle&quot; style=&quot;display:block&quot; data-ad-client=&quot;ca-pub-9732535637352249&quot; data-ad-slot=&quot;6033478353&quot; data-ad-format=&quot;auto&quot; data-full-width-responsive=&quot;true&quot;&gt;&lt;/ins&gt;
&lt;script&gt;	
(adsbygoogle = window.adsbygoogle || []).push({});	
&lt;/script&gt;&lt;/p&gt;

&lt;div class=&quot;language-css highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nc&quot;&gt;.left-side&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;position&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;absolute&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;top&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nl&quot;&gt;left&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nl&quot;&gt;right&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nl&quot;&gt;bottom&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;border-radius&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;50%&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;    
    &lt;span class=&quot;nl&quot;&gt;border&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;2px&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;solid&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;#eee&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;border-left-color&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;transparent&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;border-bottom-color&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;transparent&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;transform&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;rotate&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;45deg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;nc&quot;&gt;.left-side.fill&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;border-color&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;transparent&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;border-left-color&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;#4beade&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;border-bottom-color&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;#4beade&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;nc&quot;&gt;.right-side&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;transform&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;rotate&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;45deg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;position&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;absolute&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;top&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nl&quot;&gt;left&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nl&quot;&gt;right&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nl&quot;&gt;bottom&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;border-radius&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;50%&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;    
    &lt;span class=&quot;nl&quot;&gt;border&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;2px&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;solid&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;#4beade&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;border-left-color&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;#eee&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;border-bottom-color&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;#eee&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Now we can set the rotate and fill class values manualy:&lt;/p&gt;

&lt;div class=&quot;language-html highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;div&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;player&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;div&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;player-icon&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;div&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;progress&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;div&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;right-side&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;div&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;left-side&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;style=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;transform: rotate(189deg)&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;div&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;player-text&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;40%&lt;span class=&quot;nt&quot;&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;div&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;player-title&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;Cool Progress&lt;span class=&quot;nt&quot;&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Or use javascript to set the values:&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;players&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;getElementsByClassName&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;player&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

&lt;span class=&quot;nx&quot;&gt;setProgress&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;players&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]);&lt;/span&gt;

&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;setProgress&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;ratio&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;player&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;leftSide&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;player&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;getElementsByClassName&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;left-side&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;];&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;ratio&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;ratio&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;rot&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;45&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;ratio&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;360&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;leftSide&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;classList&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;ratio&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;?&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;add&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;remove&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;](&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;fill&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;leftSide&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;setAttribute&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;style&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;transform: rotate(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;rot&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;deg)&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;   
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And your done!&lt;/p&gt;

&lt;p&gt;&lt;ins class=&quot;adsbygoogle&quot; style=&quot;display:block&quot; data-ad-client=&quot;ca-pub-9732535637352249&quot; data-ad-slot=&quot;6033478353&quot; data-ad-format=&quot;auto&quot; data-full-width-responsive=&quot;true&quot;&gt;&lt;/ins&gt;
&lt;script&gt;	
(adsbygoogle = window.adsbygoogle || []).push({});	
&lt;/script&gt;&lt;/p&gt;

&lt;p&gt;Full example:&lt;/p&gt;

&lt;p data-height=&quot;335&quot; data-theme-id=&quot;0&quot; data-slug-hash=&quot;aKejNP&quot; data-default-tab=&quot;css,result&quot; data-user=&quot;Afirus&quot; data-embed-version=&quot;2&quot; data-pen-title=&quot;Pure CSS Progress Circle&quot; class=&quot;codepen&quot;&gt;See the Pen &lt;a href=&quot;https://codepen.io/Afirus/pen/aKejNP/&quot;&gt;Pure CSS Progress Circle&lt;/a&gt; by sempostma (&lt;a href=&quot;https://codepen.io/Afirus&quot;&gt;@Afirus&lt;/a&gt;) on &lt;a href=&quot;https://codepen.io&quot;&gt;CodePen&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Animation example:&lt;/p&gt;

&lt;p data-height=&quot;265&quot; data-theme-id=&quot;0&quot; data-slug-hash=&quot;eKqjxX&quot; data-default-tab=&quot;css,result&quot; data-user=&quot;Afirus&quot; data-embed-version=&quot;2&quot; data-pen-title=&quot;Animated CSS Progress Circle&quot; class=&quot;codepen&quot;&gt;See the Pen &lt;a href=&quot;https://codepen.io/Afirus/pen/eKqjxX/&quot;&gt;Animated CSS Progress Circle&lt;/a&gt; by sempostma (&lt;a href=&quot;https://codepen.io/Afirus&quot;&gt;@Afirus&lt;/a&gt;) on &lt;a href=&quot;https://codepen.io&quot;&gt;CodePen&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Pie chart example:&lt;/p&gt;

&lt;p data-height=&quot;265&quot; data-theme-id=&quot;0&quot; data-slug-hash=&quot;mKNjYW&quot; data-default-tab=&quot;css,result&quot; data-user=&quot;Afirus&quot; data-embed-version=&quot;2&quot; data-pen-title=&quot;Pie Progress CSS&quot; class=&quot;codepen&quot;&gt;See the Pen &lt;a href=&quot;https://codepen.io/Afirus/pen/mKNjYW/&quot;&gt;Pie Progress CSS&lt;/a&gt; by sempostma (&lt;a href=&quot;https://codepen.io/Afirus&quot;&gt;@Afirus&lt;/a&gt;) on &lt;a href=&quot;https://codepen.io&quot;&gt;CodePen&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Live example: &lt;a href=&quot;http://esstudio.site/tana-soundboad/&quot;&gt;http://esstudio.site/tana-soundboad/&lt;/a&gt;.&lt;/p&gt;

&lt;script async=&quot;&quot; src=&quot;https://static.codepen.io/assets/embed/ei.js&quot;&gt;&lt;/script&gt;

&lt;p&gt;&lt;ins class=&quot;adsbygoogle&quot; style=&quot;display:block&quot; data-ad-client=&quot;ca-pub-9732535637352249&quot; data-ad-slot=&quot;6033478353&quot; data-ad-format=&quot;auto&quot; data-full-width-responsive=&quot;true&quot;&gt;&lt;/ins&gt;
&lt;script&gt;	
(adsbygoogle = window.adsbygoogle || []).push({});	
&lt;/script&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;div class=&quot;affiliate&quot;&gt;
    &lt;h3&gt;Resources:&lt;/h3&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fjavascript-in-24-hours-sams-teach-yourself-9780672338090&quot;&gt;Javascript
            in 24 hours&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fhtml-css-and-javascript-all-in-one-covering-html5-css3-9780672338083&quot;&gt;HTML,
            CSS, ES6 all in one&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Flearning-react-a-hands-on-guide-to-building-web-applications-9780134843551&quot;&gt;A
            Hands-On Guide to Building Web Applications Using React&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Flearning-react-a-hands-on-guide-to-building-web-applications-9780134843551http%3A%2F%2Fwww.informit.com%2Fstore%2Flearning-regular-expressions-9780134757063&quot;&gt;Learning
            Regular Expressions&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fnode.js-mongodb-and-angular-web-development-the-definitive-9780134655536&quot;&gt;Node.js,
            MongoDB, and Angular web development&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;p&gt;&lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=145238.10000683&amp;amp;type=3&amp;amp;subid=0&quot;&gt;InformIT
            eBook Store&lt;/a&gt;&lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.10000683&amp;amp;type=3&amp;amp;subid=0&quot; /&gt;
        has a large number of ebooks on a wide range of topics. I would definitely recommend them.&lt;/p&gt;
    &lt;h3&gt;Great courses:&lt;/h3&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fjavascript-beginner.html&quot;&gt;Javascript
            for beginners in 3 hours&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fjavascript-basics-web-development-building-blocks.html&quot;&gt;Javascript
            basic web development building blocks&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fmobile-ui-and-ux-design.html&quot;&gt;Mobile
            UI and UX Design&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fmobile-ui-and-ux-design.htmlhttps%3A%2F%2Fwww.quickstart.com%2Fbuilding-web-applications-with-react.html&quot;&gt;Building
            web applications with react&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fstarting-with-angular-4.html&quot;&gt;Starting
            with angular 4&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fprogramming-in-c-ms-20483.html&quot;&gt;Programming
            in C#&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt; (recommended)
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Ffind-training%2Ftraining-by-topic%2Fapp-development%2Fweb-development.html&quot;&gt;More
            web development courses&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;p&gt;
        &lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=579862.416&amp;amp;type=3&amp;amp;subid=0&quot;&gt;Quickstart
        &lt;/a&gt;&lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.416&amp;amp;type=3&amp;amp;subid=0&quot; /&gt;
        offers a large amount of (online) courses on web development (&lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=579862.416&amp;amp;type=3&amp;amp;subid=0&quot;&gt;Use
            Code LSOFF50&lt;/a&gt;&lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.416&amp;amp;type=3&amp;amp;subid=0&quot; /&gt;
        to get 50% off ;p)
    &lt;/p&gt;
&lt;/div&gt;</content>

      
      
      
      
      

      <author>
          <name>Sem Postma</name>
        
        
      </author>

      

      
        <category term="css" />
      
        <category term="animation" />
      
        <category term="visualization" />
      

      
        <summary type="html">Progress elements can be usefull in alot of different situations. Showing them as loading indicators, using them as part of a task flow or for data visualization.</summary>
      

      
      
        
        <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://esstudio.site/uploads/circle-progress.png" />
      
    </entry>
  
    
    
    <entry xml:lang="nl-NL">
      <title type="html">OV Fiets App 1.2</title>
      <link href="https://esstudio.site/2018/07/02/ov-fiets-app.html" rel="alternate" type="text/html" title="OV Fiets App 1.2" />
      <published>2018-07-02T15:58:00+02:00</published>
      <updated>2018-07-02T15:58:00+02:00</updated>
      <id>https://esstudio.site/2018/07/02/ov-fiets-app</id>
      <content type="html" xml:base="https://esstudio.site/2018/07/02/ov-fiets-app.html">&lt;p&gt;Niet genoeg OV Fietsen op het station? Deze app laat het aantal fietsen zien, beschikbaarheid en de openingstijden voor elke OV Fiets huurlocatie in nederland. Beschikbaar als &lt;a href=&quot;https://play.google.com/store/apps/details?id=com.EchoSierraStudio.Ov_Fiets_App&quot;&gt;app&lt;/a&gt; en in de &lt;a href=&quot;https://esstudio.site/ov-fiets-app/&quot;&gt;browser&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/uploads/esstudio.site_ov-fiets-app_(Nexus%205X)%20(Custom).png&quot; alt=&quot;esstudio.site_ov-fiets-app_(Nexus 5X) (Custom).png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Met de OV Fiets App kunt u gemakkelijk informatie opzoeken over OV Fiets huurlocaties. U kunt de zoekbalk bovenaan de homepage van de app gebruiken om locaties te zoeken.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Verbeter punten in update 1.2:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;App opslagruimte meer dan gehalveerd!&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Updated voor de laatste versie van android&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Android 4.4 ondersteuning&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Refresh scroll (pullhook) verwijderd&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Oude versies van android chrome ondersteuning&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Bugs waarin de app niet goed offline functioneerde zijn opgelost&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Snelheid optimalisaties&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href=&quot;https://play.google.com/store/apps/details?id=com.EchoSierraStudio.Ov_Fiets_App&quot;&gt;Google Play&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Ook is er nu een website versie van de OV Fiets App die &lt;a href=&quot;https://esstudio.site/ov-fiets-app/&quot;&gt;hier&lt;/a&gt; gevonden kan worden.&lt;/p&gt;

&lt;div class=&quot;app-portal&quot; style=&quot;width: 400px; max-width: 100%; padding: 10px&quot;&gt;
    &lt;img src=&quot;https://esstudio.site/uploads/my_logo_512.png&quot; alt=&quot;&quot; style=&quot;max-width: 50%; margin: 20px auto&quot; /&gt;
    &lt;h1&gt;OV Fiets App&lt;/h1&gt;
    &lt;p&gt;Met de OV Fiets Website kunt u gemakkelijk informatie opzoeken over OV Fiets huurlocaties.&lt;/p&gt;
    &lt;a class=&quot;btn&quot; href=&quot;https://esstudio.site/ov-fiets-app/&quot;&gt;
        &lt;span&gt;Launch&lt;/span&gt;
        &lt;svg viewBox=&quot;0 0 10 18&quot; style=&quot;height: 1.2em&quot;&gt;&lt;path d=&quot;m0.8,1l8,8l-8,8&quot; fill=&quot;none&quot; stroke-width=&quot;2&quot; style=&quot;stroke: currentColor;&quot; /&gt;&lt;/svg&gt;
    &lt;/a&gt;
&lt;/div&gt;

&lt;p&gt;De website versie werkt in essentie hetzelfde als de app alleen kan het ook op IOS, windows en desktops gebruiken. De website kan zelfs offline gebruikt worden (met verouderde informatie over ov fiets locaties totdat je weer online bent), wanneer je het installeert als web app. Dat kan heel handig kan zijn als je bijvoorbeeld net even geen wifi hebt. De instructies voor installeren van de web app zijn staan hieronder:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/uploads/website.PNG&quot; alt=&quot;website.PNG&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Als je de web app nog niet hebt geïnstalleerd en je gebruikt de laatste versie van chrome dan kun je onderaan de website de knop “Toevoegen aan Startscherm/Bureaublad” zien.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/uploads/esstudio.site_ov-fiets-app-eaaf02.png&quot; alt=&quot;esstudio.site_ov-fiets-app-eaaf02.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Dit geld ook voor android, ios etc.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/uploads/prompt.PNG&quot; alt=&quot;prompt.PNG&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Klik op deze knop.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/uploads/native-prompt.PNG&quot; alt=&quot;native-prompt.PNG&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Er verschijnt nu een dialoog, klik op installeren.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/uploads/pwa-86c881.PNG&quot; alt=&quot;pwa-86c881.PNG&quot; /&gt;&lt;/p&gt;

&lt;p&gt;De web app is nu geïnstalleerd op je startscherm.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/uploads/offline-pwa.PNG&quot; alt=&quot;offline-pwa.PNG&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Wanneer de internet verbinding onderbroken wordt zie je de melding “Je bent niet verbonden met het internet. Deg gegevens die worden weergegeven zijn mogelijk verouderd.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/uploads/pwas-unninstall.PNG&quot; alt=&quot;pwas-unninstall.PNG&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Als je de app weer wilt verwijderen dan kun je naar deze link gaan: “chrome://apps/”.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/uploads/pwas-unninstall-context.PNG&quot; alt=&quot;pwas-unninstall-context.PNG&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Klik met de rechter muis op de web app en klik op verwijderen. In android, IOS en andere mobiele apparaten kun je de app vanaf het startscherm verwijderen (net als elke andere app).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Meer:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;a href=&quot;https://play.google.com/store/apps/developer?id=EchoSierraStudio&quot;&gt;Android Apps&lt;/a&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;a href=&quot;https://play.google.com/store/apps/details?id=com.EchoSierraStudio.Kadaster_Kaart&quot;&gt;Kadaster App&lt;/a&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;a href=&quot;https://esstudio.site/&quot;&gt;Projecten&lt;/a&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;a href=&quot;https://esstudio.site/contact&quot;&gt;Contact&lt;/a&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;a href=&quot;https://esstudio.site/contact&quot;&gt;Website of app laten maken&lt;/a&gt;&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Lighthouse Progressive Web App score:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/uploads/lighthouse.PNG&quot; alt=&quot;lighthouse.PNG&quot; /&gt;&lt;/p&gt;</content>

      
      
      
      
      

      <author>
          <name>Sem Postma</name>
        
        
      </author>

      

      

      
        <summary type="html">Niet genoeg OV Fietsen op het station? Deze app laat het aantal fietsen zien, beschikbaarheid en de openingstijden voor elke OV Fiets huurlocatie in nederland. Beschikbaar als app en in de browser</summary>
      

      
      
        
        <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://esstudio.site/uploads/ov-fiets-webapp-sm.png" />
      
    </entry>
  
    
    
    <entry>
      <title type="html">Converting JSON to CSV in Javascript</title>
      <link href="https://esstudio.site/2018/06/07/obj2csv-dot-js.html" rel="alternate" type="text/html" title="Converting JSON to CSV in Javascript" />
      <published>2018-06-07T13:45:00+02:00</published>
      <updated>2018-06-07T13:45:00+02:00</updated>
      <id>https://esstudio.site/2018/06/07/obj2csv-dot-js</id>
      <content type="html" xml:base="https://esstudio.site/2018/06/07/obj2csv-dot-js.html">&lt;p&gt;Checkout the website: &lt;a href=&quot;http://esstudio.site/json2csv&quot;&gt;JSON2CSV&lt;/a&gt; or the &lt;a href=&quot;#full-example&quot;&gt;full example&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;While searching for a csv2obj javascript library I couldn’t find a good solution, so I decided to write a very minimal csv2obj converter. Let’s start with creating the parser (csv2obj). Because of cross browser support i will try not to use a lot of es5/es6 specific syntax. The following function will do the job. There are some important caveats. The function will, in some cases, try to convert boolean, number and null values to their correct type. This only works if it matches the exact value. For example
“null” will be parsed as a null value/object, but “ null” (with a leading space) will not.&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;    &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;csv2obj&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;csv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;opt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;opt&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;opt&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{};&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;delimeter&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;opt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;delimeter&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;row&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;rownum&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;collumNum&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;lines&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;csv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;split&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\s&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n\s&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;*/&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;headers&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;lines&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;split&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;delimeter&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;headers&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;length&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;++&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;nx&quot;&gt;headers&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;headers&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;replace&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;^&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;[\s&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;+|&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;[\s&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;+$&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;/g&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;ret&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[];&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;rownum&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;rownum&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;lines&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;length&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;rownum&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;++&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;nx&quot;&gt;row&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;lines&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;rownum&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;split&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;delimeter&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;nx&quot;&gt;ret&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;rownum&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{};&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;collumNum&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;collumNum&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;headers&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;length&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;collumNum&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;++&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;row&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;collumNum&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;length&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;isNaN&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;row&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;collumNum&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;row&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;collumNum&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt; 
                    &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;row&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;collumNum&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;row&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;collumNum&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt; 
                    &lt;span class=&quot;nx&quot;&gt;ret&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;rownum&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;][&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;headers&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;collumNum&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;JSON&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;parse&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;row&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;collumNum&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]);&lt;/span&gt;
                &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; 
                    &lt;span class=&quot;nx&quot;&gt;ret&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;rownum&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;][&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;headers&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;collumNum&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;row&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;collumNum&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;replace&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;^&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\s&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;*&quot;*|&quot;*&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\s&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;*$&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;/g&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;ret&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;ins class=&quot;adsbygoogle&quot; style=&quot;display:block&quot; data-ad-client=&quot;ca-pub-9732535637352249&quot; data-ad-slot=&quot;6033478353&quot; data-ad-format=&quot;auto&quot; data-full-width-responsive=&quot;true&quot;&gt;&lt;/ins&gt;
&lt;script&gt;	
(adsbygoogle = window.adsbygoogle || []).push({});	
&lt;/script&gt;&lt;/p&gt;

&lt;p&gt;The difficult part is writing the serialization function. Objects with grandchildren will be flattened and their names squashed together like this: “child.grandchild” -&amp;gt; “child/grandchild”. It will recursively find all of the children and push them to a queue. The function itself is not recursive! This is important in terms of performance. We will use JSON.stringify as a trick to automatically put double quotes around strings. Lastly we loop through all the rows and join the columns together.&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;    &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;obj2csv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;obj&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;opt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;typeof&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;obj&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;!==&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;object&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;opt&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;opt&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{};&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;scopechar&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;opt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;scopechar&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;delimeter&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;opt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;delimeter&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;Array&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;isArray&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;obj&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;obj&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;obj&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;];&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;curs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;rownum&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;queue&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;values&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[],&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;rows&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[],&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;headers&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{},&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;headersArr&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[];&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;rownum&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;rownum&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;obj&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;length&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;rownum&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;++&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;nx&quot;&gt;queue&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;obj&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;rownum&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;];&lt;/span&gt;
            &lt;span class=&quot;nx&quot;&gt;rows&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;rownum&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{};&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;queue&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;length&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;queue&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;pop&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
                &lt;span class=&quot;nx&quot;&gt;curs&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;queue&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;pop&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
                &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;curs&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;!==&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;null&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;typeof&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;curs&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;object&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                    &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;key&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;curs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;curs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;hasOwnProperty&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                            &lt;span class=&quot;nx&quot;&gt;queue&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;curs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]);&lt;/span&gt;
                            &lt;span class=&quot;nx&quot;&gt;queue&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;?&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;scopechar&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
                    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
                &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;headers&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;undefined&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;headers&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
                    &lt;span class=&quot;nx&quot;&gt;rows&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;rownum&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;][&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;curs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
            &lt;span class=&quot;nx&quot;&gt;values&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;rownum&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[];&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;c1&quot;&gt;// create csv text&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;key&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;headers&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;headers&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;hasOwnProperty&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;nx&quot;&gt;headersArr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;rownum&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;rownum&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;obj&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;length&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;rownum&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;++&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                    &lt;span class=&quot;nx&quot;&gt;values&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;rownum&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;rows&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;rownum&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;][&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;undefined&lt;/span&gt;
                        &lt;span class=&quot;p&quot;&gt;?&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&apos;&lt;/span&gt;
                        &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;JSON&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;stringify&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;rows&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;rownum&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;][&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]));&lt;/span&gt;
                &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;rownum&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;rownum&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;obj&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;length&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;rownum&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;++&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;nx&quot;&gt;values&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;rownum&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;values&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;rownum&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;delimeter&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;headersArr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;delimeter&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;values&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;(Array.isArray is es5 syntax, be sure to polyfill when necessary)&lt;/p&gt;

&lt;p&gt;I used the code in this example to build a json2csv/csv2json converter which can be found &lt;a href=&quot;https://esstudio.site/json2csv&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;div id=&quot;full-example&quot;&gt;
&lt;h2&gt;Full Example:&lt;/h2&gt;

&lt;script src=&quot;https://gist.github.com/a5197d8c1c6fba1349f074d2f4ca2e31.js&quot;&gt; &lt;/script&gt;
&lt;/div&gt;

&lt;p&gt;&lt;ins class=&quot;adsbygoogle&quot; style=&quot;display:block&quot; data-ad-client=&quot;ca-pub-9732535637352249&quot; data-ad-slot=&quot;6033478353&quot; data-ad-format=&quot;auto&quot; data-full-width-responsive=&quot;true&quot;&gt;&lt;/ins&gt;
&lt;script&gt;	
(adsbygoogle = window.adsbygoogle || []).push({});	
&lt;/script&gt;&lt;/p&gt;

&lt;div class=&quot;affiliate&quot;&gt;
    &lt;h3&gt;Resources:&lt;/h3&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fjavascript-in-24-hours-sams-teach-yourself-9780672338090&quot;&gt;Javascript
            in 24 hours&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fhtml-css-and-javascript-all-in-one-covering-html5-css3-9780672338083&quot;&gt;HTML,
            CSS, ES6 all in one&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Flearning-react-a-hands-on-guide-to-building-web-applications-9780134843551&quot;&gt;A
            Hands-On Guide to Building Web Applications Using React&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Flearning-react-a-hands-on-guide-to-building-web-applications-9780134843551http%3A%2F%2Fwww.informit.com%2Fstore%2Flearning-regular-expressions-9780134757063&quot;&gt;Learning
            Regular Expressions&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fnode.js-mongodb-and-angular-web-development-the-definitive-9780134655536&quot;&gt;Node.js,
            MongoDB, and Angular web development&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;p&gt;&lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=145238.10000683&amp;amp;type=3&amp;amp;subid=0&quot;&gt;InformIT
            eBook Store&lt;/a&gt;&lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.10000683&amp;amp;type=3&amp;amp;subid=0&quot; /&gt;
        has a large number of ebooks on a wide range of topics. I would definitely recommend them.&lt;/p&gt;
    &lt;h3&gt;Great courses:&lt;/h3&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fjavascript-beginner.html&quot;&gt;Javascript
            for beginners in 3 hours&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fjavascript-basics-web-development-building-blocks.html&quot;&gt;Javascript
            basic web development building blocks&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fmobile-ui-and-ux-design.html&quot;&gt;Mobile
            UI and UX Design&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fmobile-ui-and-ux-design.htmlhttps%3A%2F%2Fwww.quickstart.com%2Fbuilding-web-applications-with-react.html&quot;&gt;Building
            web applications with react&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fstarting-with-angular-4.html&quot;&gt;Starting
            with angular 4&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fprogramming-in-c-ms-20483.html&quot;&gt;Programming
            in C#&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt; (recommended)
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Ffind-training%2Ftraining-by-topic%2Fapp-development%2Fweb-development.html&quot;&gt;More
            web development courses&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;p&gt;
        &lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=579862.416&amp;amp;type=3&amp;amp;subid=0&quot;&gt;Quickstart
        &lt;/a&gt;&lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.416&amp;amp;type=3&amp;amp;subid=0&quot; /&gt;
        offers a large amount of (online) courses on web development (&lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=579862.416&amp;amp;type=3&amp;amp;subid=0&quot;&gt;Use
            Code LSOFF50&lt;/a&gt;&lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.416&amp;amp;type=3&amp;amp;subid=0&quot; /&gt;
        to get 50% off ;p)
    &lt;/p&gt;
&lt;/div&gt;</content>

      
      
      
      
      

      <author>
          <name>Sem Postma</name>
        
        
      </author>

      

      
        <category term="csv" />
      
        <category term="json" />
      
        <category term="web" />
      
        <category term="javascript" />
      
        <category term="programming" />
      

      
        <summary type="html">Checkout the website: JSON2CSV or the full example.</summary>
      

      
      
        
        <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://esstudio.site/uploads/icon-sm-7efc02.png" />
      
    </entry>
  
    
    
    <entry>
      <title type="html">Teaching a Neural Network to write text</title>
      <link href="https://esstudio.site/2018/05/28/teaching-a-neural-network-to-write-text.html" rel="alternate" type="text/html" title="Teaching a Neural Network to write text" />
      <published>2018-05-28T15:44:00+02:00</published>
      <updated>2018-05-28T15:44:00+02:00</updated>
      <id>https://esstudio.site/2018/05/28/teaching-a-neural-network-to-write-text</id>
      <content type="html" xml:base="https://esstudio.site/2018/05/28/teaching-a-neural-network-to-write-text.html">&lt;p&gt;A simple neural network that writes letters using &lt;a href=&quot;https://github.com/cazala/synaptic&quot;&gt;synaptic&lt;/a&gt; and &lt;a href=&quot;https://github.com/oliver-moran/jimp&quot;&gt;jimp&lt;/a&gt; in pure javascript.&lt;/p&gt;

&lt;h1 id=&quot;checkout-a-working-example-below&quot;&gt;&lt;a href=&quot;#nn-example-text-writer&quot;&gt;Checkout a working example below&lt;/a&gt;&lt;/h1&gt;

&lt;script src=&quot;https://gist.github.com/26afb76d0bee8ec00dff89946901ed0e/b5c23bb621fe6bf75b4c2461b1d5c28df8b9245a.js&quot;&gt; &lt;/script&gt;

&lt;p&gt;I will be running the code in the browser but you are free to use Node.js. We need to include two libraries: &lt;a href=&quot;https://github.com/oliver-moran/jimp&quot;&gt;Jimp&lt;/a&gt; and &lt;a href=&quot;https://github.com/cazala/synaptic&quot;&gt;Synaptic&lt;/a&gt;.
&lt;script src=&quot;https://gist.github.com/ba2beef73f2545aafbc0f68e69dcd720/91fda2ab12eb89e11a1190f16a36fe0e3f592804.js&quot;&gt; &lt;/script&gt;
We will be using the Architect and the Trainer from synaptic.js to create our neural network. If you are using Node.js, you will also have to require Jimp. Next create the “catagorical” helper function. This will transform a letter to a valid input for the neural network. For example: 1(B) =&amp;gt; [ 0, 1, 0, 0, …, 0 ].&lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/ba2beef73f2545aafbc0f68e69dcd720/633da86798d0d54f60fb18e5dbc70e91ef5a754c.js&quot;&gt; &lt;/script&gt;

&lt;p&gt;To create the images from letters we will use Jimp. After loading a jimp font we will start constructing the training data.
For every letter in the alphabet we will create an image version of the uppercase letter. “String.fromCharCode” takes in a ascii code and returns the character.
In ascii, 65 is the character code for “A”. 66 is the character code for “B”. etc. If you are using Node.js you can write the image (using image.write) to your file system.
The training data will be in the format “&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;{ input: number[26], output: number[256] }&lt;/code&gt;”. Now use the raw pixel data from image.bitmap.data as output and the catagorical letter index as input. To calculate the greyscale value lets take the sum of the rgb channels and divide by 765. Lets’s console.log to check our training data.&lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/ba2beef73f2545aafbc0f68e69dcd720/3a6a3b7df98a6a36728b4dff137628b32f3abbf4.js&quot;&gt; &lt;/script&gt;

&lt;p&gt;&lt;ins class=&quot;adsbygoogle&quot; style=&quot;display:block&quot; data-ad-client=&quot;ca-pub-9732535637352249&quot; data-ad-slot=&quot;6033478353&quot; data-ad-format=&quot;auto&quot; data-full-width-responsive=&quot;true&quot;&gt;&lt;/ins&gt;
&lt;script&gt;	
(adsbygoogle = window.adsbygoogle || []).push({});	
&lt;/script&gt;&lt;/p&gt;

&lt;p&gt;With the training data is in place we can create our neural network by instantiating a new instance of Architect.Perceptron. Pass in the number of nodes per layer to the constructor. In this case we will use 26 nodes in our hidden layer. To train the network you can use the built-in synaptic.Trainer. It’s important to set the learning rate to something below 0.05 for this example as a higher learning rate will make the neural network forget it’s previous results. To improve the results you could use &lt;a href=&quot;http://colah.github.io/posts/2015-08-Understanding-LSTMs&quot;&gt;LSTM Networks&lt;/a&gt;.
Check out a visualization of the network in the image below:&lt;/p&gt;

&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;560&quot; height=&quot;610&quot; viewBox=&quot;120 0 560 610&quot;&gt;&lt;style&gt;.node:hover {stroke: #999;stroke-opacity: .6;stroke-width: 4px;}.link {stroke-opacity: .6;}&lt;/style&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;11.719&quot; y2=&quot;11.719&quot; stroke=&quot;#00ff18&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;11.719&quot; y2=&quot;35.156&quot; stroke=&quot;#00ff8e&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;11.719&quot; y2=&quot;58.594&quot; stroke=&quot;#00ff5a&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;11.719&quot; y2=&quot;82.031&quot; stroke=&quot;#00ff56&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;11.719&quot; y2=&quot;105.47&quot; stroke=&quot;#ffa000&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;11.719&quot; y2=&quot;128.91&quot; stroke=&quot;#00ff3b&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;11.719&quot; y2=&quot;152.34&quot; stroke=&quot;#00e1ff&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;11.719&quot; y2=&quot;175.78&quot; stroke=&quot;#5aff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;11.719&quot; y2=&quot;199.22&quot; stroke=&quot;#ffc500&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;11.719&quot; y2=&quot;222.66&quot; stroke=&quot;#00ff1d&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;11.719&quot; y2=&quot;246.09&quot; stroke=&quot;#1bff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;11.719&quot; y2=&quot;269.53&quot; stroke=&quot;#0f1&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;11.719&quot; y2=&quot;292.97&quot; stroke=&quot;#008fff&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;11.719&quot; y2=&quot;316.41&quot; stroke=&quot;#ff9c00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;11.719&quot; y2=&quot;339.84&quot; stroke=&quot;#00ff49&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;11.719&quot; y2=&quot;363.28&quot; stroke=&quot;#00ffa2&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;11.719&quot; y2=&quot;386.72&quot; stroke=&quot;#00ffa3&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;11.719&quot; y2=&quot;410.16&quot; stroke=&quot;#00f5ff&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;11.719&quot; y2=&quot;433.59&quot; stroke=&quot;#00ff2d&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;11.719&quot; y2=&quot;457.03&quot; stroke=&quot;#ffb100&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;11.719&quot; y2=&quot;480.47&quot; stroke=&quot;#00ff9f&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;11.719&quot; y2=&quot;503.91&quot; stroke=&quot;#00ff4b&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;11.719&quot; y2=&quot;527.34&quot; stroke=&quot;#ff7e00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;11.719&quot; y2=&quot;550.78&quot; stroke=&quot;#00ff1b&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;11.719&quot; y2=&quot;574.22&quot; stroke=&quot;#12ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;11.719&quot; y2=&quot;597.66&quot; stroke=&quot;#30ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;35.156&quot; y2=&quot;11.719&quot; stroke=&quot;#00ff27&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;35.156&quot; y2=&quot;35.156&quot; stroke=&quot;#00ff1f&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;35.156&quot; y2=&quot;58.594&quot; stroke=&quot;#00ff32&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;35.156&quot; y2=&quot;82.031&quot; stroke=&quot;#00ff1c&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;35.156&quot; y2=&quot;105.47&quot; stroke=&quot;#ffe700&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;35.156&quot; y2=&quot;128.91&quot; stroke=&quot;#00ff18&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;35.156&quot; y2=&quot;152.34&quot; stroke=&quot;#8f0&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;35.156&quot; y2=&quot;175.78&quot; stroke=&quot;#05ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;35.156&quot; y2=&quot;199.22&quot; stroke=&quot;#3f0&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;35.156&quot; y2=&quot;222.66&quot; stroke=&quot;#00ff5d&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;35.156&quot; y2=&quot;246.09&quot; stroke=&quot;#00cdff&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;35.156&quot; y2=&quot;269.53&quot; stroke=&quot;#00ff2a&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;35.156&quot; y2=&quot;292.97&quot; stroke=&quot;#ffa900&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;35.156&quot; y2=&quot;316.41&quot; stroke=&quot;#00ff76&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;35.156&quot; y2=&quot;339.84&quot; stroke=&quot;#00ff07&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;35.156&quot; y2=&quot;363.28&quot; stroke=&quot;#00c7ff&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;35.156&quot; y2=&quot;386.72&quot; stroke=&quot;#00ff15&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;35.156&quot; y2=&quot;410.16&quot; stroke=&quot;#00ff75&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;35.156&quot; y2=&quot;433.59&quot; stroke=&quot;#00f2ff&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;35.156&quot; y2=&quot;457.03&quot; stroke=&quot;#3eff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;35.156&quot; y2=&quot;480.47&quot; stroke=&quot;#00ff69&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;35.156&quot; y2=&quot;503.91&quot; stroke=&quot;#00ff2b&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;35.156&quot; y2=&quot;527.34&quot; stroke=&quot;#00ff5d&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;35.156&quot; y2=&quot;550.78&quot; stroke=&quot;#00ff13&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;35.156&quot; y2=&quot;574.22&quot; stroke=&quot;#0096ff&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;35.156&quot; y2=&quot;597.66&quot; stroke=&quot;#00ff2e&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;58.594&quot; y2=&quot;11.719&quot; stroke=&quot;#00ff38&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;58.594&quot; y2=&quot;35.156&quot; stroke=&quot;#00ff73&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;58.594&quot; y2=&quot;58.594&quot; stroke=&quot;#00ff28&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;58.594&quot; y2=&quot;82.031&quot; stroke=&quot;#00ff39&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;58.594&quot; y2=&quot;105.47&quot; stroke=&quot;#00ffc4&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;58.594&quot; y2=&quot;128.91&quot; stroke=&quot;#00ff64&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;58.594&quot; y2=&quot;152.34&quot; stroke=&quot;#00ff93&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;58.594&quot; y2=&quot;175.78&quot; stroke=&quot;#0f5&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;58.594&quot; y2=&quot;199.22&quot; stroke=&quot;#00ff45&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;58.594&quot; y2=&quot;222.66&quot; stroke=&quot;#00ff4a&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;58.594&quot; y2=&quot;246.09&quot; stroke=&quot;#00ffde&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;58.594&quot; y2=&quot;269.53&quot; stroke=&quot;#00ff30&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;58.594&quot; y2=&quot;292.97&quot; stroke=&quot;#1fff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;58.594&quot; y2=&quot;316.41&quot; stroke=&quot;#2bff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;58.594&quot; y2=&quot;339.84&quot; stroke=&quot;#00ff41&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;58.594&quot; y2=&quot;363.28&quot; stroke=&quot;#ffa800&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;58.594&quot; y2=&quot;386.72&quot; stroke=&quot;#00ffae&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;58.594&quot; y2=&quot;410.16&quot; stroke=&quot;#00ff37&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;58.594&quot; y2=&quot;433.59&quot; stroke=&quot;#00ff60&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;58.594&quot; y2=&quot;457.03&quot; stroke=&quot;#00ff35&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;58.594&quot; y2=&quot;480.47&quot; stroke=&quot;#00ff9d&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;58.594&quot; y2=&quot;503.91&quot; stroke=&quot;#00ff39&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;58.594&quot; y2=&quot;527.34&quot; stroke=&quot;#00ff8d&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;58.594&quot; y2=&quot;550.78&quot; stroke=&quot;#00ff3f&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;58.594&quot; y2=&quot;574.22&quot; stroke=&quot;#ffa600&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;58.594&quot; y2=&quot;597.66&quot; stroke=&quot;#00ff9c&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;82.031&quot; y2=&quot;11.719&quot; stroke=&quot;#00ff39&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;82.031&quot; y2=&quot;35.156&quot; stroke=&quot;#91ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;82.031&quot; y2=&quot;58.594&quot; stroke=&quot;#00ff24&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;82.031&quot; y2=&quot;82.031&quot; stroke=&quot;#00ff01&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;82.031&quot; y2=&quot;105.47&quot; stroke=&quot;#00ff91&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;82.031&quot; y2=&quot;128.91&quot; stroke=&quot;#00ff39&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;82.031&quot; y2=&quot;152.34&quot; stroke=&quot;#abff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;82.031&quot; y2=&quot;175.78&quot; stroke=&quot;#00ff4c&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;82.031&quot; y2=&quot;199.22&quot; stroke=&quot;#00ff2b&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;82.031&quot; y2=&quot;222.66&quot; stroke=&quot;#00ff72&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;82.031&quot; y2=&quot;246.09&quot; stroke=&quot;#00b1ff&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;82.031&quot; y2=&quot;269.53&quot; stroke=&quot;#00ff32&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;82.031&quot; y2=&quot;292.97&quot; stroke=&quot;#ff9a00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;82.031&quot; y2=&quot;316.41&quot; stroke=&quot;#00cbff&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;82.031&quot; y2=&quot;339.84&quot; stroke=&quot;#00ff29&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;82.031&quot; y2=&quot;363.28&quot; stroke=&quot;#00ecff&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;82.031&quot; y2=&quot;386.72&quot; stroke=&quot;#00ff0e&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;82.031&quot; y2=&quot;410.16&quot; stroke=&quot;#00ff2f&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;82.031&quot; y2=&quot;433.59&quot; stroke=&quot;#00ff05&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;82.031&quot; y2=&quot;457.03&quot; stroke=&quot;#2dff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;82.031&quot; y2=&quot;480.47&quot; stroke=&quot;#00ff93&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;82.031&quot; y2=&quot;503.91&quot; stroke=&quot;#00ff1e&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;82.031&quot; y2=&quot;527.34&quot; stroke=&quot;#00ff31&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;82.031&quot; y2=&quot;550.78&quot; stroke=&quot;#00ff47&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;82.031&quot; y2=&quot;574.22&quot; stroke=&quot;#dfff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;82.031&quot; y2=&quot;597.66&quot; stroke=&quot;#00ff9a&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;105.47&quot; y2=&quot;11.719&quot; stroke=&quot;#00ff45&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;105.47&quot; y2=&quot;35.156&quot; stroke=&quot;#00ff4e&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;105.47&quot; y2=&quot;58.594&quot; stroke=&quot;#00ff48&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;105.47&quot; y2=&quot;82.031&quot; stroke=&quot;#00ff2c&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;105.47&quot; y2=&quot;105.47&quot; stroke=&quot;#00ffa5&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;105.47&quot; y2=&quot;128.91&quot; stroke=&quot;#00ff2c&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;105.47&quot; y2=&quot;152.34&quot; stroke=&quot;#15ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;105.47&quot; y2=&quot;175.78&quot; stroke=&quot;#00ff23&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;105.47&quot; y2=&quot;199.22&quot; stroke=&quot;#00ff8b&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;105.47&quot; y2=&quot;222.66&quot; stroke=&quot;#00ff43&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;105.47&quot; y2=&quot;246.09&quot; stroke=&quot;#00caff&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;105.47&quot; y2=&quot;269.53&quot; stroke=&quot;#00ff2a&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;105.47&quot; y2=&quot;292.97&quot; stroke=&quot;#c4ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;105.47&quot; y2=&quot;316.41&quot; stroke=&quot;#00ff5e&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;105.47&quot; y2=&quot;339.84&quot; stroke=&quot;#00ff0b&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;105.47&quot; y2=&quot;363.28&quot; stroke=&quot;#00e9ff&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;105.47&quot; y2=&quot;386.72&quot; stroke=&quot;#00ffe6&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;105.47&quot; y2=&quot;410.16&quot; stroke=&quot;#00d9ff&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;105.47&quot; y2=&quot;433.59&quot; stroke=&quot;#00c4ff&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;105.47&quot; y2=&quot;457.03&quot; stroke=&quot;#00ff91&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;105.47&quot; y2=&quot;480.47&quot; stroke=&quot;#bf0&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;105.47&quot; y2=&quot;503.91&quot; stroke=&quot;#00ff25&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;105.47&quot; y2=&quot;527.34&quot; stroke=&quot;#00ffd8&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;105.47&quot; y2=&quot;550.78&quot; stroke=&quot;#00ff0a&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;105.47&quot; y2=&quot;574.22&quot; stroke=&quot;#00ffbe&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;105.47&quot; y2=&quot;597.66&quot; stroke=&quot;#00ff40&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;128.91&quot; y2=&quot;11.719&quot; stroke=&quot;#00ff45&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;128.91&quot; y2=&quot;35.156&quot; stroke=&quot;#00ff31&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;128.91&quot; y2=&quot;58.594&quot; stroke=&quot;#00ff4f&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;128.91&quot; y2=&quot;82.031&quot; stroke=&quot;#00ff42&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;128.91&quot; y2=&quot;105.47&quot; stroke=&quot;#00ebff&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;128.91&quot; y2=&quot;128.91&quot; stroke=&quot;#0f3&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;128.91&quot; y2=&quot;152.34&quot; stroke=&quot;#23ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;128.91&quot; y2=&quot;175.78&quot; stroke=&quot;#00ff3a&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;128.91&quot; y2=&quot;199.22&quot; stroke=&quot;#00ff9f&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;128.91&quot; y2=&quot;222.66&quot; stroke=&quot;#00ff4d&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;128.91&quot; y2=&quot;246.09&quot; stroke=&quot;#00ffe5&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;128.91&quot; y2=&quot;269.53&quot; stroke=&quot;#00ff3a&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;128.91&quot; y2=&quot;292.97&quot; stroke=&quot;#00f9ff&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;128.91&quot; y2=&quot;316.41&quot; stroke=&quot;#00ff4c&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;128.91&quot; y2=&quot;339.84&quot; stroke=&quot;#00ff36&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;128.91&quot; y2=&quot;363.28&quot; stroke=&quot;#00edff&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;128.91&quot; y2=&quot;386.72&quot; stroke=&quot;#00ffdb&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;128.91&quot; y2=&quot;410.16&quot; stroke=&quot;#009dff&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;128.91&quot; y2=&quot;433.59&quot; stroke=&quot;#00bfff&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;128.91&quot; y2=&quot;457.03&quot; stroke=&quot;#6f0&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;128.91&quot; y2=&quot;480.47&quot; stroke=&quot;#5f0&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;128.91&quot; y2=&quot;503.91&quot; stroke=&quot;#00ff43&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;128.91&quot; y2=&quot;527.34&quot; stroke=&quot;#00ffbd&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;128.91&quot; y2=&quot;550.78&quot; stroke=&quot;#00ff21&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;128.91&quot; y2=&quot;574.22&quot; stroke=&quot;#00ffe2&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;128.91&quot; y2=&quot;597.66&quot; stroke=&quot;#00ff89&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;152.34&quot; y2=&quot;11.719&quot; stroke=&quot;#00ff1e&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;152.34&quot; y2=&quot;35.156&quot; stroke=&quot;#00ff8d&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;152.34&quot; y2=&quot;58.594&quot; stroke=&quot;#00ff14&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;152.34&quot; y2=&quot;82.031&quot; stroke=&quot;#00ff34&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;152.34&quot; y2=&quot;105.47&quot; stroke=&quot;#00ff23&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;152.34&quot; y2=&quot;128.91&quot; stroke=&quot;#00ff54&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;152.34&quot; y2=&quot;152.34&quot; stroke=&quot;#00ffb0&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;152.34&quot; y2=&quot;175.78&quot; stroke=&quot;#00ff3e&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;152.34&quot; y2=&quot;199.22&quot; stroke=&quot;#5cff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;152.34&quot; y2=&quot;222.66&quot; stroke=&quot;#00ff3c&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;152.34&quot; y2=&quot;246.09&quot; stroke=&quot;#f6ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;152.34&quot; y2=&quot;269.53&quot; stroke=&quot;#00ff2b&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;152.34&quot; y2=&quot;292.97&quot; stroke=&quot;#eaff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;152.34&quot; y2=&quot;316.41&quot; stroke=&quot;#00ff6c&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;152.34&quot; y2=&quot;339.84&quot; stroke=&quot;#00ff3f&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;152.34&quot; y2=&quot;363.28&quot; stroke=&quot;#ff8200&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;152.34&quot; y2=&quot;386.72&quot; stroke=&quot;#00ffda&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;152.34&quot; y2=&quot;410.16&quot; stroke=&quot;#00ffec&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;152.34&quot; y2=&quot;433.59&quot; stroke=&quot;#00ff26&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;152.34&quot; y2=&quot;457.03&quot; stroke=&quot;#00ff18&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;152.34&quot; y2=&quot;480.47&quot; stroke=&quot;#00ff64&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;152.34&quot; y2=&quot;503.91&quot; stroke=&quot;#00ff1e&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;152.34&quot; y2=&quot;527.34&quot; stroke=&quot;#02ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;152.34&quot; y2=&quot;550.78&quot; stroke=&quot;#00ff3a&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;152.34&quot; y2=&quot;574.22&quot; stroke=&quot;#ffa100&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;152.34&quot; y2=&quot;597.66&quot; stroke=&quot;#00ff6f&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;175.78&quot; y2=&quot;11.719&quot; stroke=&quot;#00ff57&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;175.78&quot; y2=&quot;35.156&quot; stroke=&quot;#0f3&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;175.78&quot; y2=&quot;58.594&quot; stroke=&quot;#00ff3f&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;175.78&quot; y2=&quot;82.031&quot; stroke=&quot;#00ff47&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;175.78&quot; y2=&quot;105.47&quot; stroke=&quot;#00ff64&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;175.78&quot; y2=&quot;128.91&quot; stroke=&quot;#00ff42&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;175.78&quot; y2=&quot;152.34&quot; stroke=&quot;#adff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;175.78&quot; y2=&quot;175.78&quot; stroke=&quot;#00ff68&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;175.78&quot; y2=&quot;199.22&quot; stroke=&quot;#00ff9c&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;175.78&quot; y2=&quot;222.66&quot; stroke=&quot;#00ff60&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;175.78&quot; y2=&quot;246.09&quot; stroke=&quot;#00ffeb&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;175.78&quot; y2=&quot;269.53&quot; stroke=&quot;#00ff2f&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;175.78&quot; y2=&quot;292.97&quot; stroke=&quot;#00ffd1&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;175.78&quot; y2=&quot;316.41&quot; stroke=&quot;#00b0ff&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;175.78&quot; y2=&quot;339.84&quot; stroke=&quot;#00ff19&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;175.78&quot; y2=&quot;363.28&quot; stroke=&quot;#00ffe0&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;175.78&quot; y2=&quot;386.72&quot; stroke=&quot;#00e8ff&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;175.78&quot; y2=&quot;410.16&quot; stroke=&quot;#ffdc00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;175.78&quot; y2=&quot;433.59&quot; stroke=&quot;#00ffb4&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;175.78&quot; y2=&quot;457.03&quot; stroke=&quot;#6cff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;175.78&quot; y2=&quot;480.47&quot; stroke=&quot;#00ff05&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;175.78&quot; y2=&quot;503.91&quot; stroke=&quot;#00ff34&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;175.78&quot; y2=&quot;527.34&quot; stroke=&quot;#df0&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;175.78&quot; y2=&quot;550.78&quot; stroke=&quot;#00ff35&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;175.78&quot; y2=&quot;574.22&quot; stroke=&quot;#41ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;175.78&quot; y2=&quot;597.66&quot; stroke=&quot;#00ff8c&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;199.22&quot; y2=&quot;11.719&quot; stroke=&quot;#00ff4d&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;199.22&quot; y2=&quot;35.156&quot; stroke=&quot;#00ff35&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;199.22&quot; y2=&quot;58.594&quot; stroke=&quot;#0f5&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;199.22&quot; y2=&quot;82.031&quot; stroke=&quot;#00ff41&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;199.22&quot; y2=&quot;105.47&quot; stroke=&quot;#0fc&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;199.22&quot; y2=&quot;128.91&quot; stroke=&quot;#00ff5c&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;199.22&quot; y2=&quot;152.34&quot; stroke=&quot;#00ffe3&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;199.22&quot; y2=&quot;175.78&quot; stroke=&quot;#00ff52&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;199.22&quot; y2=&quot;199.22&quot; stroke=&quot;#00ffd4&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;199.22&quot; y2=&quot;222.66&quot; stroke=&quot;#00ff67&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;199.22&quot; y2=&quot;246.09&quot; stroke=&quot;#00ffc3&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;199.22&quot; y2=&quot;269.53&quot; stroke=&quot;#00ff40&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;199.22&quot; y2=&quot;292.97&quot; stroke=&quot;#0085ff&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;199.22&quot; y2=&quot;316.41&quot; stroke=&quot;#00d2ff&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;199.22&quot; y2=&quot;339.84&quot; stroke=&quot;#00ff4d&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;199.22&quot; y2=&quot;363.28&quot; stroke=&quot;#00ffc7&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;199.22&quot; y2=&quot;386.72&quot; stroke=&quot;#00ff26&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;199.22&quot; y2=&quot;410.16&quot; stroke=&quot;#0f5&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;199.22&quot; y2=&quot;433.59&quot; stroke=&quot;#8aff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;199.22&quot; y2=&quot;457.03&quot; stroke=&quot;#6bff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;199.22&quot; y2=&quot;480.47&quot; stroke=&quot;#00ff7f&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;199.22&quot; y2=&quot;503.91&quot; stroke=&quot;#00ff4e&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;199.22&quot; y2=&quot;527.34&quot; stroke=&quot;#00ffe1&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;199.22&quot; y2=&quot;550.78&quot; stroke=&quot;#00ff43&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;199.22&quot; y2=&quot;574.22&quot; stroke=&quot;#0f1&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;199.22&quot; y2=&quot;597.66&quot; stroke=&quot;#00ff7c&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;222.66&quot; y2=&quot;11.719&quot; stroke=&quot;#00ff20&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;222.66&quot; y2=&quot;35.156&quot; stroke=&quot;#00ff83&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;222.66&quot; y2=&quot;58.594&quot; stroke=&quot;#00ff29&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;222.66&quot; y2=&quot;82.031&quot; stroke=&quot;#00ff56&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;222.66&quot; y2=&quot;105.47&quot; stroke=&quot;#00ff81&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;222.66&quot; y2=&quot;128.91&quot; stroke=&quot;#00ff24&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;222.66&quot; y2=&quot;152.34&quot; stroke=&quot;#51ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;222.66&quot; y2=&quot;175.78&quot; stroke=&quot;#00ff3c&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;222.66&quot; y2=&quot;199.22&quot; stroke=&quot;#ffde00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;222.66&quot; y2=&quot;222.66&quot; stroke=&quot;#00ff39&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;222.66&quot; y2=&quot;246.09&quot; stroke=&quot;#00ffd7&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;222.66&quot; y2=&quot;269.53&quot; stroke=&quot;#00ff1d&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;222.66&quot; y2=&quot;292.97&quot; stroke=&quot;#00a5ff&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;222.66&quot; y2=&quot;316.41&quot; stroke=&quot;#ff8100&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;222.66&quot; y2=&quot;339.84&quot; stroke=&quot;#00ff45&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;222.66&quot; y2=&quot;363.28&quot; stroke=&quot;#00ffb2&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;222.66&quot; y2=&quot;386.72&quot; stroke=&quot;#5eff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;222.66&quot; y2=&quot;410.16&quot; stroke=&quot;#00ff6a&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;222.66&quot; y2=&quot;433.59&quot; stroke=&quot;#ff7400&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;222.66&quot; y2=&quot;457.03&quot; stroke=&quot;#00ff38&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;222.66&quot; y2=&quot;480.47&quot; stroke=&quot;#00ffca&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;222.66&quot; y2=&quot;503.91&quot; stroke=&quot;#00ff09&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;222.66&quot; y2=&quot;527.34&quot; stroke=&quot;#00ffe2&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;222.66&quot; y2=&quot;550.78&quot; stroke=&quot;#00ff3a&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;222.66&quot; y2=&quot;574.22&quot; stroke=&quot;#00ffac&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;222.66&quot; y2=&quot;597.66&quot; stroke=&quot;#b4ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;246.09&quot; y2=&quot;11.719&quot; stroke=&quot;#00ff26&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;246.09&quot; y2=&quot;35.156&quot; stroke=&quot;#00ff6c&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;246.09&quot; y2=&quot;58.594&quot; stroke=&quot;#00ff40&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;246.09&quot; y2=&quot;82.031&quot; stroke=&quot;#00ff2a&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;246.09&quot; y2=&quot;105.47&quot; stroke=&quot;#00ffc5&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;246.09&quot; y2=&quot;128.91&quot; stroke=&quot;#00ff02&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;246.09&quot; y2=&quot;152.34&quot; stroke=&quot;#00e0ff&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;246.09&quot; y2=&quot;175.78&quot; stroke=&quot;#00ff35&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;246.09&quot; y2=&quot;199.22&quot; stroke=&quot;#00ffc0&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;246.09&quot; y2=&quot;222.66&quot; stroke=&quot;#00ff23&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;246.09&quot; y2=&quot;246.09&quot; stroke=&quot;#00ff7f&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;246.09&quot; y2=&quot;269.53&quot; stroke=&quot;#00ff38&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;246.09&quot; y2=&quot;292.97&quot; stroke=&quot;#00a6ff&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;246.09&quot; y2=&quot;316.41&quot; stroke=&quot;#00ff28&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;246.09&quot; y2=&quot;339.84&quot; stroke=&quot;#00ff2f&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;246.09&quot; y2=&quot;363.28&quot; stroke=&quot;#00ffdf&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;246.09&quot; y2=&quot;386.72&quot; stroke=&quot;#ffcf00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;246.09&quot; y2=&quot;410.16&quot; stroke=&quot;#bf0&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;246.09&quot; y2=&quot;433.59&quot; stroke=&quot;#0bf&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;246.09&quot; y2=&quot;457.03&quot; stroke=&quot;#00ff4d&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;246.09&quot; y2=&quot;480.47&quot; stroke=&quot;#28ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;246.09&quot; y2=&quot;503.91&quot; stroke=&quot;#00ff46&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;246.09&quot; y2=&quot;527.34&quot; stroke=&quot;#94ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;246.09&quot; y2=&quot;550.78&quot; stroke=&quot;#00ff4d&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;246.09&quot; y2=&quot;574.22&quot; stroke=&quot;#00ffd3&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;246.09&quot; y2=&quot;597.66&quot; stroke=&quot;#67ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;269.53&quot; y2=&quot;11.719&quot; stroke=&quot;#00ff45&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;269.53&quot; y2=&quot;35.156&quot; stroke=&quot;#00ff1c&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;269.53&quot; y2=&quot;58.594&quot; stroke=&quot;#00ff3a&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;269.53&quot; y2=&quot;82.031&quot; stroke=&quot;#00ff2d&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;269.53&quot; y2=&quot;105.47&quot; stroke=&quot;#0f6&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;269.53&quot; y2=&quot;128.91&quot; stroke=&quot;#00ff72&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;269.53&quot; y2=&quot;152.34&quot; stroke=&quot;#00fff3&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;269.53&quot; y2=&quot;175.78&quot; stroke=&quot;#00ff46&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;269.53&quot; y2=&quot;199.22&quot; stroke=&quot;#00ffa8&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;269.53&quot; y2=&quot;222.66&quot; stroke=&quot;#00ff75&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;269.53&quot; y2=&quot;246.09&quot; stroke=&quot;#00c4ff&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;269.53&quot; y2=&quot;269.53&quot; stroke=&quot;#00ff38&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;269.53&quot; y2=&quot;292.97&quot; stroke=&quot;#42ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;269.53&quot; y2=&quot;316.41&quot; stroke=&quot;#00ecff&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;269.53&quot; y2=&quot;339.84&quot; stroke=&quot;#00ff3d&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;269.53&quot; y2=&quot;363.28&quot; stroke=&quot;#00ffc7&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;269.53&quot; y2=&quot;386.72&quot; stroke=&quot;#00ff15&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;269.53&quot; y2=&quot;410.16&quot; stroke=&quot;#00ff3a&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;269.53&quot; y2=&quot;433.59&quot; stroke=&quot;#ffd800&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;269.53&quot; y2=&quot;457.03&quot; stroke=&quot;#00ff6c&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;269.53&quot; y2=&quot;480.47&quot; stroke=&quot;#00ff7d&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;269.53&quot; y2=&quot;503.91&quot; stroke=&quot;#00ff31&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;269.53&quot; y2=&quot;527.34&quot; stroke=&quot;#00b1ff&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;269.53&quot; y2=&quot;550.78&quot; stroke=&quot;#00ff3f&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;269.53&quot; y2=&quot;574.22&quot; stroke=&quot;#00ff42&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;269.53&quot; y2=&quot;597.66&quot; stroke=&quot;#00ff45&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;292.97&quot; y2=&quot;11.719&quot; stroke=&quot;#00ff1f&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;292.97&quot; y2=&quot;35.156&quot; stroke=&quot;#ff3700&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;292.97&quot; y2=&quot;58.594&quot; stroke=&quot;#07ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;292.97&quot; y2=&quot;82.031&quot; stroke=&quot;#00ff04&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;292.97&quot; y2=&quot;105.47&quot; stroke=&quot;#ff6800&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;292.97&quot; y2=&quot;128.91&quot; stroke=&quot;#00ff35&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;292.97&quot; y2=&quot;152.34&quot; stroke=&quot;#ff0&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;292.97&quot; y2=&quot;175.78&quot; stroke=&quot;#00ff4f&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;292.97&quot; y2=&quot;199.22&quot; stroke=&quot;#00ffc3&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;292.97&quot; y2=&quot;222.66&quot; stroke=&quot;#09ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;292.97&quot; y2=&quot;246.09&quot; stroke=&quot;#ff6500&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;292.97&quot; y2=&quot;269.53&quot; stroke=&quot;#00ff2a&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;292.97&quot; y2=&quot;292.97&quot; stroke=&quot;#00ff7e&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;292.97&quot; y2=&quot;316.41&quot; stroke=&quot;#0083ff&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;292.97&quot; y2=&quot;339.84&quot; stroke=&quot;#00ff2d&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;292.97&quot; y2=&quot;363.28&quot; stroke=&quot;#46ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;292.97&quot; y2=&quot;386.72&quot; stroke=&quot;#ffa500&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;292.97&quot; y2=&quot;410.16&quot; stroke=&quot;#0fb&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;292.97&quot; y2=&quot;433.59&quot; stroke=&quot;#ffc500&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;292.97&quot; y2=&quot;457.03&quot; stroke=&quot;#00ff1e&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;292.97&quot; y2=&quot;480.47&quot; stroke=&quot;#ff8d00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;292.97&quot; y2=&quot;503.91&quot; stroke=&quot;#00ff35&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;292.97&quot; y2=&quot;527.34&quot; stroke=&quot;#00ff05&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;292.97&quot; y2=&quot;550.78&quot; stroke=&quot;#00ff07&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;292.97&quot; y2=&quot;574.22&quot; stroke=&quot;#fff200&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;292.97&quot; y2=&quot;597.66&quot; stroke=&quot;#f5ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;316.41&quot; y2=&quot;11.719&quot; stroke=&quot;#00ff4d&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;316.41&quot; y2=&quot;35.156&quot; stroke=&quot;#00ff1e&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;316.41&quot; y2=&quot;58.594&quot; stroke=&quot;#00ff2e&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;316.41&quot; y2=&quot;82.031&quot; stroke=&quot;#00ff23&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;316.41&quot; y2=&quot;105.47&quot; stroke=&quot;#39ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;316.41&quot; y2=&quot;128.91&quot; stroke=&quot;#10ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;316.41&quot; y2=&quot;152.34&quot; stroke=&quot;#0fff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;316.41&quot; y2=&quot;175.78&quot; stroke=&quot;#00ff71&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;316.41&quot; y2=&quot;199.22&quot; stroke=&quot;#00ff6a&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;316.41&quot; y2=&quot;222.66&quot; stroke=&quot;#00ff38&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;316.41&quot; y2=&quot;246.09&quot; stroke=&quot;#21ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;316.41&quot; y2=&quot;269.53&quot; stroke=&quot;#00ff36&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;316.41&quot; y2=&quot;292.97&quot; stroke=&quot;#0ff&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;316.41&quot; y2=&quot;316.41&quot; stroke=&quot;#00a4ff&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;316.41&quot; y2=&quot;339.84&quot; stroke=&quot;#00ff1d&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;316.41&quot; y2=&quot;363.28&quot; stroke=&quot;#00ffe1&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;316.41&quot; y2=&quot;386.72&quot; stroke=&quot;#8dff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;316.41&quot; y2=&quot;410.16&quot; stroke=&quot;#ff9a00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;316.41&quot; y2=&quot;433.59&quot; stroke=&quot;#00dcff&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;316.41&quot; y2=&quot;457.03&quot; stroke=&quot;#00ff7a&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;316.41&quot; y2=&quot;480.47&quot; stroke=&quot;#00ff7b&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;316.41&quot; y2=&quot;503.91&quot; stroke=&quot;#00ff3c&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;316.41&quot; y2=&quot;527.34&quot; stroke=&quot;#ffdf00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;316.41&quot; y2=&quot;550.78&quot; stroke=&quot;#00ff52&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;316.41&quot; y2=&quot;574.22&quot; stroke=&quot;#fffd00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;316.41&quot; y2=&quot;597.66&quot; stroke=&quot;#0f1&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;339.84&quot; y2=&quot;11.719&quot; stroke=&quot;#1f0&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;339.84&quot; y2=&quot;35.156&quot; stroke=&quot;#00ff3a&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;339.84&quot; y2=&quot;58.594&quot; stroke=&quot;#00ff01&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;339.84&quot; y2=&quot;82.031&quot; stroke=&quot;#00ff14&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;339.84&quot; y2=&quot;105.47&quot; stroke=&quot;#00ff87&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;339.84&quot; y2=&quot;128.91&quot; stroke=&quot;#00ff5c&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;339.84&quot; y2=&quot;152.34&quot; stroke=&quot;#00ff85&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;339.84&quot; y2=&quot;175.78&quot; stroke=&quot;#00ff28&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;339.84&quot; y2=&quot;199.22&quot; stroke=&quot;#00ffae&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;339.84&quot; y2=&quot;222.66&quot; stroke=&quot;#00ff2a&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;339.84&quot; y2=&quot;246.09&quot; stroke=&quot;#9bff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;339.84&quot; y2=&quot;269.53&quot; stroke=&quot;#00ff2b&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;339.84&quot; y2=&quot;292.97&quot; stroke=&quot;#ff0&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;339.84&quot; y2=&quot;316.41&quot; stroke=&quot;#1f0&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;339.84&quot; y2=&quot;339.84&quot; stroke=&quot;#00ff48&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;339.84&quot; y2=&quot;363.28&quot; stroke=&quot;#ff5700&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;339.84&quot; y2=&quot;386.72&quot; stroke=&quot;#00ff4d&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;339.84&quot; y2=&quot;410.16&quot; stroke=&quot;#00daff&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;339.84&quot; y2=&quot;433.59&quot; stroke=&quot;#0fff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;339.84&quot; y2=&quot;457.03&quot; stroke=&quot;#00ff83&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;339.84&quot; y2=&quot;480.47&quot; stroke=&quot;#00ff3d&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;339.84&quot; y2=&quot;503.91&quot; stroke=&quot;#00ff25&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;339.84&quot; y2=&quot;527.34&quot; stroke=&quot;#00ffe0&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;339.84&quot; y2=&quot;550.78&quot; stroke=&quot;#00ff40&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;339.84&quot; y2=&quot;574.22&quot; stroke=&quot;#ff5d00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;339.84&quot; y2=&quot;597.66&quot; stroke=&quot;#00ffac&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;363.28&quot; y2=&quot;11.719&quot; stroke=&quot;#00ff3d&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;363.28&quot; y2=&quot;35.156&quot; stroke=&quot;#2dff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;363.28&quot; y2=&quot;58.594&quot; stroke=&quot;#00ff2f&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;363.28&quot; y2=&quot;82.031&quot; stroke=&quot;#00ff30&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;363.28&quot; y2=&quot;105.47&quot; stroke=&quot;#0fe&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;363.28&quot; y2=&quot;128.91&quot; stroke=&quot;#03ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;363.28&quot; y2=&quot;152.34&quot; stroke=&quot;#8f0&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;363.28&quot; y2=&quot;175.78&quot; stroke=&quot;#00ff47&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;363.28&quot; y2=&quot;199.22&quot; stroke=&quot;#00ff94&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;363.28&quot; y2=&quot;222.66&quot; stroke=&quot;#0f5&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;363.28&quot; y2=&quot;246.09&quot; stroke=&quot;#00ff8c&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;363.28&quot; y2=&quot;269.53&quot; stroke=&quot;#00ff3f&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;363.28&quot; y2=&quot;292.97&quot; stroke=&quot;#00ff6a&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;363.28&quot; y2=&quot;316.41&quot; stroke=&quot;#00ffeb&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;363.28&quot; y2=&quot;339.84&quot; stroke=&quot;#00ff20&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;363.28&quot; y2=&quot;363.28&quot; stroke=&quot;#00ffa8&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;363.28&quot; y2=&quot;386.72&quot; stroke=&quot;#00ff9b&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;363.28&quot; y2=&quot;410.16&quot; stroke=&quot;#00b3ff&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;363.28&quot; y2=&quot;433.59&quot; stroke=&quot;#00ff8d&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;363.28&quot; y2=&quot;457.03&quot; stroke=&quot;#00ff57&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;363.28&quot; y2=&quot;480.47&quot; stroke=&quot;#5bff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;363.28&quot; y2=&quot;503.91&quot; stroke=&quot;#00ff48&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;363.28&quot; y2=&quot;527.34&quot; stroke=&quot;#76ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;363.28&quot; y2=&quot;550.78&quot; stroke=&quot;#00ff26&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;363.28&quot; y2=&quot;574.22&quot; stroke=&quot;#0fe&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;363.28&quot; y2=&quot;597.66&quot; stroke=&quot;#00ffbc&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;386.72&quot; y2=&quot;11.719&quot; stroke=&quot;#0dff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;386.72&quot; y2=&quot;35.156&quot; stroke=&quot;#00ff45&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;386.72&quot; y2=&quot;58.594&quot; stroke=&quot;#00ff19&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;386.72&quot; y2=&quot;82.031&quot; stroke=&quot;#00ff19&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;386.72&quot; y2=&quot;105.47&quot; stroke=&quot;#00ff0b&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;386.72&quot; y2=&quot;128.91&quot; stroke=&quot;#00ff58&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;386.72&quot; y2=&quot;152.34&quot; stroke=&quot;#00ffef&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;386.72&quot; y2=&quot;175.78&quot; stroke=&quot;#00ff1e&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;386.72&quot; y2=&quot;199.22&quot; stroke=&quot;#00ff9e&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;386.72&quot; y2=&quot;222.66&quot; stroke=&quot;#00ff1b&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;386.72&quot; y2=&quot;246.09&quot; stroke=&quot;#84ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;386.72&quot; y2=&quot;269.53&quot; stroke=&quot;#00ff24&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;386.72&quot; y2=&quot;292.97&quot; stroke=&quot;#fffb00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;386.72&quot; y2=&quot;316.41&quot; stroke=&quot;#4bff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;386.72&quot; y2=&quot;339.84&quot; stroke=&quot;#00ff41&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;386.72&quot; y2=&quot;363.28&quot; stroke=&quot;#ff4900&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;386.72&quot; y2=&quot;386.72&quot; stroke=&quot;#7cff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;386.72&quot; y2=&quot;410.16&quot; stroke=&quot;#00ffbf&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;386.72&quot; y2=&quot;433.59&quot; stroke=&quot;#00ff0b&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;386.72&quot; y2=&quot;457.03&quot; stroke=&quot;#00ff9d&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;386.72&quot; y2=&quot;480.47&quot; stroke=&quot;#00ff67&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;386.72&quot; y2=&quot;503.91&quot; stroke=&quot;#00ff24&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;386.72&quot; y2=&quot;527.34&quot; stroke=&quot;#00ff63&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;386.72&quot; y2=&quot;550.78&quot; stroke=&quot;#00ff3f&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;386.72&quot; y2=&quot;574.22&quot; stroke=&quot;#ff5b00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;386.72&quot; y2=&quot;597.66&quot; stroke=&quot;#00ffa7&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;410.16&quot; y2=&quot;11.719&quot; stroke=&quot;#00ff31&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;410.16&quot; y2=&quot;35.156&quot; stroke=&quot;#00ff1e&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;410.16&quot; y2=&quot;58.594&quot; stroke=&quot;#00ff43&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;410.16&quot; y2=&quot;82.031&quot; stroke=&quot;#00ff3e&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;410.16&quot; y2=&quot;105.47&quot; stroke=&quot;#00ff0e&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;410.16&quot; y2=&quot;128.91&quot; stroke=&quot;#43ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;410.16&quot; y2=&quot;152.34&quot; stroke=&quot;#7f0&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;410.16&quot; y2=&quot;175.78&quot; stroke=&quot;#00ff27&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;410.16&quot; y2=&quot;199.22&quot; stroke=&quot;#00ffa1&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;410.16&quot; y2=&quot;222.66&quot; stroke=&quot;#00ff16&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;410.16&quot; y2=&quot;246.09&quot; stroke=&quot;#00ffa0&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;410.16&quot; y2=&quot;269.53&quot; stroke=&quot;#0f3&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;410.16&quot; y2=&quot;292.97&quot; stroke=&quot;#00ffc7&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;410.16&quot; y2=&quot;316.41&quot; stroke=&quot;#00feff&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;410.16&quot; y2=&quot;339.84&quot; stroke=&quot;#00ff16&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;410.16&quot; y2=&quot;363.28&quot; stroke=&quot;#0ff&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;410.16&quot; y2=&quot;386.72&quot; stroke=&quot;#00ff3b&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;410.16&quot; y2=&quot;410.16&quot; stroke=&quot;#00fff6&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;410.16&quot; y2=&quot;433.59&quot; stroke=&quot;#07f&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;410.16&quot; y2=&quot;457.03&quot; stroke=&quot;#00ff7b&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;410.16&quot; y2=&quot;480.47&quot; stroke=&quot;#b2ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;410.16&quot; y2=&quot;503.91&quot; stroke=&quot;#0f4&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;410.16&quot; y2=&quot;527.34&quot; stroke=&quot;#ff7800&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;410.16&quot; y2=&quot;550.78&quot; stroke=&quot;#00ff32&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;410.16&quot; y2=&quot;574.22&quot; stroke=&quot;#00ff49&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;410.16&quot; y2=&quot;597.66&quot; stroke=&quot;#00ff8c&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;433.59&quot; y2=&quot;11.719&quot; stroke=&quot;#00ff32&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;433.59&quot; y2=&quot;35.156&quot; stroke=&quot;#00ff47&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;433.59&quot; y2=&quot;58.594&quot; stroke=&quot;#00ff2e&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;433.59&quot; y2=&quot;82.031&quot; stroke=&quot;#00ff4a&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;433.59&quot; y2=&quot;105.47&quot; stroke=&quot;#fff100&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;433.59&quot; y2=&quot;128.91&quot; stroke=&quot;#0f4&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;433.59&quot; y2=&quot;152.34&quot; stroke=&quot;#b0ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;433.59&quot; y2=&quot;175.78&quot; stroke=&quot;#00ff4c&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;433.59&quot; y2=&quot;199.22&quot; stroke=&quot;#84ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;433.59&quot; y2=&quot;222.66&quot; stroke=&quot;#06ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;433.59&quot; y2=&quot;246.09&quot; stroke=&quot;#00ff96&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;433.59&quot; y2=&quot;269.53&quot; stroke=&quot;#00ff36&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;433.59&quot; y2=&quot;292.97&quot; stroke=&quot;#fff800&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;433.59&quot; y2=&quot;316.41&quot; stroke=&quot;#7aff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;433.59&quot; y2=&quot;339.84&quot; stroke=&quot;#00ff35&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;433.59&quot; y2=&quot;363.28&quot; stroke=&quot;#ff0&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;433.59&quot; y2=&quot;386.72&quot; stroke=&quot;#00ff9a&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;433.59&quot; y2=&quot;410.16&quot; stroke=&quot;#2bff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;433.59&quot; y2=&quot;433.59&quot; stroke=&quot;#00b9ff&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;433.59&quot; y2=&quot;457.03&quot; stroke=&quot;#00ffab&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;433.59&quot; y2=&quot;480.47&quot; stroke=&quot;#00ff7a&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;433.59&quot; y2=&quot;503.91&quot; stroke=&quot;#00ff3e&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;433.59&quot; y2=&quot;527.34&quot; stroke=&quot;#00ff2a&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;433.59&quot; y2=&quot;550.78&quot; stroke=&quot;#00ff2d&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;433.59&quot; y2=&quot;574.22&quot; stroke=&quot;#00ffb4&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;433.59&quot; y2=&quot;597.66&quot; stroke=&quot;#53ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;457.03&quot; y2=&quot;11.719&quot; stroke=&quot;#00ff3f&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;457.03&quot; y2=&quot;35.156&quot; stroke=&quot;#2eff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;457.03&quot; y2=&quot;58.594&quot; stroke=&quot;#00ff4b&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;457.03&quot; y2=&quot;82.031&quot; stroke=&quot;#00ff3a&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;457.03&quot; y2=&quot;105.47&quot; stroke=&quot;#00afff&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;457.03&quot; y2=&quot;128.91&quot; stroke=&quot;#00ff13&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;457.03&quot; y2=&quot;152.34&quot; stroke=&quot;#00ff49&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;457.03&quot; y2=&quot;175.78&quot; stroke=&quot;#00ff1c&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;457.03&quot; y2=&quot;199.22&quot; stroke=&quot;#ffd200&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;457.03&quot; y2=&quot;222.66&quot; stroke=&quot;#2aff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;457.03&quot; y2=&quot;246.09&quot; stroke=&quot;#ff9d00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;457.03&quot; y2=&quot;269.53&quot; stroke=&quot;#00ff49&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;457.03&quot; y2=&quot;292.97&quot; stroke=&quot;#00ff75&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;457.03&quot; y2=&quot;316.41&quot; stroke=&quot;#ffa600&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;457.03&quot; y2=&quot;339.84&quot; stroke=&quot;#00ff49&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;457.03&quot; y2=&quot;363.28&quot; stroke=&quot;#00ff36&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;457.03&quot; y2=&quot;386.72&quot; stroke=&quot;#00ffed&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;457.03&quot; y2=&quot;410.16&quot; stroke=&quot;#00d2ff&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;457.03&quot; y2=&quot;433.59&quot; stroke=&quot;#18ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;457.03&quot; y2=&quot;457.03&quot; stroke=&quot;#00ffab&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;457.03&quot; y2=&quot;480.47&quot; stroke=&quot;#3fff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;457.03&quot; y2=&quot;503.91&quot; stroke=&quot;#00ff21&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;457.03&quot; y2=&quot;527.34&quot; stroke=&quot;#00b8ff&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;457.03&quot; y2=&quot;550.78&quot; stroke=&quot;#01ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;457.03&quot; y2=&quot;574.22&quot; stroke=&quot;#00ffe2&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;457.03&quot; y2=&quot;597.66&quot; stroke=&quot;#c3ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;480.47&quot; y2=&quot;11.719&quot; stroke=&quot;#00ff4a&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;480.47&quot; y2=&quot;35.156&quot; stroke=&quot;#00ff3e&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;480.47&quot; y2=&quot;58.594&quot; stroke=&quot;#00ff27&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;480.47&quot; y2=&quot;82.031&quot; stroke=&quot;#00ff31&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;480.47&quot; y2=&quot;105.47&quot; stroke=&quot;#0f2&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;480.47&quot; y2=&quot;128.91&quot; stroke=&quot;#00ff5c&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;480.47&quot; y2=&quot;152.34&quot; stroke=&quot;#00ff71&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;480.47&quot; y2=&quot;175.78&quot; stroke=&quot;#00ff62&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;480.47&quot; y2=&quot;199.22&quot; stroke=&quot;#00ff58&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;480.47&quot; y2=&quot;222.66&quot; stroke=&quot;#00ff6c&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;480.47&quot; y2=&quot;246.09&quot; stroke=&quot;#00e5ff&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;480.47&quot; y2=&quot;269.53&quot; stroke=&quot;#00ff3f&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;480.47&quot; y2=&quot;292.97&quot; stroke=&quot;#ebff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;480.47&quot; y2=&quot;316.41&quot; stroke=&quot;#00a8ff&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;480.47&quot; y2=&quot;339.84&quot; stroke=&quot;#00ff2d&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;480.47&quot; y2=&quot;363.28&quot; stroke=&quot;#00ff5a&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;480.47&quot; y2=&quot;386.72&quot; stroke=&quot;#0fd&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;480.47&quot; y2=&quot;410.16&quot; stroke=&quot;#ffa600&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;480.47&quot; y2=&quot;433.59&quot; stroke=&quot;#95ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;480.47&quot; y2=&quot;457.03&quot; stroke=&quot;#00ff8c&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;480.47&quot; y2=&quot;480.47&quot; stroke=&quot;#00ff68&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;480.47&quot; y2=&quot;503.91&quot; stroke=&quot;#00ff2f&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;480.47&quot; y2=&quot;527.34&quot; stroke=&quot;#5f0&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;480.47&quot; y2=&quot;550.78&quot; stroke=&quot;#00ff3e&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;480.47&quot; y2=&quot;574.22&quot; stroke=&quot;#8cff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;480.47&quot; y2=&quot;597.66&quot; stroke=&quot;#00ff80&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;503.91&quot; y2=&quot;11.719&quot; stroke=&quot;#00ff1f&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;503.91&quot; y2=&quot;35.156&quot; stroke=&quot;#00ff4d&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;503.91&quot; y2=&quot;58.594&quot; stroke=&quot;#00ff23&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;503.91&quot; y2=&quot;82.031&quot; stroke=&quot;#00ff4e&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;503.91&quot; y2=&quot;105.47&quot; stroke=&quot;#d9ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;503.91&quot; y2=&quot;128.91&quot; stroke=&quot;#01ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;503.91&quot; y2=&quot;152.34&quot; stroke=&quot;#00ffbd&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;503.91&quot; y2=&quot;175.78&quot; stroke=&quot;#20ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;503.91&quot; y2=&quot;199.22&quot; stroke=&quot;#ffcf00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;503.91&quot; y2=&quot;222.66&quot; stroke=&quot;#00ff29&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;503.91&quot; y2=&quot;246.09&quot; stroke=&quot;#00ff21&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;503.91&quot; y2=&quot;269.53&quot; stroke=&quot;#00ff20&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;503.91&quot; y2=&quot;292.97&quot; stroke=&quot;#009dff&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;503.91&quot; y2=&quot;316.41&quot; stroke=&quot;#00ff94&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;503.91&quot; y2=&quot;339.84&quot; stroke=&quot;#00ff29&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;503.91&quot; y2=&quot;363.28&quot; stroke=&quot;#ffbd00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;503.91&quot; y2=&quot;386.72&quot; stroke=&quot;#00ecff&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;503.91&quot; y2=&quot;410.16&quot; stroke=&quot;#ffdf00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;503.91&quot; y2=&quot;433.59&quot; stroke=&quot;#ffa500&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;503.91&quot; y2=&quot;457.03&quot; stroke=&quot;#00ff97&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;503.91&quot; y2=&quot;480.47&quot; stroke=&quot;#59ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;503.91&quot; y2=&quot;503.91&quot; stroke=&quot;#00ff10&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;503.91&quot; y2=&quot;527.34&quot; stroke=&quot;#00ff48&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;503.91&quot; y2=&quot;550.78&quot; stroke=&quot;#00ff15&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;503.91&quot; y2=&quot;574.22&quot; stroke=&quot;#05f&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;503.91&quot; y2=&quot;597.66&quot; stroke=&quot;#00ff8d&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;527.34&quot; y2=&quot;11.719&quot; stroke=&quot;#00ff10&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;527.34&quot; y2=&quot;35.156&quot; stroke=&quot;#00ff43&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;527.34&quot; y2=&quot;58.594&quot; stroke=&quot;#3bff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;527.34&quot; y2=&quot;82.031&quot; stroke=&quot;#00ff29&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;527.34&quot; y2=&quot;105.47&quot; stroke=&quot;#00d4ff&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;527.34&quot; y2=&quot;128.91&quot; stroke=&quot;#25ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;527.34&quot; y2=&quot;152.34&quot; stroke=&quot;#ffe600&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;527.34&quot; y2=&quot;175.78&quot; stroke=&quot;#00ff3d&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;527.34&quot; y2=&quot;199.22&quot; stroke=&quot;#00ff93&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;527.34&quot; y2=&quot;222.66&quot; stroke=&quot;#00ff01&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;527.34&quot; y2=&quot;246.09&quot; stroke=&quot;#ffae00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;527.34&quot; y2=&quot;269.53&quot; stroke=&quot;#00ff28&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;527.34&quot; y2=&quot;292.97&quot; stroke=&quot;#fff000&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;527.34&quot; y2=&quot;316.41&quot; stroke=&quot;#9eff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;527.34&quot; y2=&quot;339.84&quot; stroke=&quot;#00ff2b&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;527.34&quot; y2=&quot;363.28&quot; stroke=&quot;#ff9f00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;527.34&quot; y2=&quot;386.72&quot; stroke=&quot;#e9ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;527.34&quot; y2=&quot;410.16&quot; stroke=&quot;#ff9200&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;527.34&quot; y2=&quot;433.59&quot; stroke=&quot;#ff7300&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;527.34&quot; y2=&quot;457.03&quot; stroke=&quot;#f00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;527.34&quot; y2=&quot;480.47&quot; stroke=&quot;#00ff67&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;527.34&quot; y2=&quot;503.91&quot; stroke=&quot;#0dff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;527.34&quot; y2=&quot;527.34&quot; stroke=&quot;#ff6b00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;527.34&quot; y2=&quot;550.78&quot; stroke=&quot;#00ff10&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;527.34&quot; y2=&quot;574.22&quot; stroke=&quot;#00b3ff&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;527.34&quot; y2=&quot;597.66&quot; stroke=&quot;#00ff80&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;550.78&quot; y2=&quot;11.719&quot; stroke=&quot;#00ff30&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;550.78&quot; y2=&quot;35.156&quot; stroke=&quot;#00ff86&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;550.78&quot; y2=&quot;58.594&quot; stroke=&quot;#00ff45&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;550.78&quot; y2=&quot;82.031&quot; stroke=&quot;#00ff26&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;550.78&quot; y2=&quot;105.47&quot; stroke=&quot;#93ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;550.78&quot; y2=&quot;128.91&quot; stroke=&quot;#13ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;550.78&quot; y2=&quot;152.34&quot; stroke=&quot;#00fbff&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;550.78&quot; y2=&quot;175.78&quot; stroke=&quot;#0aff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;550.78&quot; y2=&quot;199.22&quot; stroke=&quot;#00ff73&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;550.78&quot; y2=&quot;222.66&quot; stroke=&quot;#bdff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;550.78&quot; y2=&quot;246.09&quot; stroke=&quot;#ffd800&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;550.78&quot; y2=&quot;269.53&quot; stroke=&quot;#00ff41&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;550.78&quot; y2=&quot;292.97&quot; stroke=&quot;#00cbff&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;550.78&quot; y2=&quot;316.41&quot; stroke=&quot;#f5ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;550.78&quot; y2=&quot;339.84&quot; stroke=&quot;#00ff14&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;550.78&quot; y2=&quot;363.28&quot; stroke=&quot;#00ff64&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;550.78&quot; y2=&quot;386.72&quot; stroke=&quot;#ffd600&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;550.78&quot; y2=&quot;410.16&quot; stroke=&quot;#ffc800&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;550.78&quot; y2=&quot;433.59&quot; stroke=&quot;#00afff&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;550.78&quot; y2=&quot;457.03&quot; stroke=&quot;#00ffaf&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;550.78&quot; y2=&quot;480.47&quot; stroke=&quot;#00ff9c&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;550.78&quot; y2=&quot;503.91&quot; stroke=&quot;#00ff43&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;550.78&quot; y2=&quot;527.34&quot; stroke=&quot;#00ff93&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;550.78&quot; y2=&quot;550.78&quot; stroke=&quot;#00ff4f&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;550.78&quot; y2=&quot;574.22&quot; stroke=&quot;#00ff58&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;550.78&quot; y2=&quot;597.66&quot; stroke=&quot;#a2ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;574.22&quot; y2=&quot;11.719&quot; stroke=&quot;#00ff52&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;574.22&quot; y2=&quot;35.156&quot; stroke=&quot;#00ff61&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;574.22&quot; y2=&quot;58.594&quot; stroke=&quot;#00ff49&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;574.22&quot; y2=&quot;82.031&quot; stroke=&quot;#00ff58&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;574.22&quot; y2=&quot;105.47&quot; stroke=&quot;#80ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;574.22&quot; y2=&quot;128.91&quot; stroke=&quot;#00ff3a&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;574.22&quot; y2=&quot;152.34&quot; stroke=&quot;#5eff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;574.22&quot; y2=&quot;175.78&quot; stroke=&quot;#00ff53&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;574.22&quot; y2=&quot;199.22&quot; stroke=&quot;#00ffa7&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;574.22&quot; y2=&quot;222.66&quot; stroke=&quot;#00ff03&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;574.22&quot; y2=&quot;246.09&quot; stroke=&quot;#ff8000&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;574.22&quot; y2=&quot;269.53&quot; stroke=&quot;#00ff46&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;574.22&quot; y2=&quot;292.97&quot; stroke=&quot;#00deff&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;574.22&quot; y2=&quot;316.41&quot; stroke=&quot;#e7ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;574.22&quot; y2=&quot;339.84&quot; stroke=&quot;#00ff37&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;574.22&quot; y2=&quot;363.28&quot; stroke=&quot;#00ff5c&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;574.22&quot; y2=&quot;386.72&quot; stroke=&quot;#0fd&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;574.22&quot; y2=&quot;410.16&quot; stroke=&quot;#e9ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;574.22&quot; y2=&quot;433.59&quot; stroke=&quot;#92ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;574.22&quot; y2=&quot;457.03&quot; stroke=&quot;#00ffe6&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;574.22&quot; y2=&quot;480.47&quot; stroke=&quot;#00ff61&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;574.22&quot; y2=&quot;503.91&quot; stroke=&quot;#00ff32&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;574.22&quot; y2=&quot;527.34&quot; stroke=&quot;#00b7ff&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;574.22&quot; y2=&quot;550.78&quot; stroke=&quot;#00ff4d&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;574.22&quot; y2=&quot;574.22&quot; stroke=&quot;#00b8ff&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;574.22&quot; y2=&quot;597.66&quot; stroke=&quot;#00ff8c&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;597.66&quot; y2=&quot;11.719&quot; stroke=&quot;#00ff1a&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;597.66&quot; y2=&quot;35.156&quot; stroke=&quot;#00ff56&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;597.66&quot; y2=&quot;58.594&quot; stroke=&quot;#00ff47&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;597.66&quot; y2=&quot;82.031&quot; stroke=&quot;#00ff09&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;597.66&quot; y2=&quot;105.47&quot; stroke=&quot;#00ffbf&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;597.66&quot; y2=&quot;128.91&quot; stroke=&quot;#00ff3e&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;597.66&quot; y2=&quot;152.34&quot; stroke=&quot;#00fdff&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;597.66&quot; y2=&quot;175.78&quot; stroke=&quot;#bdff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;597.66&quot; y2=&quot;199.22&quot; stroke=&quot;#6cff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;597.66&quot; y2=&quot;222.66&quot; stroke=&quot;#00ff12&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;597.66&quot; y2=&quot;246.09&quot; stroke=&quot;#00ff69&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;597.66&quot; y2=&quot;269.53&quot; stroke=&quot;#00ff41&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;597.66&quot; y2=&quot;292.97&quot; stroke=&quot;#dbff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;597.66&quot; y2=&quot;316.41&quot; stroke=&quot;#ff5800&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;597.66&quot; y2=&quot;339.84&quot; stroke=&quot;#00ff21&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;597.66&quot; y2=&quot;363.28&quot; stroke=&quot;#0ef&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;597.66&quot; y2=&quot;386.72&quot; stroke=&quot;#ffb800&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;597.66&quot; y2=&quot;410.16&quot; stroke=&quot;#00ffa3&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;597.66&quot; y2=&quot;433.59&quot; stroke=&quot;#00ff43&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;597.66&quot; y2=&quot;457.03&quot; stroke=&quot;#00ff78&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;597.66&quot; y2=&quot;480.47&quot; stroke=&quot;#0f4&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;597.66&quot; y2=&quot;503.91&quot; stroke=&quot;#00ff13&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;597.66&quot; y2=&quot;527.34&quot; stroke=&quot;#00d7ff&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;597.66&quot; y2=&quot;550.78&quot; stroke=&quot;#00ff0c&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;597.66&quot; y2=&quot;574.22&quot; stroke=&quot;#00a8ff&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;143.33&quot; x2=&quot;390&quot; y1=&quot;597.66&quot; y2=&quot;597.66&quot; stroke=&quot;#fff100&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;11.719&quot; y2=&quot;11.719&quot; stroke=&quot;#2bff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;11.719&quot; y2=&quot;35.156&quot; stroke=&quot;#27ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;11.719&quot; y2=&quot;58.594&quot; stroke=&quot;#2dff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;11.719&quot; y2=&quot;82.031&quot; stroke=&quot;#29ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;11.719&quot; y2=&quot;105.47&quot; stroke=&quot;#2cff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;11.719&quot; y2=&quot;128.91&quot; stroke=&quot;#24ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;11.719&quot; y2=&quot;152.34&quot; stroke=&quot;#2cff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;11.719&quot; y2=&quot;175.78&quot; stroke=&quot;#27ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;11.719&quot; y2=&quot;199.22&quot; stroke=&quot;#29ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;11.719&quot; y2=&quot;222.66&quot; stroke=&quot;#32ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;11.719&quot; y2=&quot;246.09&quot; stroke=&quot;#31ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;11.719&quot; y2=&quot;269.53&quot; stroke=&quot;#2bff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;11.719&quot; y2=&quot;292.97&quot; stroke=&quot;#29ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;11.719&quot; y2=&quot;316.41&quot; stroke=&quot;#30ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;11.719&quot; y2=&quot;339.84&quot; stroke=&quot;#30ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;11.719&quot; y2=&quot;363.28&quot; stroke=&quot;#28ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;11.719&quot; y2=&quot;386.72&quot; stroke=&quot;#28ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;11.719&quot; y2=&quot;410.16&quot; stroke=&quot;#26ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;11.719&quot; y2=&quot;433.59&quot; stroke=&quot;#2bff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;11.719&quot; y2=&quot;457.03&quot; stroke=&quot;#31ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;11.719&quot; y2=&quot;480.47&quot; stroke=&quot;#2cff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;11.719&quot; y2=&quot;503.91&quot; stroke=&quot;#2aff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;11.719&quot; y2=&quot;527.34&quot; stroke=&quot;#27ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;11.719&quot; y2=&quot;550.78&quot; stroke=&quot;#32ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;11.719&quot; y2=&quot;574.22&quot; stroke=&quot;#30ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;11.719&quot; y2=&quot;597.66&quot; stroke=&quot;#30ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;35.156&quot; y2=&quot;11.719&quot; stroke=&quot;#2bff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;35.156&quot; y2=&quot;35.156&quot; stroke=&quot;#27ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;35.156&quot; y2=&quot;58.594&quot; stroke=&quot;#3f0&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;35.156&quot; y2=&quot;82.031&quot; stroke=&quot;#2fff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;35.156&quot; y2=&quot;105.47&quot; stroke=&quot;#28ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;35.156&quot; y2=&quot;128.91&quot; stroke=&quot;#29ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;35.156&quot; y2=&quot;152.34&quot; stroke=&quot;#24ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;35.156&quot; y2=&quot;175.78&quot; stroke=&quot;#31ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;35.156&quot; y2=&quot;199.22&quot; stroke=&quot;#28ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;35.156&quot; y2=&quot;222.66&quot; stroke=&quot;#25ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;35.156&quot; y2=&quot;246.09&quot; stroke=&quot;#2fff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;35.156&quot; y2=&quot;269.53&quot; stroke=&quot;#27ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;35.156&quot; y2=&quot;292.97&quot; stroke=&quot;#23ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;35.156&quot; y2=&quot;316.41&quot; stroke=&quot;#27ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;35.156&quot; y2=&quot;339.84&quot; stroke=&quot;#23ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;35.156&quot; y2=&quot;363.28&quot; stroke=&quot;#2bff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;35.156&quot; y2=&quot;386.72&quot; stroke=&quot;#3f0&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;35.156&quot; y2=&quot;410.16&quot; stroke=&quot;#2eff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;35.156&quot; y2=&quot;433.59&quot; stroke=&quot;#3f0&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;35.156&quot; y2=&quot;457.03&quot; stroke=&quot;#2eff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;35.156&quot; y2=&quot;480.47&quot; stroke=&quot;#2fff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;35.156&quot; y2=&quot;503.91&quot; stroke=&quot;#28ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;35.156&quot; y2=&quot;527.34&quot; stroke=&quot;#2dff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;35.156&quot; y2=&quot;550.78&quot; stroke=&quot;#2aff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;35.156&quot; y2=&quot;574.22&quot; stroke=&quot;#23ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;35.156&quot; y2=&quot;597.66&quot; stroke=&quot;#30ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;58.594&quot; y2=&quot;11.719&quot; stroke=&quot;#2eff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;58.594&quot; y2=&quot;35.156&quot; stroke=&quot;#28ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;58.594&quot; y2=&quot;58.594&quot; stroke=&quot;#2dff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;58.594&quot; y2=&quot;82.031&quot; stroke=&quot;#2dff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;58.594&quot; y2=&quot;105.47&quot; stroke=&quot;#2eff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;58.594&quot; y2=&quot;128.91&quot; stroke=&quot;#2eff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;58.594&quot; y2=&quot;152.34&quot; stroke=&quot;#26ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;58.594&quot; y2=&quot;175.78&quot; stroke=&quot;#2dff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;58.594&quot; y2=&quot;199.22&quot; stroke=&quot;#2fff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;58.594&quot; y2=&quot;222.66&quot; stroke=&quot;#24ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;58.594&quot; y2=&quot;246.09&quot; stroke=&quot;#23ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;58.594&quot; y2=&quot;269.53&quot; stroke=&quot;#26ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;58.594&quot; y2=&quot;292.97&quot; stroke=&quot;#2fff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;58.594&quot; y2=&quot;316.41&quot; stroke=&quot;#26ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;58.594&quot; y2=&quot;339.84&quot; stroke=&quot;#25ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;58.594&quot; y2=&quot;363.28&quot; stroke=&quot;#28ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;58.594&quot; y2=&quot;386.72&quot; stroke=&quot;#24ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;58.594&quot; y2=&quot;410.16&quot; stroke=&quot;#2dff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;58.594&quot; y2=&quot;433.59&quot; stroke=&quot;#30ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;58.594&quot; y2=&quot;457.03&quot; stroke=&quot;#30ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;58.594&quot; y2=&quot;480.47&quot; stroke=&quot;#2aff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;58.594&quot; y2=&quot;503.91&quot; stroke=&quot;#2bff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;58.594&quot; y2=&quot;527.34&quot; stroke=&quot;#2bff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;58.594&quot; y2=&quot;550.78&quot; stroke=&quot;#25ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;58.594&quot; y2=&quot;574.22&quot; stroke=&quot;#2fff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;58.594&quot; y2=&quot;597.66&quot; stroke=&quot;#2dff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;82.031&quot; y2=&quot;11.719&quot; stroke=&quot;#21ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;82.031&quot; y2=&quot;35.156&quot; stroke=&quot;#2bff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;82.031&quot; y2=&quot;58.594&quot; stroke=&quot;#2aff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;82.031&quot; y2=&quot;82.031&quot; stroke=&quot;#27ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;82.031&quot; y2=&quot;105.47&quot; stroke=&quot;#26ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;82.031&quot; y2=&quot;128.91&quot; stroke=&quot;#2fff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;82.031&quot; y2=&quot;152.34&quot; stroke=&quot;#25ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;82.031&quot; y2=&quot;175.78&quot; stroke=&quot;#2eff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;82.031&quot; y2=&quot;199.22&quot; stroke=&quot;#2fff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;82.031&quot; y2=&quot;222.66&quot; stroke=&quot;#2fff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;82.031&quot; y2=&quot;246.09&quot; stroke=&quot;#2aff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;82.031&quot; y2=&quot;269.53&quot; stroke=&quot;#2fff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;82.031&quot; y2=&quot;292.97&quot; stroke=&quot;#29ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;82.031&quot; y2=&quot;316.41&quot; stroke=&quot;#2cff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;82.031&quot; y2=&quot;339.84&quot; stroke=&quot;#25ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;82.031&quot; y2=&quot;363.28&quot; stroke=&quot;#24ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;82.031&quot; y2=&quot;386.72&quot; stroke=&quot;#2dff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;82.031&quot; y2=&quot;410.16&quot; stroke=&quot;#24ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;82.031&quot; y2=&quot;433.59&quot; stroke=&quot;#25ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;82.031&quot; y2=&quot;457.03&quot; stroke=&quot;#25ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;82.031&quot; y2=&quot;480.47&quot; stroke=&quot;#2bff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;82.031&quot; y2=&quot;503.91&quot; stroke=&quot;#2cff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;82.031&quot; y2=&quot;527.34&quot; stroke=&quot;#2bff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;82.031&quot; y2=&quot;550.78&quot; stroke=&quot;#30ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;82.031&quot; y2=&quot;574.22&quot; stroke=&quot;#2f0&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;82.031&quot; y2=&quot;597.66&quot; stroke=&quot;#25ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;105.47&quot; y2=&quot;11.719&quot; stroke=&quot;#2dff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;105.47&quot; y2=&quot;35.156&quot; stroke=&quot;#2bff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;105.47&quot; y2=&quot;58.594&quot; stroke=&quot;#28ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;105.47&quot; y2=&quot;82.031&quot; stroke=&quot;#29ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;105.47&quot; y2=&quot;105.47&quot; stroke=&quot;#25ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;105.47&quot; y2=&quot;128.91&quot; stroke=&quot;#30ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;105.47&quot; y2=&quot;152.34&quot; stroke=&quot;#3f0&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;105.47&quot; y2=&quot;175.78&quot; stroke=&quot;#32ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;105.47&quot; y2=&quot;199.22&quot; stroke=&quot;#30ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;105.47&quot; y2=&quot;222.66&quot; stroke=&quot;#27ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;105.47&quot; y2=&quot;246.09&quot; stroke=&quot;#2dff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;105.47&quot; y2=&quot;269.53&quot; stroke=&quot;#3f0&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;105.47&quot; y2=&quot;292.97&quot; stroke=&quot;#2dff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;105.47&quot; y2=&quot;316.41&quot; stroke=&quot;#25ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;105.47&quot; y2=&quot;339.84&quot; stroke=&quot;#28ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;105.47&quot; y2=&quot;363.28&quot; stroke=&quot;#2dff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;105.47&quot; y2=&quot;386.72&quot; stroke=&quot;#2aff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;105.47&quot; y2=&quot;410.16&quot; stroke=&quot;#26ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;105.47&quot; y2=&quot;433.59&quot; stroke=&quot;#25ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;105.47&quot; y2=&quot;457.03&quot; stroke=&quot;#2bff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;105.47&quot; y2=&quot;480.47&quot; stroke=&quot;#27ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;105.47&quot; y2=&quot;503.91&quot; stroke=&quot;#28ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;105.47&quot; y2=&quot;527.34&quot; stroke=&quot;#2dff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;105.47&quot; y2=&quot;550.78&quot; stroke=&quot;#26ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;105.47&quot; y2=&quot;574.22&quot; stroke=&quot;#30ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;105.47&quot; y2=&quot;597.66&quot; stroke=&quot;#2bff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;128.91&quot; y2=&quot;11.719&quot; stroke=&quot;#28ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;128.91&quot; y2=&quot;35.156&quot; stroke=&quot;#30ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;128.91&quot; y2=&quot;58.594&quot; stroke=&quot;#31ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;128.91&quot; y2=&quot;82.031&quot; stroke=&quot;#23ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;128.91&quot; y2=&quot;105.47&quot; stroke=&quot;#28ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;128.91&quot; y2=&quot;128.91&quot; stroke=&quot;#2dff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;128.91&quot; y2=&quot;152.34&quot; stroke=&quot;#26ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;128.91&quot; y2=&quot;175.78&quot; stroke=&quot;#2fff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;128.91&quot; y2=&quot;199.22&quot; stroke=&quot;#2eff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;128.91&quot; y2=&quot;222.66&quot; stroke=&quot;#2dff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;128.91&quot; y2=&quot;246.09&quot; stroke=&quot;#2cff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;128.91&quot; y2=&quot;269.53&quot; stroke=&quot;#2fff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;128.91&quot; y2=&quot;292.97&quot; stroke=&quot;#2fff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;128.91&quot; y2=&quot;316.41&quot; stroke=&quot;#2cff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;128.91&quot; y2=&quot;339.84&quot; stroke=&quot;#2dff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;128.91&quot; y2=&quot;363.28&quot; stroke=&quot;#27ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;128.91&quot; y2=&quot;386.72&quot; stroke=&quot;#2aff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;128.91&quot; y2=&quot;410.16&quot; stroke=&quot;#31ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;128.91&quot; y2=&quot;433.59&quot; stroke=&quot;#2dff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;128.91&quot; y2=&quot;457.03&quot; stroke=&quot;#28ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;128.91&quot; y2=&quot;480.47&quot; stroke=&quot;#2cff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;128.91&quot; y2=&quot;503.91&quot; stroke=&quot;#28ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;128.91&quot; y2=&quot;527.34&quot; stroke=&quot;#2bff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;128.91&quot; y2=&quot;550.78&quot; stroke=&quot;#30ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;128.91&quot; y2=&quot;574.22&quot; stroke=&quot;#29ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;128.91&quot; y2=&quot;597.66&quot; stroke=&quot;#30ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;152.34&quot; y2=&quot;11.719&quot; stroke=&quot;#2dff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;152.34&quot; y2=&quot;35.156&quot; stroke=&quot;#31ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;152.34&quot; y2=&quot;58.594&quot; stroke=&quot;#2aff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;152.34&quot; y2=&quot;82.031&quot; stroke=&quot;#2fff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;152.34&quot; y2=&quot;105.47&quot; stroke=&quot;#35ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;152.34&quot; y2=&quot;128.91&quot; stroke=&quot;#2eff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;152.34&quot; y2=&quot;152.34&quot; stroke=&quot;#2aff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;152.34&quot; y2=&quot;175.78&quot; stroke=&quot;#25ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;152.34&quot; y2=&quot;199.22&quot; stroke=&quot;#27ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;152.34&quot; y2=&quot;222.66&quot; stroke=&quot;#27ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;152.34&quot; y2=&quot;246.09&quot; stroke=&quot;#27ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;152.34&quot; y2=&quot;269.53&quot; stroke=&quot;#2dff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;152.34&quot; y2=&quot;292.97&quot; stroke=&quot;#2cff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;152.34&quot; y2=&quot;316.41&quot; stroke=&quot;#2dff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;152.34&quot; y2=&quot;339.84&quot; stroke=&quot;#2aff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;152.34&quot; y2=&quot;363.28&quot; stroke=&quot;#2bff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;152.34&quot; y2=&quot;386.72&quot; stroke=&quot;#30ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;152.34&quot; y2=&quot;410.16&quot; stroke=&quot;#2fff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;152.34&quot; y2=&quot;433.59&quot; stroke=&quot;#27ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;152.34&quot; y2=&quot;457.03&quot; stroke=&quot;#26ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;152.34&quot; y2=&quot;480.47&quot; stroke=&quot;#28ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;152.34&quot; y2=&quot;503.91&quot; stroke=&quot;#2eff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;152.34&quot; y2=&quot;527.34&quot; stroke=&quot;#2cff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;152.34&quot; y2=&quot;550.78&quot; stroke=&quot;#2fff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;152.34&quot; y2=&quot;574.22&quot; stroke=&quot;#28ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;152.34&quot; y2=&quot;597.66&quot; stroke=&quot;#3f0&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;175.78&quot; y2=&quot;11.719&quot; stroke=&quot;#32ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;175.78&quot; y2=&quot;35.156&quot; stroke=&quot;#28ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;175.78&quot; y2=&quot;58.594&quot; stroke=&quot;#24ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;175.78&quot; y2=&quot;82.031&quot; stroke=&quot;#2cff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;175.78&quot; y2=&quot;105.47&quot; stroke=&quot;#2cff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;175.78&quot; y2=&quot;128.91&quot; stroke=&quot;#24ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;175.78&quot; y2=&quot;152.34&quot; stroke=&quot;#30ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;175.78&quot; y2=&quot;175.78&quot; stroke=&quot;#2eff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;175.78&quot; y2=&quot;199.22&quot; stroke=&quot;#23ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;175.78&quot; y2=&quot;222.66&quot; stroke=&quot;#23ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;175.78&quot; y2=&quot;246.09&quot; stroke=&quot;#2aff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;175.78&quot; y2=&quot;269.53&quot; stroke=&quot;#28ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;175.78&quot; y2=&quot;292.97&quot; stroke=&quot;#24ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;175.78&quot; y2=&quot;316.41&quot; stroke=&quot;#23ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;175.78&quot; y2=&quot;339.84&quot; stroke=&quot;#26ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;175.78&quot; y2=&quot;363.28&quot; stroke=&quot;#24ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;175.78&quot; y2=&quot;386.72&quot; stroke=&quot;#2dff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;175.78&quot; y2=&quot;410.16&quot; stroke=&quot;#25ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;175.78&quot; y2=&quot;433.59&quot; stroke=&quot;#27ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;175.78&quot; y2=&quot;457.03&quot; stroke=&quot;#29ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;175.78&quot; y2=&quot;480.47&quot; stroke=&quot;#29ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;175.78&quot; y2=&quot;503.91&quot; stroke=&quot;#31ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;175.78&quot; y2=&quot;527.34&quot; stroke=&quot;#25ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;175.78&quot; y2=&quot;550.78&quot; stroke=&quot;#26ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;175.78&quot; y2=&quot;574.22&quot; stroke=&quot;#2eff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;175.78&quot; y2=&quot;597.66&quot; stroke=&quot;#29ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;199.22&quot; y2=&quot;11.719&quot; stroke=&quot;#2bff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;199.22&quot; y2=&quot;35.156&quot; stroke=&quot;#25ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;199.22&quot; y2=&quot;58.594&quot; stroke=&quot;#24ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;199.22&quot; y2=&quot;82.031&quot; stroke=&quot;#2eff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;199.22&quot; y2=&quot;105.47&quot; stroke=&quot;#31ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;199.22&quot; y2=&quot;128.91&quot; stroke=&quot;#2aff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;199.22&quot; y2=&quot;152.34&quot; stroke=&quot;#2aff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;199.22&quot; y2=&quot;175.78&quot; stroke=&quot;#2fff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;199.22&quot; y2=&quot;199.22&quot; stroke=&quot;#2bff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;199.22&quot; y2=&quot;222.66&quot; stroke=&quot;#27ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;199.22&quot; y2=&quot;246.09&quot; stroke=&quot;#28ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;199.22&quot; y2=&quot;269.53&quot; stroke=&quot;#3f0&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;199.22&quot; y2=&quot;292.97&quot; stroke=&quot;#2dff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;199.22&quot; y2=&quot;316.41&quot; stroke=&quot;#29ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;199.22&quot; y2=&quot;339.84&quot; stroke=&quot;#2bff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;199.22&quot; y2=&quot;363.28&quot; stroke=&quot;#26ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;199.22&quot; y2=&quot;386.72&quot; stroke=&quot;#24ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;199.22&quot; y2=&quot;410.16&quot; stroke=&quot;#34ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;199.22&quot; y2=&quot;433.59&quot; stroke=&quot;#2eff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;199.22&quot; y2=&quot;457.03&quot; stroke=&quot;#27ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;199.22&quot; y2=&quot;480.47&quot; stroke=&quot;#29ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;199.22&quot; y2=&quot;503.91&quot; stroke=&quot;#2aff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;199.22&quot; y2=&quot;527.34&quot; stroke=&quot;#26ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;199.22&quot; y2=&quot;550.78&quot; stroke=&quot;#31ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;199.22&quot; y2=&quot;574.22&quot; stroke=&quot;#2aff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;199.22&quot; y2=&quot;597.66&quot; stroke=&quot;#2eff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;222.66&quot; y2=&quot;11.719&quot; stroke=&quot;#26ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;222.66&quot; y2=&quot;35.156&quot; stroke=&quot;#30ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;222.66&quot; y2=&quot;58.594&quot; stroke=&quot;#25ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;222.66&quot; y2=&quot;82.031&quot; stroke=&quot;#29ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;222.66&quot; y2=&quot;105.47&quot; stroke=&quot;#26ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;222.66&quot; y2=&quot;128.91&quot; stroke=&quot;#28ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;222.66&quot; y2=&quot;152.34&quot; stroke=&quot;#26ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;222.66&quot; y2=&quot;175.78&quot; stroke=&quot;#2f0&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;222.66&quot; y2=&quot;199.22&quot; stroke=&quot;#28ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;222.66&quot; y2=&quot;222.66&quot; stroke=&quot;#2bff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;222.66&quot; y2=&quot;246.09&quot; stroke=&quot;#26ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;222.66&quot; y2=&quot;269.53&quot; stroke=&quot;#2fff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;222.66&quot; y2=&quot;292.97&quot; stroke=&quot;#2cff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;222.66&quot; y2=&quot;316.41&quot; stroke=&quot;#2cff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;222.66&quot; y2=&quot;339.84&quot; stroke=&quot;#2fff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;222.66&quot; y2=&quot;363.28&quot; stroke=&quot;#2fff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;222.66&quot; y2=&quot;386.72&quot; stroke=&quot;#29ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;222.66&quot; y2=&quot;410.16&quot; stroke=&quot;#28ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;222.66&quot; y2=&quot;433.59&quot; stroke=&quot;#25ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;222.66&quot; y2=&quot;457.03&quot; stroke=&quot;#2aff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;222.66&quot; y2=&quot;480.47&quot; stroke=&quot;#30ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;222.66&quot; y2=&quot;503.91&quot; stroke=&quot;#2dff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;222.66&quot; y2=&quot;527.34&quot; stroke=&quot;#2aff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;222.66&quot; y2=&quot;550.78&quot; stroke=&quot;#24ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;222.66&quot; y2=&quot;574.22&quot; stroke=&quot;#24ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;222.66&quot; y2=&quot;597.66&quot; stroke=&quot;#29ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;246.09&quot; y2=&quot;11.719&quot; stroke=&quot;#28ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;246.09&quot; y2=&quot;35.156&quot; stroke=&quot;#2dff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;246.09&quot; y2=&quot;58.594&quot; stroke=&quot;#36ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;246.09&quot; y2=&quot;82.031&quot; stroke=&quot;#2dff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;246.09&quot; y2=&quot;105.47&quot; stroke=&quot;#2eff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;246.09&quot; y2=&quot;128.91&quot; stroke=&quot;#2cff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;246.09&quot; y2=&quot;152.34&quot; stroke=&quot;#36ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;246.09&quot; y2=&quot;175.78&quot; stroke=&quot;#2cff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;246.09&quot; y2=&quot;199.22&quot; stroke=&quot;#29ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;246.09&quot; y2=&quot;222.66&quot; stroke=&quot;#2dff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;246.09&quot; y2=&quot;246.09&quot; stroke=&quot;#29ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;246.09&quot; y2=&quot;269.53&quot; stroke=&quot;#2cff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;246.09&quot; y2=&quot;292.97&quot; stroke=&quot;#35ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;246.09&quot; y2=&quot;316.41&quot; stroke=&quot;#32ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;246.09&quot; y2=&quot;339.84&quot; stroke=&quot;#35ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;246.09&quot; y2=&quot;363.28&quot; stroke=&quot;#2cff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;246.09&quot; y2=&quot;386.72&quot; stroke=&quot;#2cff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;246.09&quot; y2=&quot;410.16&quot; stroke=&quot;#2dff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;246.09&quot; y2=&quot;433.59&quot; stroke=&quot;#31ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;246.09&quot; y2=&quot;457.03&quot; stroke=&quot;#2bff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;246.09&quot; y2=&quot;480.47&quot; stroke=&quot;#31ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;246.09&quot; y2=&quot;503.91&quot; stroke=&quot;#35ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;246.09&quot; y2=&quot;527.34&quot; stroke=&quot;#31ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;246.09&quot; y2=&quot;550.78&quot; stroke=&quot;#2fff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;246.09&quot; y2=&quot;574.22&quot; stroke=&quot;#32ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;246.09&quot; y2=&quot;597.66&quot; stroke=&quot;#36ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;269.53&quot; y2=&quot;11.719&quot; stroke=&quot;#28ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;269.53&quot; y2=&quot;35.156&quot; stroke=&quot;#29ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;269.53&quot; y2=&quot;58.594&quot; stroke=&quot;#2eff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;269.53&quot; y2=&quot;82.031&quot; stroke=&quot;#2eff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;269.53&quot; y2=&quot;105.47&quot; stroke=&quot;#29ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;269.53&quot; y2=&quot;128.91&quot; stroke=&quot;#2aff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;269.53&quot; y2=&quot;152.34&quot; stroke=&quot;#2fff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;269.53&quot; y2=&quot;175.78&quot; stroke=&quot;#25ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;269.53&quot; y2=&quot;199.22&quot; stroke=&quot;#25ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;269.53&quot; y2=&quot;222.66&quot; stroke=&quot;#2dff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;269.53&quot; y2=&quot;246.09&quot; stroke=&quot;#23ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;269.53&quot; y2=&quot;269.53&quot; stroke=&quot;#2f0&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;269.53&quot; y2=&quot;292.97&quot; stroke=&quot;#31ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;269.53&quot; y2=&quot;316.41&quot; stroke=&quot;#24ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;269.53&quot; y2=&quot;339.84&quot; stroke=&quot;#24ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;269.53&quot; y2=&quot;363.28&quot; stroke=&quot;#25ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;269.53&quot; y2=&quot;386.72&quot; stroke=&quot;#30ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;269.53&quot; y2=&quot;410.16&quot; stroke=&quot;#23ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;269.53&quot; y2=&quot;433.59&quot; stroke=&quot;#27ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;269.53&quot; y2=&quot;457.03&quot; stroke=&quot;#32ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;269.53&quot; y2=&quot;480.47&quot; stroke=&quot;#30ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;269.53&quot; y2=&quot;503.91&quot; stroke=&quot;#26ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;269.53&quot; y2=&quot;527.34&quot; stroke=&quot;#34ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;269.53&quot; y2=&quot;550.78&quot; stroke=&quot;#2fff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;269.53&quot; y2=&quot;574.22&quot; stroke=&quot;#30ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;269.53&quot; y2=&quot;597.66&quot; stroke=&quot;#25ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;292.97&quot; y2=&quot;11.719&quot; stroke=&quot;#28ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;292.97&quot; y2=&quot;35.156&quot; stroke=&quot;#35ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;292.97&quot; y2=&quot;58.594&quot; stroke=&quot;#28ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;292.97&quot; y2=&quot;82.031&quot; stroke=&quot;#36ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;292.97&quot; y2=&quot;105.47&quot; stroke=&quot;#37ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;292.97&quot; y2=&quot;128.91&quot; stroke=&quot;#35ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;292.97&quot; y2=&quot;152.34&quot; stroke=&quot;#2dff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;292.97&quot; y2=&quot;175.78&quot; stroke=&quot;#2cff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;292.97&quot; y2=&quot;199.22&quot; stroke=&quot;#2aff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;292.97&quot; y2=&quot;222.66&quot; stroke=&quot;#2fff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;292.97&quot; y2=&quot;246.09&quot; stroke=&quot;#37ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;292.97&quot; y2=&quot;269.53&quot; stroke=&quot;#2aff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;292.97&quot; y2=&quot;292.97&quot; stroke=&quot;#31ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;292.97&quot; y2=&quot;316.41&quot; stroke=&quot;#36ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;292.97&quot; y2=&quot;339.84&quot; stroke=&quot;#2dff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;292.97&quot; y2=&quot;363.28&quot; stroke=&quot;#32ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;292.97&quot; y2=&quot;386.72&quot; stroke=&quot;#28ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;292.97&quot; y2=&quot;410.16&quot; stroke=&quot;#35ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;292.97&quot; y2=&quot;433.59&quot; stroke=&quot;#31ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;292.97&quot; y2=&quot;457.03&quot; stroke=&quot;#2fff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;292.97&quot; y2=&quot;480.47&quot; stroke=&quot;#2cff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;292.97&quot; y2=&quot;503.91&quot; stroke=&quot;#28ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;292.97&quot; y2=&quot;527.34&quot; stroke=&quot;#2dff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;292.97&quot; y2=&quot;550.78&quot; stroke=&quot;#2aff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;292.97&quot; y2=&quot;574.22&quot; stroke=&quot;#31ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;292.97&quot; y2=&quot;597.66&quot; stroke=&quot;#30ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;316.41&quot; y2=&quot;11.719&quot; stroke=&quot;#30ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;316.41&quot; y2=&quot;35.156&quot; stroke=&quot;#31ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;316.41&quot; y2=&quot;58.594&quot; stroke=&quot;#32ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;316.41&quot; y2=&quot;82.031&quot; stroke=&quot;#2cff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;316.41&quot; y2=&quot;105.47&quot; stroke=&quot;#2bff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;316.41&quot; y2=&quot;128.91&quot; stroke=&quot;#2dff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;316.41&quot; y2=&quot;152.34&quot; stroke=&quot;#35ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;316.41&quot; y2=&quot;175.78&quot; stroke=&quot;#25ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;316.41&quot; y2=&quot;199.22&quot; stroke=&quot;#32ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;316.41&quot; y2=&quot;222.66&quot; stroke=&quot;#34ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;316.41&quot; y2=&quot;246.09&quot; stroke=&quot;#34ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;316.41&quot; y2=&quot;269.53&quot; stroke=&quot;#32ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;316.41&quot; y2=&quot;292.97&quot; stroke=&quot;#2aff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;316.41&quot; y2=&quot;316.41&quot; stroke=&quot;#35ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;316.41&quot; y2=&quot;339.84&quot; stroke=&quot;#32ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;316.41&quot; y2=&quot;363.28&quot; stroke=&quot;#2dff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;316.41&quot; y2=&quot;386.72&quot; stroke=&quot;#26ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;316.41&quot; y2=&quot;410.16&quot; stroke=&quot;#2eff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;316.41&quot; y2=&quot;433.59&quot; stroke=&quot;#27ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;316.41&quot; y2=&quot;457.03&quot; stroke=&quot;#34ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;316.41&quot; y2=&quot;480.47&quot; stroke=&quot;#25ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;316.41&quot; y2=&quot;503.91&quot; stroke=&quot;#2dff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;316.41&quot; y2=&quot;527.34&quot; stroke=&quot;#31ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;316.41&quot; y2=&quot;550.78&quot; stroke=&quot;#3f0&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;316.41&quot; y2=&quot;574.22&quot; stroke=&quot;#29ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;316.41&quot; y2=&quot;597.66&quot; stroke=&quot;#3f0&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;339.84&quot; y2=&quot;11.719&quot; stroke=&quot;#29ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;339.84&quot; y2=&quot;35.156&quot; stroke=&quot;#21ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;339.84&quot; y2=&quot;58.594&quot; stroke=&quot;#24ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;339.84&quot; y2=&quot;82.031&quot; stroke=&quot;#30ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;339.84&quot; y2=&quot;105.47&quot; stroke=&quot;#31ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;339.84&quot; y2=&quot;128.91&quot; stroke=&quot;#2fff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;339.84&quot; y2=&quot;152.34&quot; stroke=&quot;#25ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;339.84&quot; y2=&quot;175.78&quot; stroke=&quot;#30ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;339.84&quot; y2=&quot;199.22&quot; stroke=&quot;#28ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;339.84&quot; y2=&quot;222.66&quot; stroke=&quot;#2cff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;339.84&quot; y2=&quot;246.09&quot; stroke=&quot;#26ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;339.84&quot; y2=&quot;269.53&quot; stroke=&quot;#28ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;339.84&quot; y2=&quot;292.97&quot; stroke=&quot;#30ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;339.84&quot; y2=&quot;316.41&quot; stroke=&quot;#21ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;339.84&quot; y2=&quot;339.84&quot; stroke=&quot;#29ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;339.84&quot; y2=&quot;363.28&quot; stroke=&quot;#2fff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;339.84&quot; y2=&quot;386.72&quot; stroke=&quot;#30ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;339.84&quot; y2=&quot;410.16&quot; stroke=&quot;#2bff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;339.84&quot; y2=&quot;433.59&quot; stroke=&quot;#23ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;339.84&quot; y2=&quot;457.03&quot; stroke=&quot;#24ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;339.84&quot; y2=&quot;480.47&quot; stroke=&quot;#25ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;339.84&quot; y2=&quot;503.91&quot; stroke=&quot;#2aff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;339.84&quot; y2=&quot;527.34&quot; stroke=&quot;#24ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;339.84&quot; y2=&quot;550.78&quot; stroke=&quot;#2dff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;339.84&quot; y2=&quot;574.22&quot; stroke=&quot;#2dff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;339.84&quot; y2=&quot;597.66&quot; stroke=&quot;#21ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;363.28&quot; y2=&quot;11.719&quot; stroke=&quot;#3f0&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;363.28&quot; y2=&quot;35.156&quot; stroke=&quot;#31ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;363.28&quot; y2=&quot;58.594&quot; stroke=&quot;#32ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;363.28&quot; y2=&quot;82.031&quot; stroke=&quot;#2aff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;363.28&quot; y2=&quot;105.47&quot; stroke=&quot;#2eff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;363.28&quot; y2=&quot;128.91&quot; stroke=&quot;#34ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;363.28&quot; y2=&quot;152.34&quot; stroke=&quot;#3f0&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;363.28&quot; y2=&quot;175.78&quot; stroke=&quot;#26ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;363.28&quot; y2=&quot;199.22&quot; stroke=&quot;#2eff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;363.28&quot; y2=&quot;222.66&quot; stroke=&quot;#35ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;363.28&quot; y2=&quot;246.09&quot; stroke=&quot;#36ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;363.28&quot; y2=&quot;269.53&quot; stroke=&quot;#2aff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;363.28&quot; y2=&quot;292.97&quot; stroke=&quot;#2eff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;363.28&quot; y2=&quot;316.41&quot; stroke=&quot;#2eff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;363.28&quot; y2=&quot;339.84&quot; stroke=&quot;#2cff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;363.28&quot; y2=&quot;363.28&quot; stroke=&quot;#2fff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;363.28&quot; y2=&quot;386.72&quot; stroke=&quot;#2dff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;363.28&quot; y2=&quot;410.16&quot; stroke=&quot;#2aff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;363.28&quot; y2=&quot;433.59&quot; stroke=&quot;#32ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;363.28&quot; y2=&quot;457.03&quot; stroke=&quot;#2cff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;363.28&quot; y2=&quot;480.47&quot; stroke=&quot;#27ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;363.28&quot; y2=&quot;503.91&quot; stroke=&quot;#2aff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;363.28&quot; y2=&quot;527.34&quot; stroke=&quot;#2cff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;363.28&quot; y2=&quot;550.78&quot; stroke=&quot;#2aff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;363.28&quot; y2=&quot;574.22&quot; stroke=&quot;#29ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;363.28&quot; y2=&quot;597.66&quot; stroke=&quot;#2fff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;386.72&quot; y2=&quot;11.719&quot; stroke=&quot;#2bff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;386.72&quot; y2=&quot;35.156&quot; stroke=&quot;#32ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;386.72&quot; y2=&quot;58.594&quot; stroke=&quot;#25ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;386.72&quot; y2=&quot;82.031&quot; stroke=&quot;#34ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;386.72&quot; y2=&quot;105.47&quot; stroke=&quot;#27ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;386.72&quot; y2=&quot;128.91&quot; stroke=&quot;#30ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;386.72&quot; y2=&quot;152.34&quot; stroke=&quot;#3f0&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;386.72&quot; y2=&quot;175.78&quot; stroke=&quot;#2bff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;386.72&quot; y2=&quot;199.22&quot; stroke=&quot;#32ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;386.72&quot; y2=&quot;222.66&quot; stroke=&quot;#27ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;386.72&quot; y2=&quot;246.09&quot; stroke=&quot;#29ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;386.72&quot; y2=&quot;269.53&quot; stroke=&quot;#2fff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;386.72&quot; y2=&quot;292.97&quot; stroke=&quot;#3f0&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;386.72&quot; y2=&quot;316.41&quot; stroke=&quot;#29ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;386.72&quot; y2=&quot;339.84&quot; stroke=&quot;#2fff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;386.72&quot; y2=&quot;363.28&quot; stroke=&quot;#2dff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;386.72&quot; y2=&quot;386.72&quot; stroke=&quot;#2cff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;386.72&quot; y2=&quot;410.16&quot; stroke=&quot;#31ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;386.72&quot; y2=&quot;433.59&quot; stroke=&quot;#2aff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;386.72&quot; y2=&quot;457.03&quot; stroke=&quot;#28ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;386.72&quot; y2=&quot;480.47&quot; stroke=&quot;#2dff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;386.72&quot; y2=&quot;503.91&quot; stroke=&quot;#23ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;386.72&quot; y2=&quot;527.34&quot; stroke=&quot;#26ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;386.72&quot; y2=&quot;550.78&quot; stroke=&quot;#26ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;386.72&quot; y2=&quot;574.22&quot; stroke=&quot;#2aff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;386.72&quot; y2=&quot;597.66&quot; stroke=&quot;#2bff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;410.16&quot; y2=&quot;11.719&quot; stroke=&quot;#34ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;410.16&quot; y2=&quot;35.156&quot; stroke=&quot;#29ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;410.16&quot; y2=&quot;58.594&quot; stroke=&quot;#30ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;410.16&quot; y2=&quot;82.031&quot; stroke=&quot;#2aff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;410.16&quot; y2=&quot;105.47&quot; stroke=&quot;#28ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;410.16&quot; y2=&quot;128.91&quot; stroke=&quot;#3f0&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;410.16&quot; y2=&quot;152.34&quot; stroke=&quot;#29ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;410.16&quot; y2=&quot;175.78&quot; stroke=&quot;#27ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;410.16&quot; y2=&quot;199.22&quot; stroke=&quot;#2fff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;410.16&quot; y2=&quot;222.66&quot; stroke=&quot;#30ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;410.16&quot; y2=&quot;246.09&quot; stroke=&quot;#27ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;410.16&quot; y2=&quot;269.53&quot; stroke=&quot;#2aff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;410.16&quot; y2=&quot;292.97&quot; stroke=&quot;#2aff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;410.16&quot; y2=&quot;316.41&quot; stroke=&quot;#2fff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;410.16&quot; y2=&quot;339.84&quot; stroke=&quot;#29ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;410.16&quot; y2=&quot;363.28&quot; stroke=&quot;#27ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;410.16&quot; y2=&quot;386.72&quot; stroke=&quot;#2cff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;410.16&quot; y2=&quot;410.16&quot; stroke=&quot;#2bff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;410.16&quot; y2=&quot;433.59&quot; stroke=&quot;#34ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;410.16&quot; y2=&quot;457.03&quot; stroke=&quot;#2cff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;410.16&quot; y2=&quot;480.47&quot; stroke=&quot;#3f0&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;410.16&quot; y2=&quot;503.91&quot; stroke=&quot;#31ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;410.16&quot; y2=&quot;527.34&quot; stroke=&quot;#2eff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;410.16&quot; y2=&quot;550.78&quot; stroke=&quot;#26ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;410.16&quot; y2=&quot;574.22&quot; stroke=&quot;#32ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;410.16&quot; y2=&quot;597.66&quot; stroke=&quot;#2bff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;433.59&quot; y2=&quot;11.719&quot; stroke=&quot;#27ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;433.59&quot; y2=&quot;35.156&quot; stroke=&quot;#34ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;433.59&quot; y2=&quot;58.594&quot; stroke=&quot;#35ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;433.59&quot; y2=&quot;82.031&quot; stroke=&quot;#3f0&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;433.59&quot; y2=&quot;105.47&quot; stroke=&quot;#36ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;433.59&quot; y2=&quot;128.91&quot; stroke=&quot;#3f0&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;433.59&quot; y2=&quot;152.34&quot; stroke=&quot;#32ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;433.59&quot; y2=&quot;175.78&quot; stroke=&quot;#35ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;433.59&quot; y2=&quot;199.22&quot; stroke=&quot;#2eff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;433.59&quot; y2=&quot;222.66&quot; stroke=&quot;#35ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;433.59&quot; y2=&quot;246.09&quot; stroke=&quot;#2cff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;433.59&quot; y2=&quot;269.53&quot; stroke=&quot;#35ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;433.59&quot; y2=&quot;292.97&quot; stroke=&quot;#30ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;433.59&quot; y2=&quot;316.41&quot; stroke=&quot;#2cff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;433.59&quot; y2=&quot;339.84&quot; stroke=&quot;#31ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;433.59&quot; y2=&quot;363.28&quot; stroke=&quot;#3f0&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;433.59&quot; y2=&quot;386.72&quot; stroke=&quot;#27ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;433.59&quot; y2=&quot;410.16&quot; stroke=&quot;#2eff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;433.59&quot; y2=&quot;433.59&quot; stroke=&quot;#31ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;433.59&quot; y2=&quot;457.03&quot; stroke=&quot;#31ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;433.59&quot; y2=&quot;480.47&quot; stroke=&quot;#30ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;433.59&quot; y2=&quot;503.91&quot; stroke=&quot;#29ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;433.59&quot; y2=&quot;527.34&quot; stroke=&quot;#36ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;433.59&quot; y2=&quot;550.78&quot; stroke=&quot;#34ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;433.59&quot; y2=&quot;574.22&quot; stroke=&quot;#31ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;433.59&quot; y2=&quot;597.66&quot; stroke=&quot;#2bff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;457.03&quot; y2=&quot;11.719&quot; stroke=&quot;#29ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;457.03&quot; y2=&quot;35.156&quot; stroke=&quot;#29ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;457.03&quot; y2=&quot;58.594&quot; stroke=&quot;#29ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;457.03&quot; y2=&quot;82.031&quot; stroke=&quot;#29ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;457.03&quot; y2=&quot;105.47&quot; stroke=&quot;#27ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;457.03&quot; y2=&quot;128.91&quot; stroke=&quot;#28ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;457.03&quot; y2=&quot;152.34&quot; stroke=&quot;#25ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;457.03&quot; y2=&quot;175.78&quot; stroke=&quot;#31ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;457.03&quot; y2=&quot;199.22&quot; stroke=&quot;#28ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;457.03&quot; y2=&quot;222.66&quot; stroke=&quot;#31ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;457.03&quot; y2=&quot;246.09&quot; stroke=&quot;#31ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;457.03&quot; y2=&quot;269.53&quot; stroke=&quot;#2fff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;457.03&quot; y2=&quot;292.97&quot; stroke=&quot;#2cff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;457.03&quot; y2=&quot;316.41&quot; stroke=&quot;#26ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;457.03&quot; y2=&quot;339.84&quot; stroke=&quot;#2bff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;457.03&quot; y2=&quot;363.28&quot; stroke=&quot;#2eff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;457.03&quot; y2=&quot;386.72&quot; stroke=&quot;#2dff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;457.03&quot; y2=&quot;410.16&quot; stroke=&quot;#27ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;457.03&quot; y2=&quot;433.59&quot; stroke=&quot;#34ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;457.03&quot; y2=&quot;457.03&quot; stroke=&quot;#2eff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;457.03&quot; y2=&quot;480.47&quot; stroke=&quot;#2fff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;457.03&quot; y2=&quot;503.91&quot; stroke=&quot;#31ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;457.03&quot; y2=&quot;527.34&quot; stroke=&quot;#2cff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;457.03&quot; y2=&quot;550.78&quot; stroke=&quot;#28ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;457.03&quot; y2=&quot;574.22&quot; stroke=&quot;#30ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;457.03&quot; y2=&quot;597.66&quot; stroke=&quot;#2eff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;480.47&quot; y2=&quot;11.719&quot; stroke=&quot;#2aff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;480.47&quot; y2=&quot;35.156&quot; stroke=&quot;#2eff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;480.47&quot; y2=&quot;58.594&quot; stroke=&quot;#24ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;480.47&quot; y2=&quot;82.031&quot; stroke=&quot;#28ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;480.47&quot; y2=&quot;105.47&quot; stroke=&quot;#2aff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;480.47&quot; y2=&quot;128.91&quot; stroke=&quot;#23ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;480.47&quot; y2=&quot;152.34&quot; stroke=&quot;#28ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;480.47&quot; y2=&quot;175.78&quot; stroke=&quot;#26ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;480.47&quot; y2=&quot;199.22&quot; stroke=&quot;#30ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;480.47&quot; y2=&quot;222.66&quot; stroke=&quot;#27ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;480.47&quot; y2=&quot;246.09&quot; stroke=&quot;#29ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;480.47&quot; y2=&quot;269.53&quot; stroke=&quot;#2aff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;480.47&quot; y2=&quot;292.97&quot; stroke=&quot;#2cff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;480.47&quot; y2=&quot;316.41&quot; stroke=&quot;#2cff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;480.47&quot; y2=&quot;339.84&quot; stroke=&quot;#27ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;480.47&quot; y2=&quot;363.28&quot; stroke=&quot;#29ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;480.47&quot; y2=&quot;386.72&quot; stroke=&quot;#29ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;480.47&quot; y2=&quot;410.16&quot; stroke=&quot;#25ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;480.47&quot; y2=&quot;433.59&quot; stroke=&quot;#27ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;480.47&quot; y2=&quot;457.03&quot; stroke=&quot;#29ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;480.47&quot; y2=&quot;480.47&quot; stroke=&quot;#23ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;480.47&quot; y2=&quot;503.91&quot; stroke=&quot;#2fff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;480.47&quot; y2=&quot;527.34&quot; stroke=&quot;#31ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;480.47&quot; y2=&quot;550.78&quot; stroke=&quot;#28ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;480.47&quot; y2=&quot;574.22&quot; stroke=&quot;#2f0&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;480.47&quot; y2=&quot;597.66&quot; stroke=&quot;#26ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;503.91&quot; y2=&quot;11.719&quot; stroke=&quot;#2eff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;503.91&quot; y2=&quot;35.156&quot; stroke=&quot;#25ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;503.91&quot; y2=&quot;58.594&quot; stroke=&quot;#2cff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;503.91&quot; y2=&quot;82.031&quot; stroke=&quot;#29ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;503.91&quot; y2=&quot;105.47&quot; stroke=&quot;#26ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;503.91&quot; y2=&quot;128.91&quot; stroke=&quot;#2f0&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;503.91&quot; y2=&quot;152.34&quot; stroke=&quot;#31ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;503.91&quot; y2=&quot;175.78&quot; stroke=&quot;#21ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;503.91&quot; y2=&quot;199.22&quot; stroke=&quot;#2eff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;503.91&quot; y2=&quot;222.66&quot; stroke=&quot;#24ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;503.91&quot; y2=&quot;246.09&quot; stroke=&quot;#26ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;503.91&quot; y2=&quot;269.53&quot; stroke=&quot;#21ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;503.91&quot; y2=&quot;292.97&quot; stroke=&quot;#21ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;503.91&quot; y2=&quot;316.41&quot; stroke=&quot;#31ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;503.91&quot; y2=&quot;339.84&quot; stroke=&quot;#30ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;503.91&quot; y2=&quot;363.28&quot; stroke=&quot;#26ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;503.91&quot; y2=&quot;386.72&quot; stroke=&quot;#27ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;503.91&quot; y2=&quot;410.16&quot; stroke=&quot;#29ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;503.91&quot; y2=&quot;433.59&quot; stroke=&quot;#26ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;503.91&quot; y2=&quot;457.03&quot; stroke=&quot;#28ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;503.91&quot; y2=&quot;480.47&quot; stroke=&quot;#2bff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;503.91&quot; y2=&quot;503.91&quot; stroke=&quot;#27ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;503.91&quot; y2=&quot;527.34&quot; stroke=&quot;#24ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;503.91&quot; y2=&quot;550.78&quot; stroke=&quot;#26ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;503.91&quot; y2=&quot;574.22&quot; stroke=&quot;#2bff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;503.91&quot; y2=&quot;597.66&quot; stroke=&quot;#2f0&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;527.34&quot; y2=&quot;11.719&quot; stroke=&quot;#2bff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;527.34&quot; y2=&quot;35.156&quot; stroke=&quot;#2aff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;527.34&quot; y2=&quot;58.594&quot; stroke=&quot;#2eff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;527.34&quot; y2=&quot;82.031&quot; stroke=&quot;#2fff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;527.34&quot; y2=&quot;105.47&quot; stroke=&quot;#35ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;527.34&quot; y2=&quot;128.91&quot; stroke=&quot;#2dff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;527.34&quot; y2=&quot;152.34&quot; stroke=&quot;#2eff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;527.34&quot; y2=&quot;175.78&quot; stroke=&quot;#27ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;527.34&quot; y2=&quot;199.22&quot; stroke=&quot;#32ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;527.34&quot; y2=&quot;222.66&quot; stroke=&quot;#27ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;527.34&quot; y2=&quot;246.09&quot; stroke=&quot;#2dff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;527.34&quot; y2=&quot;269.53&quot; stroke=&quot;#32ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;527.34&quot; y2=&quot;292.97&quot; stroke=&quot;#29ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;527.34&quot; y2=&quot;316.41&quot; stroke=&quot;#34ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;527.34&quot; y2=&quot;339.84&quot; stroke=&quot;#2eff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;527.34&quot; y2=&quot;363.28&quot; stroke=&quot;#2eff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;527.34&quot; y2=&quot;386.72&quot; stroke=&quot;#2bff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;527.34&quot; y2=&quot;410.16&quot; stroke=&quot;#2dff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;527.34&quot; y2=&quot;433.59&quot; stroke=&quot;#2cff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;527.34&quot; y2=&quot;457.03&quot; stroke=&quot;#31ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;527.34&quot; y2=&quot;480.47&quot; stroke=&quot;#32ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;527.34&quot; y2=&quot;503.91&quot; stroke=&quot;#30ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;527.34&quot; y2=&quot;527.34&quot; stroke=&quot;#2bff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;527.34&quot; y2=&quot;550.78&quot; stroke=&quot;#31ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;527.34&quot; y2=&quot;574.22&quot; stroke=&quot;#2fff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;527.34&quot; y2=&quot;597.66&quot; stroke=&quot;#32ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;550.78&quot; y2=&quot;11.719&quot; stroke=&quot;#2f0&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;550.78&quot; y2=&quot;35.156&quot; stroke=&quot;#2bff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;550.78&quot; y2=&quot;58.594&quot; stroke=&quot;#2fff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;550.78&quot; y2=&quot;82.031&quot; stroke=&quot;#24ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;550.78&quot; y2=&quot;105.47&quot; stroke=&quot;#2aff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;550.78&quot; y2=&quot;128.91&quot; stroke=&quot;#26ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;550.78&quot; y2=&quot;152.34&quot; stroke=&quot;#2aff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;550.78&quot; y2=&quot;175.78&quot; stroke=&quot;#2cff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;550.78&quot; y2=&quot;199.22&quot; stroke=&quot;#27ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;550.78&quot; y2=&quot;222.66&quot; stroke=&quot;#27ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;550.78&quot; y2=&quot;246.09&quot; stroke=&quot;#2eff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;550.78&quot; y2=&quot;269.53&quot; stroke=&quot;#21ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;550.78&quot; y2=&quot;292.97&quot; stroke=&quot;#25ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;550.78&quot; y2=&quot;316.41&quot; stroke=&quot;#2eff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;550.78&quot; y2=&quot;339.84&quot; stroke=&quot;#28ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;550.78&quot; y2=&quot;363.28&quot; stroke=&quot;#2eff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;550.78&quot; y2=&quot;386.72&quot; stroke=&quot;#2eff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;550.78&quot; y2=&quot;410.16&quot; stroke=&quot;#2fff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;550.78&quot; y2=&quot;433.59&quot; stroke=&quot;#24ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;550.78&quot; y2=&quot;457.03&quot; stroke=&quot;#2bff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;550.78&quot; y2=&quot;480.47&quot; stroke=&quot;#25ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;550.78&quot; y2=&quot;503.91&quot; stroke=&quot;#28ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;550.78&quot; y2=&quot;527.34&quot; stroke=&quot;#29ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;550.78&quot; y2=&quot;550.78&quot; stroke=&quot;#21ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;550.78&quot; y2=&quot;574.22&quot; stroke=&quot;#27ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;550.78&quot; y2=&quot;597.66&quot; stroke=&quot;#2eff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;574.22&quot; y2=&quot;11.719&quot; stroke=&quot;#30ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;574.22&quot; y2=&quot;35.156&quot; stroke=&quot;#2aff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;574.22&quot; y2=&quot;58.594&quot; stroke=&quot;#32ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;574.22&quot; y2=&quot;82.031&quot; stroke=&quot;#2cff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;574.22&quot; y2=&quot;105.47&quot; stroke=&quot;#2aff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;574.22&quot; y2=&quot;128.91&quot; stroke=&quot;#3f0&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;574.22&quot; y2=&quot;152.34&quot; stroke=&quot;#28ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;574.22&quot; y2=&quot;175.78&quot; stroke=&quot;#31ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;574.22&quot; y2=&quot;199.22&quot; stroke=&quot;#2dff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;574.22&quot; y2=&quot;222.66&quot; stroke=&quot;#2eff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;574.22&quot; y2=&quot;246.09&quot; stroke=&quot;#32ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;574.22&quot; y2=&quot;269.53&quot; stroke=&quot;#29ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;574.22&quot; y2=&quot;292.97&quot; stroke=&quot;#2aff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;574.22&quot; y2=&quot;316.41&quot; stroke=&quot;#2eff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;574.22&quot; y2=&quot;339.84&quot; stroke=&quot;#32ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;574.22&quot; y2=&quot;363.28&quot; stroke=&quot;#32ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;574.22&quot; y2=&quot;386.72&quot; stroke=&quot;#27ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;574.22&quot; y2=&quot;410.16&quot; stroke=&quot;#2fff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;574.22&quot; y2=&quot;433.59&quot; stroke=&quot;#32ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;574.22&quot; y2=&quot;457.03&quot; stroke=&quot;#3f0&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;574.22&quot; y2=&quot;480.47&quot; stroke=&quot;#26ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;574.22&quot; y2=&quot;503.91&quot; stroke=&quot;#26ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;574.22&quot; y2=&quot;527.34&quot; stroke=&quot;#28ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;574.22&quot; y2=&quot;550.78&quot; stroke=&quot;#25ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;574.22&quot; y2=&quot;574.22&quot; stroke=&quot;#2bff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;574.22&quot; y2=&quot;597.66&quot; stroke=&quot;#27ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;597.66&quot; y2=&quot;11.719&quot; stroke=&quot;#31ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;597.66&quot; y2=&quot;35.156&quot; stroke=&quot;#32ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;597.66&quot; y2=&quot;58.594&quot; stroke=&quot;#28ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;597.66&quot; y2=&quot;82.031&quot; stroke=&quot;#29ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;597.66&quot; y2=&quot;105.47&quot; stroke=&quot;#29ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;597.66&quot; y2=&quot;128.91&quot; stroke=&quot;#2cff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;597.66&quot; y2=&quot;152.34&quot; stroke=&quot;#2fff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;597.66&quot; y2=&quot;175.78&quot; stroke=&quot;#30ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;597.66&quot; y2=&quot;199.22&quot; stroke=&quot;#28ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;597.66&quot; y2=&quot;222.66&quot; stroke=&quot;#2dff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;597.66&quot; y2=&quot;246.09&quot; stroke=&quot;#2aff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;597.66&quot; y2=&quot;269.53&quot; stroke=&quot;#2fff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;597.66&quot; y2=&quot;292.97&quot; stroke=&quot;#2cff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;597.66&quot; y2=&quot;316.41&quot; stroke=&quot;#29ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;597.66&quot; y2=&quot;339.84&quot; stroke=&quot;#2fff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;597.66&quot; y2=&quot;363.28&quot; stroke=&quot;#31ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;597.66&quot; y2=&quot;386.72&quot; stroke=&quot;#2eff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;597.66&quot; y2=&quot;410.16&quot; stroke=&quot;#27ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;597.66&quot; y2=&quot;433.59&quot; stroke=&quot;#34ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;597.66&quot; y2=&quot;457.03&quot; stroke=&quot;#27ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;597.66&quot; y2=&quot;480.47&quot; stroke=&quot;#32ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;597.66&quot; y2=&quot;503.91&quot; stroke=&quot;#2eff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;597.66&quot; y2=&quot;527.34&quot; stroke=&quot;#30ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;597.66&quot; y2=&quot;550.78&quot; stroke=&quot;#32ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;597.66&quot; y2=&quot;574.22&quot; stroke=&quot;#30ff00&quot; /&gt;&lt;line class=&quot;link&quot; x1=&quot;410&quot; x2=&quot;656.67&quot; y1=&quot;597.66&quot; y2=&quot;597.66&quot; stroke=&quot;#27ff00&quot; /&gt;&lt;text x=&quot;640&quot; y=&quot;470&quot; font-size=&quot;20&quot; text-anchor=&quot;middle&quot; writing-mode=&quot;tb-rl&quot;&gt;256 output nodes for each pixel:&lt;/text&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#1f77b4&quot; transform=&quot;translate(133.33 11.719)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#1f77b4&quot; transform=&quot;translate(133.33 35.156)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#1f77b4&quot; transform=&quot;translate(133.33 58.594)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#1f77b4&quot; transform=&quot;translate(133.33 82.031)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#1f77b4&quot; transform=&quot;translate(133.33 105.47)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#1f77b4&quot; transform=&quot;translate(133.33 128.91)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#1f77b4&quot; transform=&quot;translate(133.33 152.34)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#1f77b4&quot; transform=&quot;translate(133.33 175.78)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#1f77b4&quot; transform=&quot;translate(133.33 199.22)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#1f77b4&quot; transform=&quot;translate(133.33 222.66)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#1f77b4&quot; transform=&quot;translate(133.33 246.09)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#1f77b4&quot; transform=&quot;translate(133.33 269.53)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#1f77b4&quot; transform=&quot;translate(133.33 292.97)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#1f77b4&quot; transform=&quot;translate(133.33 316.41)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#1f77b4&quot; transform=&quot;translate(133.33 339.84)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#1f77b4&quot; transform=&quot;translate(133.33 363.28)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#1f77b4&quot; transform=&quot;translate(133.33 386.72)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#1f77b4&quot; transform=&quot;translate(133.33 410.16)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#1f77b4&quot; transform=&quot;translate(133.33 433.59)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#1f77b4&quot; transform=&quot;translate(133.33 457.03)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#1f77b4&quot; transform=&quot;translate(133.33 480.47)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#1f77b4&quot; transform=&quot;translate(133.33 503.91)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#1f77b4&quot; transform=&quot;translate(133.33 527.34)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#1f77b4&quot; transform=&quot;translate(133.33 550.78)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#1f77b4&quot; transform=&quot;translate(133.33 574.22)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#1f77b4&quot; transform=&quot;translate(133.33 597.66)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#24ff00&quot; transform=&quot;translate(400 11.719)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#ffd800&quot; transform=&quot;translate(400 35.156)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#32ff00&quot; transform=&quot;translate(400 58.594)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#23ff00&quot; transform=&quot;translate(400 82.031)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#ff7900&quot; transform=&quot;translate(400 105.47)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#a3ff00&quot; transform=&quot;translate(400 128.91)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#ff3e00&quot; transform=&quot;translate(400 152.34)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#fff400&quot; transform=&quot;translate(400 175.78)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#ff9f00&quot; transform=&quot;translate(400 199.22)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#e3ff00&quot; transform=&quot;translate(400 222.66)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#ff9800&quot; transform=&quot;translate(400 246.09)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#0f0&quot; transform=&quot;translate(400 269.53)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#ff5000&quot; transform=&quot;translate(400 292.97)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#ff7f00&quot; transform=&quot;translate(400 316.41)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#1f0&quot; transform=&quot;translate(400 339.84)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#ffc500&quot; transform=&quot;translate(400 363.28)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#ff5700&quot; transform=&quot;translate(400 386.72)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#ff7300&quot; transform=&quot;translate(400 410.16)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#ff7c00&quot; transform=&quot;translate(400 433.59)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#ffb800&quot; transform=&quot;translate(400 457.03)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#ff7e00&quot; transform=&quot;translate(400 480.47)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#12ff00&quot; transform=&quot;translate(400 503.91)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#ff9000&quot; transform=&quot;translate(400 527.34)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#26ff00&quot; transform=&quot;translate(400 550.78)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#f40&quot; transform=&quot;translate(400 574.22)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#ff8600&quot; transform=&quot;translate(400 597.66)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#ff7d00&quot; transform=&quot;translate(666.67 11.719)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#ff8300&quot; transform=&quot;translate(666.67 35.156)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#ff9100&quot; transform=&quot;translate(666.67 58.594)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#ff8c00&quot; transform=&quot;translate(666.67 82.031)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#f80&quot; transform=&quot;translate(666.67 105.47)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#ff8900&quot; transform=&quot;translate(666.67 128.91)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#ff8900&quot; transform=&quot;translate(666.67 152.34)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#ff8000&quot; transform=&quot;translate(666.67 175.78)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#ff8900&quot; transform=&quot;translate(666.67 199.22)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#ff8100&quot; transform=&quot;translate(666.67 222.66)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#ff8200&quot; transform=&quot;translate(666.67 246.09)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#ff8200&quot; transform=&quot;translate(666.67 269.53)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#ff8a00&quot; transform=&quot;translate(666.67 292.97)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#ff8400&quot; transform=&quot;translate(666.67 316.41)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#ff8000&quot; transform=&quot;translate(666.67 339.84)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#ff7a00&quot; transform=&quot;translate(666.67 363.28)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#ff8100&quot; transform=&quot;translate(666.67 386.72)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#ff7e00&quot; transform=&quot;translate(666.67 410.16)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#ff8200&quot; transform=&quot;translate(666.67 433.59)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#ff8b00&quot; transform=&quot;translate(666.67 457.03)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#ff8600&quot; transform=&quot;translate(666.67 480.47)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#ff8200&quot; transform=&quot;translate(666.67 503.91)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#ff8600&quot; transform=&quot;translate(666.67 527.34)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#ff8000&quot; transform=&quot;translate(666.67 550.78)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#ff8a00&quot; transform=&quot;translate(666.67 574.22)&quot; /&gt;&lt;circle class=&quot;node&quot; r=&quot;10&quot; fill=&quot;#ff8700&quot; transform=&quot;translate(666.67 597.66)&quot; /&gt;&lt;/svg&gt;

&lt;p&gt;&lt;span style=&quot;color:green&quot;&gt;Green&lt;/span&gt; lines mean high weight values and &lt;span style=&quot;color:red&quot;&gt;red&lt;/span&gt; lines low weight values.
&lt;span style=&quot;color:green&quot;&gt;Green&lt;/span&gt; nodes mean a high bias values and &lt;span style=&quot;color:red&quot;&gt;red&lt;/span&gt; nodes a low bias values.&lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/26afb76d0bee8ec00dff89946901ed0e/3c7cc74eac7e4d4a87707cba15ee5f687db7088b.js&quot;&gt; &lt;/script&gt;

&lt;p&gt;If you are running this example in the browser you can add a loading message.&lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/ba2beef73f2545aafbc0f68e69dcd720/6f6373d145aad7677ee1964807f874e0f87e851d.js&quot;&gt; &lt;/script&gt;

&lt;p&gt;&lt;ins class=&quot;adsbygoogle&quot; style=&quot;display:block&quot; data-ad-client=&quot;ca-pub-9732535637352249&quot; data-ad-slot=&quot;6033478353&quot; data-ad-format=&quot;auto&quot; data-full-width-responsive=&quot;true&quot;&gt;&lt;/ins&gt;
&lt;script&gt;	
(adsbygoogle = window.adsbygoogle || []).push({});	
&lt;/script&gt;&lt;/p&gt;

&lt;p&gt;Remove the loading message when the neural network is done training.&lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/ba2beef73f2545aafbc0f68e69dcd720/04d9c77ad951f05157b542749485ad24d284351d.js&quot;&gt; &lt;/script&gt;

&lt;p&gt;Finnaly we add a “keypress” event listener to the document. To listen for valid letters. Every time the user presses a valid key we append the neural network’s interpetation of that letter to the document. This can done using Jimp’s image.getBase64 method. If you are using Node.js you could create your own implementation.&lt;/p&gt;

&lt;div id=&quot;nn-example-text-writer&quot;&gt;&lt;/div&gt;

&lt;h1 id=&quot;start-writing&quot;&gt;Start Writing:&lt;/h1&gt;

&lt;div id=&quot;nn-network-msg&quot; class=&quot;alert alert-warning&quot;&gt;Loading neural network...&lt;/div&gt;
&lt;canvas height=&quot;16&quot; id=&quot;c&quot;&gt;&lt;/canvas&gt;
&lt;p&gt;&lt;input placeholder=&quot;Write some Text&quot; name=&quot;input-text&quot; id=&quot;input-text&quot; type=&quot;text&quot; pattern=&quot;\[A-Za-z \]*&quot; /&gt;
&lt;button id=&quot;write-some-text-go-btn&quot; class=&quot;btn btn-default&quot;&gt;Go&lt;/button&gt;&lt;/p&gt;

&lt;h1 id=&quot;retrain&quot;&gt;Retrain:&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Learning iterations:&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot;&gt;Retraining with a &lt;b&gt;high&lt;/b&gt; amount of learning iterations may take up to a minute to complete&lt;/div&gt;
&lt;p&gt;
&lt;input step=&quot;1&quot; min=&quot;1&quot; max=&quot;300&quot; value=&quot;50&quot; type=&quot;range&quot; class=&quot;flat-range-slider&quot; name=&quot;learning-iterations&quot; id=&quot;learning-iterations-slider&quot; /&gt;
&lt;output id=&quot;iterations-output&quot;&gt;50 iterations&lt;/output&gt;
&lt;button id=&quot;retrain-nn-btn&quot; class=&quot;btn btn-default&quot;&gt;Retrain&lt;/button&gt;
&lt;/p&gt;

&lt;script src=&quot;https://code.jquery.com/jquery-3.3.1.min.js&quot; integrity=&quot;sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=&quot; crossorigin=&quot;anonymous&quot;&gt;&lt;/script&gt;

&lt;script src=&quot;https://esstudio.site/assets/js/jimp.min.js&quot;&gt;&lt;/script&gt;

&lt;script src=&quot;https://cdnjs.cloudflare.com/ajax/libs/synaptic/1.1.4/synaptic.min.js&quot; integrity=&quot;sha256-t3MKDO0e1ULGddDg4QswIm9r1ZfOzguJLRk2TFuRsIg=&quot; crossorigin=&quot;anonymous&quot;&gt;&lt;/script&gt;

&lt;script src=&quot;https://esstudio.site/assets/js/neural-net-image-writer.min.js&quot;&gt;&lt;/script&gt;

&lt;script&gt;
var canvas = document.getElementById(&apos;c&apos;);
var ctx = canvas.getContext(&apos;2d&apos;);
var f = function(x) { return Math.floor(Math.max(0, Math.min(255, x))) }

    window.addEventListener(&apos;load&apos;, function(e) {
        $.getJSON(&quot;https://esstudio.site/resources/pretrained-nn.json&quot;, function(nn) {
            $(&apos;#learning-iterations-slider&apos;).on(&apos;input&apos;, function(e) { 
                iterations = +e.target.value; 
                $(&apos;#iterations-output&apos;).text(iterations + &apos; iterations&apos;);
            });
            $(&apos;#retrain-nn-btn&apos;).on(&apos;click&apos;, function(e) {
                $(&apos;#nn-network-msg&apos;).removeClass(&apos;alert-success&apos;).addClass(&apos;alert-warning&apos;).text(&apos;Retraining neural network...&apos;).show();
                ImageWriterNeuralNet.train(iterations)
                    .then(function() {
                        $(&apos;#nn-network-msg&apos;).removeClass(&apos;alert-warning&apos;).addClass(&apos;alert-success&apos;).text(&apos;Done training neural network.&apos;).slideUp();
                    });
            });
            iterations = +$(&apos;#learning-iterations-slider&apos;).val();
            ImageWriterNeuralNet.load(nn);
            $(&apos;#write-some-text-go-btn&apos;).on(&apos;click&apos;, writeSentence);
            $(&apos;#nn-network-msg&apos;).removeClass(&apos;alert-warning&apos;).addClass(&apos;alert-success&apos;).text(&apos;Done loading neural network.&apos;)
                .delay(2000).slideUp();
            function writeSentence(e) {
                txt = $(&apos;#input-text&apos;).val();
                try {
                    txt = txt.trim().toUpperCase();
                    canvas.width = 16 * txt.length;
                    ctx.fillStyle = &apos;#ffffff&apos;;
                    ctx.fillRect(0,0, canvas.width, canvas.height);
                    for(var i = 0; i &lt; txt.length; i++) {
                        if (txt[i] === &apos; &apos;) continue;
                        var pixdata = ImageWriterNeuralNet.writeLetter(txt[i]);
                        var id = ctx.createImageData(16,16);
                        pixdata.bitmap.data.map(f).forEach(function(x, i) { id.data[i] = x });
                        ctx.putImageData( id, i * 16, 0 );   
                    }
                } catch(err) {
                    alert(err + &apos;. Only letters are accepted.&apos;);
                }
            }
        });
    }, false );

&lt;/script&gt;

&lt;div class=&quot;affiliate&quot;&gt;
    &lt;h3&gt;Resources:&lt;/h3&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fjavascript-in-24-hours-sams-teach-yourself-9780672338090&quot;&gt;Javascript
            in 24 hours&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fhtml-css-and-javascript-all-in-one-covering-html5-css3-9780672338083&quot;&gt;HTML,
            CSS, ES6 all in one&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Flearning-react-a-hands-on-guide-to-building-web-applications-9780134843551&quot;&gt;A
            Hands-On Guide to Building Web Applications Using React&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Flearning-react-a-hands-on-guide-to-building-web-applications-9780134843551http%3A%2F%2Fwww.informit.com%2Fstore%2Flearning-regular-expressions-9780134757063&quot;&gt;Learning
            Regular Expressions&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=24808&amp;amp;u1=sp&amp;amp;murl=http%3A%2F%2Fwww.informit.com%2Fstore%2Fnode.js-mongodb-and-angular-web-development-the-definitive-9780134655536&quot;&gt;Node.js,
            MongoDB, and Angular web development&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;p&gt;&lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=145238.10000683&amp;amp;type=3&amp;amp;subid=0&quot;&gt;InformIT
            eBook Store&lt;/a&gt;&lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=145238.10000683&amp;amp;type=3&amp;amp;subid=0&quot; /&gt;
        has a large number of ebooks on a wide range of topics. I would definitely recommend them.&lt;/p&gt;
    &lt;h3&gt;Great courses:&lt;/h3&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fjavascript-beginner.html&quot;&gt;Javascript
            for beginners in 3 hours&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fjavascript-basics-web-development-building-blocks.html&quot;&gt;Javascript
            basic web development building blocks&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fmobile-ui-and-ux-design.html&quot;&gt;Mobile
            UI and UX Design&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fmobile-ui-and-ux-design.htmlhttps%3A%2F%2Fwww.quickstart.com%2Fbuilding-web-applications-with-react.html&quot;&gt;Building
            web applications with react&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fstarting-with-angular-4.html&quot;&gt;Starting
            with angular 4&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Fprogramming-in-c-ms-20483.html&quot;&gt;Programming
            in C#&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt; (recommended)
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://click.linksynergy.com/deeplink?id=gX56itLGvIE&amp;amp;mid=42440&amp;amp;u1=sp&amp;amp;murl=https%3A%2F%2Fwww.quickstart.com%2Ffind-training%2Ftraining-by-topic%2Fapp-development%2Fweb-development.html&quot;&gt;More
            web development courses&lt;/a&gt;
        &lt;img alt=&quot;icon&quot; width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.1&amp;amp;type=10&quot; /&gt;
    &lt;/li&gt;
    &lt;p&gt;
        &lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=579862.416&amp;amp;type=3&amp;amp;subid=0&quot;&gt;Quickstart
        &lt;/a&gt;&lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.416&amp;amp;type=3&amp;amp;subid=0&quot; /&gt;
        offers a large amount of (online) courses on web development (&lt;a href=&quot;https://click.linksynergy.com/fs-bin/click?id=gX56itLGvIE&amp;amp;offerid=579862.416&amp;amp;type=3&amp;amp;subid=0&quot;&gt;Use
            Code LSOFF50&lt;/a&gt;&lt;img border=&quot;0&quot; width=&quot;1&quot; alt=&quot;&quot; height=&quot;1&quot; src=&quot;https://ad.linksynergy.com/fs-bin/show?id=gX56itLGvIE&amp;amp;bids=579862.416&amp;amp;type=3&amp;amp;subid=0&quot; /&gt;
        to get 50% off ;p)
    &lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;&lt;ins class=&quot;adsbygoogle&quot; style=&quot;display:block&quot; data-ad-client=&quot;ca-pub-9732535637352249&quot; data-ad-slot=&quot;6033478353&quot; data-ad-format=&quot;auto&quot; data-full-width-responsive=&quot;true&quot;&gt;&lt;/ins&gt;
&lt;script&gt;	
(adsbygoogle = window.adsbygoogle || []).push({});	
&lt;/script&gt;&lt;/p&gt;</content>

      
      
      
      
      

      <author>
          <name>Sem Postma</name>
        
        
      </author>

      

      

      
        <summary type="html">A simple neural network that writes letters using synaptic and jimp in pure javascript.</summary>
      

      
      
        
        <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://esstudio.site/uploads/teaching-a-neural-net-how-to-code-visualization.png" />
      
    </entry>
  
</feed>
