Ticket #39598: 39598.diff
File 39598.diff, 533.4 KB (added by , 7 years ago) |
---|
-
src/wp-content/themes/twentyseventeen/style.css
diff --git src/wp-content/themes/twentyseventeen/style.css src/wp-content/themes/twentyseventeen/style.css index da3791d578..132ab37766 100644
body:not(.title-tagline-hidden) .site-branding-text { 1653 1653 width: 100%; 1654 1654 } 1655 1655 1656 /** 1657 Use media queries to prevent extremely tall header in iOS lte 7 1658 Used formula to get height: Device screen height - ( Device screen height * 25% ) = 75vh 1659 */ 1660 /* iPad */ 1661 @media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : landscape) { 1662 .has-header-image.twentyseventeen-front-page .custom-header, 1663 .has-header-video.twentyseventeen-front-page .custom-header, 1664 .has-header-image.home.blog .custom-header, 1665 .has-header-video.home.blog .custom-header { 1666 height: 576px; 1667 } 1668 } 1669 1670 @media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : portrait) { 1671 .has-header-image.twentyseventeen-front-page .custom-header, 1672 .has-header-video.twentyseventeen-front-page .custom-header, 1673 .has-header-image.home.blog .custom-header, 1674 .has-header-video.home.blog .custom-header { 1675 height: 1024px; 1676 } 1677 } 1678 1679 /* iPhone 5 */ 1680 @media only screen and (min-device-width: 320px) and (max-device-height: 568px) and (orientation : landscape) and (-webkit-device-pixel-ratio: 2) { 1681 .has-header-image.twentyseventeen-front-page .custom-header, 1682 .has-header-video.twentyseventeen-front-page .custom-header, 1683 .has-header-image.home.blog .custom-header, 1684 .has-header-video.home.blog .custom-header { 1685 height: 240px; 1686 } 1687 } 1688 @media only screen and (min-device-width: 320px) and (max-device-height: 568px) and (orientation : portrait) and (-webkit-device-pixel-ratio: 2) { 1689 .has-header-image.twentyseventeen-front-page .custom-header, 1690 .has-header-video.twentyseventeen-front-page .custom-header, 1691 .has-header-image.home.blog .custom-header, 1692 .has-header-video.home.blog .custom-header { 1693 height: 426px; 1694 } 1695 } 1696 1697 /* iPhone 4 */ 1698 @media only screen and (min-device-width : 320px) and (max-device-width : 480px) and (orientation : landscape) and (-webkit-min-device-pixel-ratio : 2) { 1699 .has-header-image.twentyseventeen-front-page .custom-header, 1700 .has-header-video.twentyseventeen-front-page .custom-header, 1701 .has-header-image.home.blog .custom-header, 1702 .has-header-video.home.blog .custom-header { 1703 height: 240px; 1704 } 1705 } 1706 @media only screen and (min-device-width : 320px) and (max-device-width : 480px) and (orientation : portrait) and (-webkit-min-device-pixel-ratio : 2) { 1707 .has-header-image.twentyseventeen-front-page .custom-header, 1708 .has-header-video.twentyseventeen-front-page .custom-header, 1709 .has-header-image.home.blog .custom-header, 1710 .has-header-video.home.blog .custom-header { 1711 height: 360px; 1712 } 1713 } 1714 1656 1715 .custom-header-media { 1657 1716 bottom: 0; 1658 1717 left: 0; -
src/wp-includes/js/media-audiovideo.js
diff --git src/wp-includes/js/media-audiovideo.js src/wp-includes/js/media-audiovideo.js index e37a22189f..3412e9e5e8 100644
VideoDetails = MediaDetails.extend({ 918 918 919 919 module.exports = VideoDetails; 920 920 921 },{}]},{},[1]); 921 },{}]},{},[1]) 922 //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCJzcmMvd3AtaW5jbHVkZXMvanMvbWVkaWEvYXVkaW92aWRlby5tYW5pZmVzdC5qcyIsInNyYy93cC1pbmNsdWRlcy9qcy9tZWRpYS9jb250cm9sbGVycy9hdWRpby1kZXRhaWxzLmpzIiwic3JjL3dwLWluY2x1ZGVzL2pzL21lZGlhL2NvbnRyb2xsZXJzL3ZpZGVvLWRldGFpbHMuanMiLCJzcmMvd3AtaW5jbHVkZXMvanMvbWVkaWEvbW9kZWxzL3Bvc3QtbWVkaWEuanMiLCJzcmMvd3AtaW5jbHVkZXMvanMvbWVkaWEvdmlld3MvYXVkaW8tZGV0YWlscy5qcyIsInNyYy93cC1pbmNsdWRlcy9qcy9tZWRpYS92aWV3c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AmJiAhIHZpZGVvLmhhc0NsYXNzKCAndmltZW8tdmlkZW8nICkgKSB7XG5cdFx0XHRcdHRoaXMubWVkaWEgPSBNZWRpYURldGFpbHMucHJlcGFyZVNyYyggdmlkZW8uZ2V0KDApICk7XG5cdFx0XHR9IGVsc2Uge1xuXHRcdFx0XHR0aGlzLm1lZGlhID0gdmlkZW8uZ2V0KDApO1xuXHRcdFx0fVxuXHRcdH0gZWxzZSB7XG5cdFx0XHR2aWRlby5oaWRlKCk7XG5cdFx0XHR0aGlzLm1lZGlhID0gZmFsc2U7XG5cdFx0fVxuXG5cdFx0cmV0dXJuIHRoaXM7XG5cdH1cbn0pO1xuXG5tb2R1bGUuZXhwb3J0cyA9IFZpZGVvRGV0YWlscztcbiJdfQ== -
src/wp-includes/js/media-grid.js
diff --git src/wp-includes/js/media-grid.js src/wp-includes/js/media-grid.js index edf429e896..b5053eb782 100644
Manage = MediaFrame.extend({ 861 861 862 862 module.exports = Manage; 863 863 864 },{}]},{},[2]); 864 },{}]},{},[2]) 865 //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCJzcmMvd3AtaW5jbHVkZXMvanMvbWVkaWEvY29udHJvbGxlcnMvZWRpdC1hdHRhY2htZW50LW1ldGFkYXRhLmpzIiwic3JjL3dwLWluY2x1ZGVzL2pzL21lZGlhL2dyaWQubWFuaWZlc3QuanMiLCJzcmMvd3AtaW5jbHVkZXMvanMvbWVkaWEvcm91dGVycy9tYW5hZ2UuanMiLCJzcmMvd3AtaW5jbHVkZXMvanMvbWVkaWEvdmlld3MvYXR0YWNobWVudC9kZXRhaWxzLXR3by1jb2x1bW4uanMiLCJzcmMvd3AtaW5jbHVkZXMvanMvbWVkaWEvdmlld3MvYnV0dG9uL2RlbGV0ZS1zZWxlY3RlZC1wZXJtYW5lbnRseS5qcyIsInNyYy93cC1p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XHRcdC8vIFZlcmlmeSBwdXNoU3RhdGUgc3VwcG9ydCBhbmQgYWN0aXZhdGVcblx0XHRpZiAoIHdpbmRvdy5oaXN0b3J5ICYmIHdpbmRvdy5oaXN0b3J5LnB1c2hTdGF0ZSApIHtcblx0XHRcdGlmICggQmFja2JvbmUuSGlzdG9yeS5zdGFydGVkICkge1xuXHRcdFx0XHRCYWNrYm9uZS5oaXN0b3J5LnN0b3AoKTtcblx0XHRcdH1cblx0XHRcdEJhY2tib25lLmhpc3Rvcnkuc3RhcnQoIHtcblx0XHRcdFx0cm9vdDogd2luZG93Ll93cE1lZGlhR3JpZFNldHRpbmdzLmFkbWluVXJsLFxuXHRcdFx0XHRwdXNoU3RhdGU6IHRydWVcblx0XHRcdH0gKTtcblx0XHR9XG5cdH1cbn0pO1xuXG5tb2R1bGUuZXhwb3J0cyA9IE1hbmFnZTtcbiJdfQ== -
src/wp-includes/js/media-models.js
diff --git src/wp-includes/js/media-models.js src/wp-includes/js/media-models.js index f5683a939e..a3851a8220 100644
Selection = Attachments.extend({ 1503 1503 1504 1504 module.exports = Selection; 1505 1505 1506 },{}]},{},[1]); 1506 },{}]},{},[1]) 1507 //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCJzcmMvd3AtaW5jbHVkZXMvanMvbWVkaWEvbW9kZWxzLm1hbmlmZXN0LmpzIiwic3JjL3dwLWluY2x1ZGVzL2pzL21lZGlhL21vZGVscy9hdHRhY2htZW50LmpzIiwic3JjL3dwLWluY2x1ZGVzL2pzL21lZGlhL21vZGVscy9hdHRhY2htZW50cy5qcyIsInNyYy93cC1pbmNsdWRlcy9qcy9tZWRpYS9tb2RlbHMvcG9zdC1pbWFnZS5qcyIsInNyYy93cC1pbmNsdWRlcy9qcy9tZWRpYS9tb2RlbHMvcXVlcnkuanMiLCJzcmMvd3AtaW5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lICE9PSBwcmV2aW91cyApIHtcblx0XHRcdGlmICggcHJldmlvdXMgKSB7XG5cdFx0XHRcdHByZXZpb3VzLnRyaWdnZXIoICdzZWxlY3Rpb246dW5zaW5nbGUnLCBwcmV2aW91cywgdGhpcyApO1xuXG5cdFx0XHRcdC8vIElmIHRoZSBtb2RlbCB3YXMgYWxyZWFkeSByZW1vdmVkLCB0cmlnZ2VyIHRoZSBjb2xsZWN0aW9uXG5cdFx0XHRcdC8vIGV2ZW50IG1hbnVhbGx5LlxuXHRcdFx0XHRpZiAoICEgdGhpcy5nZXQoIHByZXZpb3VzLmNpZCApICkge1xuXHRcdFx0XHRcdHRoaXMudHJpZ2dlciggJ3NlbGVjdGlvbjp1bnNpbmdsZScsIHByZXZpb3VzLCB0aGlzICk7XG5cdFx0XHRcdH1cblx0XHRcdH1cblx0XHRcdGlmICggdGhpcy5fc2luZ2xlICkge1xuXHRcdFx0XHR0aGlzLl9zaW5nbGUudHJpZ2dlciggJ3NlbGVjdGlvbjpzaW5nbGUnLCB0aGlzLl9zaW5nbGUsIHRoaXMgKTtcblx0XHRcdH1cblx0XHR9XG5cblx0XHQvLyBSZXR1cm4gdGhlIHNpbmdsZSBtb2RlbCwgb3IgdGhlIGxhc3QgbW9kZWwgYXMgYSBmYWxsYmFjay5cblx0XHRyZXR1cm4gdGhpcy5fc2luZ2xlO1xuXHR9XG59KTtcblxubW9kdWxlLmV4cG9ydHMgPSBTZWxlY3Rpb247XG4iXX0= -
src/wp-includes/js/media-views.js
diff --git src/wp-includes/js/media-views.js src/wp-includes/js/media-views.js index be802d7642..fb60fe4007 100644
var View = wp.Backbone.View.extend({ 8575 8575 8576 8576 module.exports = View; 8577 8577 8578 },{}]},{},[19]); 8578 },{}]},{},[19]) 8579 //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCJzcmMvd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VwbG9hZGVkXSAgICAgV2hldGhlciB0aGUgbGlicmFyeSBpcyBmaWx0ZXJhYmxlLCBhbmQgaWYgc28gd2hhdCBmaWx0ZXJzIHNob3VsZCBiZSBzaG93bi5cbiAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBY2NlcHRzICdhbGwnLCAndXBsb2FkZWQnLCBvciAndW5hdHRhY2hlZCcuXG4gKiBAcGFyYW0ge3N0cmluZ30gICAgICAgICAgICAgICAgICAgICBbYXR0cmlidXRlcy5tZW51PWdhbGxlcnldICAgICAgICAgICAgSW5pdGlhbCBtb2RlIGZvciB0aGUgbWVudSByZWdpb24uXG4gKiBAcGFyYW0ge3N0cmluZ30gICAgICAgICAgICAgICAgICAgICBbYXR0cmlidXRlcy5jb250ZW50PXVwbG9hZF0gICAgICAgICAgSW5pdGlhbCBtb2RlIGZvciB0aGUgY29udGVudCByZWdpb24uXG4gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgT3ZlcnJpZGRlbiBieSBwZXJzaXN0ZW50IHVzZXIgc2V0dGluZyBpZiAnY29udGVudFVzZXJTZXR0aW5nJyBpcyB0cnVlLlxuICogQHBhcmFtIHtzdHJpbmd9ICAgICAgICAgICAgICAgICAgICAgW2F0dHJpYnV0ZXMucm91dGVyPWJyb3dzZV0gICAgICAgICAgIEluaXRpYWwgbW9kZSBmb3IgdGhlIHJvdXRlciByZWdpb24uXG4gKiBAcGFyYW0ge3N0cmluZ30gICAgICAgICAgICAgICAgICAgICBbYXR0cmlidXRlcy50b29sYmFyPWdhbGxlcnktYWRkXSAgICAgSW5pdGlhbCBtb2RlIGZvciB0aGUgdG9vbGJhciByZWdpb24uXG4gKiBAcGFyYW0ge2Jvb2xlYW59ICAgICAgICAgICAgICAgICAgICBbYXR0cmlidXRlcy5zZWFyY2hhYmxlPXR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iAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBJZiBvbmUgaXMgbm90IHN1cHBsaWVkLCBhbiBlbXB0eSBtZWRpYS5tb2RlbC5TZWxlY3Rpb24gY29sbGVjdGlvbiBpcyBjcmVhdGVkLlxuICogQHBhcmFtIHtib29sZWFufSAgICAgICAgICAgICAgICAgICAgW2F0dHJpYnV0ZXMubXVsdGlwbGU9ZmFsc2VdICAgICAgIFdoZXRoZXIgbXVsdGktc2VsZWN0IGlzIGVuYWJsZWQuXG4gKiBAcGFyYW0ge3N0cmluZ30gICAgICAgICAgICAgICAgICAgICBbYXR0cmlidXRlcy5jb250ZW50PWJyb3dzZV0gICAgICAgSW5pdGlhbCBtb2RlIGZvciB0aGUgY29udGVudCByZWdpb24uXG4gKiBAcGFyYW0ge3N0cmluZ30gICAgICAgICAgICAgICAgICAgICBhdHRyaWJ1dGVzLm1lbnUgICAgICAgICAgICAgICAgICAgSW5pdGlhbCBtb2RlIGZvciB0aGUgbWVudSByZWdpb24uIEB0b2RvIHRoaXMgbmVlZHMgYSBiZXR0ZXIgZXhwbGFuYXRpb24uXG4gKiBAcGFyYW0ge2Jvb2xlYW59ICAgICAgICAgICAgICAgICAgICBbYXR0cmlidXRlcy5zZWFyY2hhYmxlPWZhbHNlXSAgICAgV2hldGhlciB0aGUgbGlicmFyeSBpcyBzZWFyY2hhYmxlLlxuICogQHBhcmFtIHtib29sZWFufSAgICAgICAgICAgICAgICAgICAgW2F0dHJpYnV0ZXMuc29ydGFibGU9dHJ1ZV0gICAgICAgIFdoZXRoZXIgdGhlIEF0dGFjaG1lbnRzIHNob3VsZCBiZSBzb3J0YWJsZS4gRGVwZW5kcyBvbiB0aGUgb3JkZXJieSBwcm9wZXJ0eSBiZWluZyBzZXQgdG8gbWVudU9yZGVyIG9uIHRoZSBhdHRhY2htZW50cyBjb2xsZWN0aW9uLlxuICogQHBhcmFtIHtib29sZWFuf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cmFtIHtpbnR9ICAgICAgICAgICAgICAgICAgICAgICAgW2F0dHJpYnV0ZXMucHJpb3JpdHk9NjBdICAgICAgICAgIFRoZSBwcmlvcml0eSBmb3IgdGhlIHN0YXRlIGxpbmsgaW4gdGhlIG1lZGlhIG1lbnUuXG4gKiBAcGFyYW0ge2Jvb2xlYW59ICAgICAgICAgICAgICAgICAgICBbYXR0cmlidXRlcy5zeW5jU2VsZWN0aW9uPWZhbHNlXSAgV2hldGhlciB0aGUgQXR0YWNobWVudHMgc2VsZWN0aW9uIHNob3VsZCBiZSBwZXJzaXN0ZWQgZnJvbSB0aGUgbGFzdCBzdGF0ZS5cbiAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBEZWZhdWx0cyB0byBmYWxzZSBmb3IgdGhpcyBzdGF0ZSwgYmVjYXVzZSB0aGUgbGlicmFyeSBwYXNzZWQgaW4gICppcyogdGhlIHNlbGVjdGlvbi5cbiAqIEBwYXJhbSB7dmlld30gICAgICAgICAgICAgICAgICAgICAgIFthdHRyaWJ1dGVzLlNldHRpbmdzVmlld10gICAgICAgICBUaGUgdmlldyB0byBlZGl0IHRoZSBjb2xsZWN0aW9uIGluc3RhbmNlIHNldHRpbmdzIChlLmcuIFBsYXlsaXN0IHNldHRpbmdzIHdpdGggXCJTaG93IHRyYWNrbGlzdFwiIGNoZWNrYm94KS5cbiAqIEBwYXJhbSB7dmlld30gICAgICAgICAgICAgICAgICAgICAgIFthdHRyaWJ1dGVzLkF0dGFjaG1lbnRWaWV3XSAgICAgICBUaGUgc2luZ2xlIGBBdHRhY2htZW50YCB2aWV3IHRvIGJlIHVzZWQgaW4gdGhlIGBBdHRhY2htZW50c2AuXG4gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSWYgbm9uZSBzdXBwbGllZCwgZGVmYXVsdHMgdG8gd3Aub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b3IgdGhlIGNvbnRlbnQgcmVnaW9uLlxuICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBPdmVycmlkZGVuIGJ5IHBlcnNpc3RlbnQgdXNlciBzZXR0aW5nIGlmICdjb250ZW50VXNlclNldHRpbmcnIGlzIHRydWUuXG4gKiBAcGFyYW0ge3N0cmluZ30gICAgICAgICAgICAgICAgICAgICBbYXR0cmlidXRlcy5tZW51PWRlZmF1bHRdICAgICAgICAgICAgIEluaXRpYWwgbW9kZSBmb3IgdGhlIG1lbnUgcmVnaW9uLlxuICogQHBhcmFtIHtzdHJpbmd9ICAgICAgICAgICAgICAgICAgICAgW2F0dHJpYnV0ZXMucm91dGVyPWJyb3dzZV0gICAgICAgICAgICBJbml0aWFsIG1vZGUgZm9yIHRoZSByb3V0ZXIgcmVnaW9uLlxuICogQHBhcmFtIHtzdHJpbmd9ICAgICAgICAgICAgICAgICAgICAgW2F0dHJpYnV0ZXMudG9vbGJhcj1mZWF0dXJlZC1pbWFnZV0gICBJbml0aWFsIG1vZGUgZm9yIHRoZSB0b29sYmFyIHJlZ2lvbi5cbiAqIEBwYXJhbSB7aW50fSAgICAgICAgICAgICAgICAgICAgICAgIFthdHRyaWJ1dGVzLnByaW9yaXR5PTYwXSAgICAgICAgICAgICAgVGhlIHByaW9yaXR5IGZvciB0aGUgc3RhdGUgbGluayBpbiB0aGUgbWVkaWEgbWVudS5cbiAqIEBwYXJhbSB7Ym9vbGVhbn0gICAgICAgICAgICAgICAgICAgIFthdHRyaWJ1dGVzLnNlYXJjaGFibGU9dHJ1ZV0gICAgICAgICAgV2hldGhlciB0aGUgbGlicmFyeSBpcyBzZWFyY2hhYmxlLlxuICogQHBhcmFtIHtib29sZWFufHN0cmluZ30gICAgICAgICAgICAgW2F0dHJpYnV0ZXMuZmlsdGVyYWJsZT1mYWxzZV0gICAgICAgICBXaGV0aGVyIHRoZSBsaWJyYXJ5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dWdtZW50cyBCYWNrYm9uZS5Nb2RlbFxuICogQG1peGVzIG1lZGlhLnNlbGVjdGlvblN5bmNcbiAqXG4gKiBAcGFyYW0ge29iamVjdH0gICAgICAgICAgICAgICAgICAgICAgICAgIFthdHRyaWJ1dGVzXSAgICAgICAgICAgICAgICAgICAgICAgICBUaGUgYXR0cmlidXRlcyBoYXNoIHBhc3NlZCB0byB0aGUgc3RhdGUuXG4gKiBAcGFyYW0ge3N0cmluZ30gICAgICAgICAgICAgICAgICAgICAgICAgIFthdHRyaWJ1dGVzLmlkPWxpYnJhcnldICAgICAgICAgICAgICBVbmlxdWUgaWRlbnRpZmllci5cbiAqIEBwYXJhbSB7c3RyaW5nfSAgICAgICAgICAgICAgICAgICAgICAgICAgW2F0dHJpYnV0ZXMudGl0bGU9TWVkaWEgbGlicmFyeV0gICAgIFRpdGxlIGZvciB0aGUgc3RhdGUuIERpc3BsYXlzIGluIHRoZSBtZWRpYSBtZW51IGFuZCB0aGUgZnJhbWUncyB0aXRsZSByZWdpb24uXG4gKiBAcGFyYW0ge3dwLm1lZGlhLm1vZGVsLkF0dGFjaG1lbnRzfSAgICAgIFthdHRyaWJ1dGVzLmxpYnJhcnldICAgICAgICAgICAgICAgICBUaGUgYXR0YWNobWVudHMgY29sbGVjdGlvbiB0byBicm93c2UuXG4gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBJZiBvbmUgaXMgbm90IHN1cHBsaWVkLCBhIGNvbGxlY3Rpb24gb2YgYWxsIGF0dGFjaG1lbnRzIHdpbGwgYmUgY3JlYXRlZC5cbiAqIEBwYXJhbSB7d3AubWVkaWEubW9kZWwuU2VsZWN0aW9ufG9iamVjdH0gW2F0dHJpYnV0ZXMuc2VsZWN0aW9uXSAgICAgICAgICAgICAgIEEgY29sbGVjdGlvbiB0byBjb250YWluIGF0dGFjaG1lbnQgc2VsZWN0aW9ucyB3aXRoaW4gdGhlIHN0YXRlLlxuICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSWYgdGhlICdzZWxlY3Rpb24nIGF0dHJpYnV0ZSBpcyBhIHBsYWluIEpTIG9iamVjdCxcbiAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGEgU2VsZWN0aW9uIHdpbGwgYmUgY3JlYXRlZCB1c2luZyBpdHMgdmFsdWVzIGFzIHRoZSBzZWxlY3Rpb24gaW5zdGFuY2UncyBgcHJvcHNgIG1vZGVsLlxuICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgT3RoZXJ3aXNlLCBpdCB3aWxsIGNvcHkgdGhlIGxpYnJhcnkncyBgcHJvcHNgIG1vZGVsLlxuICogQHBhcmFtIHtib29sZWFufSAgICAgICAgICAgICAgICAgICAgICAgICBbYXR0cmlidXRlcy5tdWx0aXBsZT1mYWxzZV0gICAgICAgICAgV2hldGhlciBtdWx0aS1zZWxlY3QgaXMgZW5hYmxlZC5cbiAqIEBwYXJhbSB7c3RyaW5nfSAgICAgICAgICAgICAgICAgICAgICAgICAgW2F0dHJpYnV0ZXMuY29udGVudD11cGxvYWRdICAgICAgICAgIEluaXRpYWwgbW9kZSBmb3IgdGhlIGNvbnRlbnQgcmVnaW9uLlxuICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgT3ZlcnJpZGRlbiBieSBwZXJzaXN0ZW50IHVzZXIgc2V0dGluZyBpZiAnY29udGVudFVzZXJTZXR0aW5nJyBpcyB0cnVlLlxuICogQHBhcmFtIHtzdHJpbmd9ICAgICAgICAgICAgICAgICAgICAgICAgICBbYXR0cmlidXRlcy5tZW51PWRlZmF1bHRdICAgICAgICAgICAgSW5pdGlhbCBtb2RlIGZvciB0aGUgbWVudSByZWdpb24uXG4gKiBAcGFyYW0ge3N0cmluZ30gICAgICAgICAgICAgICAgICAgICAgICAgIFthdHRyaWJ1dGVzLnJvdXRlcj1icm93c2VdICAgICAgICAgICBJbml0aWFsIG1vZGUgZm9yIHRoZSByb3V0ZXIgcmVnaW9uLlxuICogQHBhcmFtIHtzdHJpbmd9ICAgICAgICAgICAgICAgICAgICAgICAgICBbYXR0cmlidXRlcy50b29sYmFyPXNlbGVjdF0gICAgICAgICAgSW5pdGlhbCBtb2RlIGZvciB0aGUgdG9vbGJhciByZWdpb24uXG4gKiBAcGFyYW0ge2Jvb2xlYW59ICAgICAgICAgICAgICAgICAgICAgICAgIFthdHRyaWJ1dGVzLnNlYXJjaGFibGU9dHJ1ZV0gICAgICAgICBXaGV0aGVyIHRoZSBsaWJyYXJ5IGlzIHNlYXJjaGFibGUuXG4gKiBAcGFyYW0ge2Jvb2xlYW58c3RyaW5nfSAgICAgICAgICAgICAgICAgIFthdHRyaWJ1dGVzLmZpbHRlcmFibGU9ZmFsc2VdICAgICAgICBXaGV0aGVyIHRoZSBsaWJyYXJ5IGlzIGZpbHRlcmFibGUsIGFuZCBpZiBzbyB3aGF0IGZpbHRlcnMgc2hvdWxkIGJlIHNob3duLlxuICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQWNjZXB0cyAnYWxsJywgJ3VwbG9hZGVkJywgb3IgJ3VuYXR0YWNoZWQnLlxuICogQHBhcmFtIHtib29sZWFufSAgICAgICAgICAgICAgICAgICAgICAgICBbYXR0cmlidXRlcy5zb3J0YWJsZT10cnVlXSAgICAgICAgICAgV2hldGhlciB0aGUgQXR0YWNobWVudHMgc2hvdWxkIGJlIHNvcnRhYmxlLiBEZXBlbmRzIG9uIHRoZSBvcmRlcmJ5IHByb3B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lcyB3aWxsIGJlIGNyZWF0ZWQuXG4gKiBAcGFyYW0ge2Jvb2xlYW59ICAgICAgICAgICAgICAgICAgICBbYXR0cmlidXRlcy5tdWx0aXBsZT1mYWxzZV0gICAgICAgICAgV2hldGhlciBtdWx0aS1zZWxlY3QgaXMgZW5hYmxlZC5cbiAqIEBwYXJhbSB7c3RyaW5nfSAgICAgICAgICAgICAgICAgICAgIFthdHRyaWJ1dGVzLmNvbnRlbnQ9dXBsb2FkXSAgICAgICAgICBJbml0aWFsIG1vZGUgZm9yIHRoZSBjb250ZW50IHJlZ2lvbi5cbiAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBPdmVycmlkZGVuIGJ5IHBlcnNpc3RlbnQgdXNlciBzZXR0aW5nIGlmICdjb250ZW50VXNlclNldHRpbmcnIGlzIHRydWUuXG4gKiBAcGFyYW0ge3N0cmluZ30gICAgICAgICAgICAgICAgICAgICBbYXR0cmlidXRlcy5tZW51PWRlZmF1bHRdICAgICAgICAgICAgSW5pdGlhbCBtb2RlIGZvciB0aGUgbWVudSByZWdpb24uXG4gKiBAcGFyYW0ge3N0cmluZ30gICAgICAgICAgICAgICAgICAgICBbYXR0cmlidXRlcy5yb3V0ZXI9YnJvd3NlXSAgICAgICAgICAgSW5pdGlhbCBtb2RlIGZvciB0aGUgcm91dGVyIHJlZ2lvbi5cbiAqIEBwYXJhbSB7c3RyaW5nfSAgICAgICAgICAgICAgICAgICAgIFthdHRyaWJ1dGVzLnRvb2xiYXI9cmVwbGFjZV0gICAgICAgICBJbml0aWFsIG1vZGUgZm9yIHRoZSB0b29sYmFyIHJlZ2lvbi5cbiAqIEBwYXJhbSB7aW50fSAgICAgICAgICAgICAgICAgICAgICAgIFthdHRyaWJ1dGVzLnByaW9yaXR5PTYwXSAgICAgICAgICAgICBUaGUgcHJpb3JpdHkgZm9yIHRoZSBzdGF0ZSBsaW5rIGluIHRoZSBtZ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ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJvd3NlcidzIHRvb2xiYXIuXG4gKiBAcGFyYW0ge2Jvb2xlYW59ICAgICAgICBbb3B0aW9ucy5kYXRlPXRydWVdICAgICBXaGV0aGVyIHRvIHNob3cgdGhlIGRhdGUgZmlsdGVyIGluIHRoZVxuICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJvd3NlcidzIHRvb2xiYXIuXG4gKiBAcGFyYW0ge2Jvb2xlYW59ICAgICAgICBbb3B0aW9ucy5kaXNwbGF5PWZhbHNlXSBXaGV0aGVyIHRvIHNob3cgdGhlIGF0dGFjaG1lbnRzIGRpc3BsYXkgc2V0dGluZ3NcbiAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZpZXcgaW4gdGhlIHNpZGViYXIuXG4gKiBAcGFyYW0ge2Jvb2xlYW58c3RyaW5nfSBbb3B0aW9ucy5zaWRlYmFyPXRydWVdICBXaGV0aGVyIHRvIGNyZWF0ZSBhIHNpZGViYXIgZm9yIHRoZSBicm93c2VyLlxuICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQWNjZXB0cyB0cnVlLCBmYWxzZSwgYW5kICdlcnJvcnMnLlxuICovXG52YXIgVmlldyA9IHdwLm1lZGlhLlZpZXcsXG5cdG1lZGlhVHJhc2ggPSB3cC5tZWRpYS52aWV3LnNldHRpbmdzLm1lZGlhVHJhc2gsXG5cdGwxMG4gPSB3cC5tZWRpYS52aWV3LmwxMG4sXG5cdCQgPSBqUXVlcnksXG5cdEF0dGFjaG1lbnRzQnJvd3NlcjtcblxuQXR0YWNobWVudHNCcm93c2VyID0gVmlldy5leHRlbmQoe1xuXHR0YWdOYW1lOiAgICdkaXYnLFxuXHRjbGFzc05hbWU6ICdhdHRhY2htZW50cy1icm93c2VyJyxcblxuXHRpbml0aWFsaXplOiBmdW5j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