/*
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/

(function(document) {
  'use strict';
  
  function finishLazyLoading() {
    // (Optional) Use native Shadow DOM if it's available in the browser.
    // WARNING! This will mess up the page.js router which uses event delegation
    // and expects to receive events from anchor tags. These events get re-targeted
    // by the Shadow DOM to point to <blog-app>
    // window.Polymer = window.Polymer || {dom: 'shadow'};
  
    var onImportLoaded = function() {
      var skeleton = document.getElementById('skeleton');
      skeleton.remove();
  
      console.log('Elements are upgraded!');
    };
  
    var link = document.querySelector('#bundle');
  
    if (link.import && link.import.readyState === 'complete') {
      onImportLoaded();
    } else {
      link.addEventListener('load', onImportLoaded);
    }
  }
  
  var webComponentsSupported = ('registerElement' in document &&
    'import' in document.createElement('link') &&
    'content' in document.createElement('template'));

  if (!webComponentsSupported) {
    var script = document.createElement('script');
    script.async = true;
    script.src = '/bower_components/webcomponentsjs/webcomponents-lite.min.js';
    script.onload = finishLazyLoading;
    document.head.appendChild(script);
  } else {
    finishLazyLoading();
  }

  var app = document.querySelector('#app');

  app.displayInstalledToast = function() {
    // Check to make sure caching is actually enabled—it won't be in the dev environment.
    if (!document.querySelector('platinum-sw-cache').disabled) {
      document.querySelector('#caching-complete').show();
    }
  };

  // Listen for template bound event to know when bindings
  // have resolved and content has been stamped to the page
  app.addEventListener('dom-change', function() {
    console.log('Our app is ready to rock!');
  });

  // See https://github.com/Polymer/polymer/issues/1381
  window.addEventListener('WebComponentsReady', function() {
    // imports are loaded and elements have been registered
  });

  // Main area's paper-scroll-header-panel custom condensing transformation of
  // the appName in the middle-container and the bottom title in the bottom-container.
  // The appName is moved to top and shrunk on condensing. The bottom sub title
  // is shrunk to nothing on condensing.
  addEventListener('paper-header-transform', function(e) {
    var appName = document.querySelector('#mainToolbar .app-name');
    var middleContainer = document.querySelector('#mainToolbar .middle-container');
    var bottomContainer = document.querySelector('#mainToolbar .bottom-container');
    var detail = e.detail;
    var heightDiff = detail.height - detail.condensedHeight;
    var yRatio = Math.min(1, detail.y / heightDiff);
    var maxMiddleScale = 0.50;  // appName max size when condensed. The smaller the number the smaller the condensed size.
    var scaleMiddle = Math.max(maxMiddleScale, (heightDiff - detail.y) / (heightDiff / (1-maxMiddleScale))  + maxMiddleScale);
    var scaleBottom = 1 - yRatio;

    // Move/translate middleContainer
    Polymer.Base.transform('translate3d(0,' + yRatio * 100 + '%,0)', middleContainer);

    // Scale bottomContainer and bottom sub title to nothing and back
    Polymer.Base.transform('scale(' + scaleBottom + ') translateZ(0)', bottomContainer);

    // Scale middleContainer appName
    Polymer.Base.transform('scale(' + scaleMiddle + ') translateZ(0)', appName);
  });

})(document);

@@ -1,11 +1,20 @@
 /*%0A
+@license%0A
 Copyrigh
@@ -27,484 +27,123 @@
 2015
- The Polymer Project Authors. All rights reserved.%0AThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt%0AThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt%0AThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt%0ACode distributed by Google as part of the p
+, 2016 Intel Corporation. All rights reserved.%0ACopyright (c) 2015 The P
 olymer 
-p
+P
 roject 
-is also%0Asubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
+Authors. All rights reserved.
 %0A*/%0A
@@ -1535,98 +1535,8 @@
 ) %7B%0A
-    // Check to make sure caching is actually enabled%E2%80%94it won't be in the dev environment.%0A
     
@@ -1672,1821 +1672,99 @@
 %0A%0A  
-// Listen for template bound event to know when bindings%0A  // have resolved and content has been stamped to the page%0A  app.addEventListener('dom-change', function() %7B%0A    console.log('Our app is ready to rock!');%0A  %7D);%0A%0A  // See https://github.com/Polymer/polymer/issues/1381%0A  window.addEventListener('WebComponentsReady', function() %7B%0A    // imports are loaded and elements have been registered%0A  %7D);%0A%0A  // Main area's paper-scroll-header-panel custom condensing transformation of%0A  // the appName in the middle-container and the bottom title in the bottom-container.%0A  // The appName is moved to top and shrunk on condensing. The bottom sub title%0A  // is shrunk to nothing on condensing.%0A  addEventListener('paper-header-transform', function(e) %7B%0A    var appName = document.querySelector('#mainToolbar .app-name');%0A    var middleContainer = document.querySelector('#mainToolbar .middle-container');%0A    var bottomContainer = document.querySelector('#mainToolbar .bottom-container');%0A    var detail = e.detail;%0A    var heightDiff = detail.height - detail.condensedHeight;%0A    var yRatio = Math.min(1, detail.y / heightDiff);%0A    var maxMiddleScale = 0.50;  // appName max size when condensed. The smaller the number the smaller the condensed size.%0A    var scaleMiddle = Math.max(maxMiddleScale, (heightDiff - detail.y) / (heightDiff / (1-maxMiddleScale))  + maxMiddleScale);%0A    var scaleBottom = 1 - yRatio;%0A%0A    // Move/translate middleContainer%0A    Polymer.Base.transform('translate3d(0,' + yRatio * 100 + '%25,0)', middleContainer);%0A%0A    // Scale bottomContainer and bottom sub title to nothing and back%0A    Polymer.Base.transform('scale(' + scaleBottom + ') translateZ(0)', bottomContainer);%0A%0A    // Scale middleContainer appName%0A    Polymer.Base.transform('scale(' + scaleMiddle + ') translateZ(0)', appName
+app.addEventListener('dom-change', function() %7B%0A    console.log('Our app is ready to rock!'
 );%0A 

Remove unused code