jQuery Pin It Button for Images - Version 2.3.1

Version Description

  • Released 2017-07-09
  • Settings panel code rework
  • Fixed issue with disabling review nag
Download this release

Release Info

Developer mrsztuczkens
Plugin Icon wp plugin jQuery Pin It Button for Images
Version 2.3.1
Comparing to
See all releases

Code changes from version 2.3.0 to 2.3.1

css/admin.css CHANGED
@@ -1 +1 @@
1
- @charset "UTF-8";a.pinit-button.old_default,a.pinit-button.old_default span{height:41px!important;width:65px!important}a.pinit-button.default.jpibfi-size-small .jpibfi-icon-circle,a.pinit-button.default.jpibfi-size-small .jpibfi-icon-plain{font-size:28.8px}a.pinit-button.custom,a.pinit-button.old_default{text-indent:-9999em!important}a.pinit-button.custom span,a.pinit-button.old_default span{display:block;background-color:transparent!important;background-repeat:no-repeat!important;background-position:0 0!important}a.pinit-button.old_default span{background-image:url(images/pinit-button.png)!important;background-size:65px 41px!important}a.pinit-button.default{display:block;overflow:hidden;text-decoration:none;color:#fff;background-color:#bd081c}a.pinit-button.default:hover{background-color:#a50718}a.pinit-button.default.jpibfi-size-small{height:43.2px}a.pinit-button.default.jpibfi-size-small.jpibfi-button-round,a.pinit-button.default.jpibfi-size-small.jpibfi-button-rounded-square,a.pinit-button.default.jpibfi-size-small.jpibfi-button-square{width:43.2px}a.pinit-button.default.jpibfi-size-small.jpibfi-button-rectangle,a.pinit-button.default.jpibfi-size-small.jpibfi-button-rounded-rectangle{width:64.8px}a.pinit-button.default.jpibfi-size-small .jpibfi-icon-circle:before{margin-top:-14.4px;margin-left:-12.38px}a.pinit-button.default.jpibfi-size-small .jpibfi-icon-pushpin,a.pinit-button.default.jpibfi-size-small .jpibfi-icon-thumb-tack{font-size:17.28px}a.pinit-button.default.jpibfi-size-small .jpibfi-icon-plain:before{margin-top:-13.5px;margin-left:-10.06px}a.pinit-button.default.jpibfi-size-small .jpibfi-icon-thumb-tack:before{margin-top:-7.97px;margin-left:-5.54px}a.pinit-button.default.jpibfi-size-small .jpibfi-icon-pushpin:before{margin-top:-8.64px;margin-left:-8.64px}a.pinit-button.default.jpibfi-size-small .jpibfi-icon-pinterest2{font-size:28.8px}a.pinit-button.default.jpibfi-size-normal .jpibfi-icon-circle,a.pinit-button.default.jpibfi-size-normal .jpibfi-icon-plain{font-size:36px}a.pinit-button.default.jpibfi-size-small .jpibfi-icon-pinterest2:before{margin-top:-14.4px;margin-left:-14.4px}a.pinit-button.default.jpibfi-size-normal{height:54px}a.pinit-button.default.jpibfi-size-normal.jpibfi-button-round,a.pinit-button.default.jpibfi-size-normal.jpibfi-button-rounded-square,a.pinit-button.default.jpibfi-size-normal.jpibfi-button-square{width:54px}a.pinit-button.default.jpibfi-size-large.jpibfi-button-round,a.pinit-button.default.jpibfi-size-large.jpibfi-button-rounded-square,a.pinit-button.default.jpibfi-size-large.jpibfi-button-square,a.pinit-button.default.jpibfi-size-normal.jpibfi-button-rectangle,a.pinit-button.default.jpibfi-size-normal.jpibfi-button-rounded-rectangle{width:81px}a.pinit-button.default.jpibfi-size-normal .jpibfi-icon-circle:before{margin-top:-18px;margin-left:-15.47px}a.pinit-button.default.jpibfi-size-normal .jpibfi-icon-pushpin,a.pinit-button.default.jpibfi-size-normal .jpibfi-icon-thumb-tack{font-size:21.6px}a.pinit-button.default.jpibfi-size-normal .jpibfi-icon-plain:before{margin-top:-16.88px;margin-left:-12.58px}a.pinit-button.default.jpibfi-size-normal .jpibfi-icon-thumb-tack:before{margin-top:-9.96px;margin-left:-6.92px}a.pinit-button.default.jpibfi-size-normal .jpibfi-icon-pushpin:before{margin-top:-10.8px;margin-left:-10.8px}a.pinit-button.default.jpibfi-size-normal .jpibfi-icon-pinterest2{font-size:36px}a.pinit-button.default.jpibfi-size-large .jpibfi-icon-circle,a.pinit-button.default.jpibfi-size-large .jpibfi-icon-plain{font-size:54px}a.pinit-button.default.jpibfi-size-normal .jpibfi-icon-pinterest2:before{margin-top:-18px;margin-left:-18px}a.pinit-button.default.jpibfi-size-large{height:81px}a.pinit-button.default.jpibfi-size-large.jpibfi-button-rectangle,a.pinit-button.default.jpibfi-size-large.jpibfi-button-rounded-rectangle{width:121.5px}a.pinit-button.default.jpibfi-size-large .jpibfi-icon-circle:before{margin-top:-27px;margin-left:-23.2px}a.pinit-button.default.jpibfi-size-large .jpibfi-icon-pushpin,a.pinit-button.default.jpibfi-size-large .jpibfi-icon-thumb-tack{font-size:32.4px}a.pinit-button.default.jpibfi-size-large .jpibfi-icon-plain:before{margin-top:-25.31px;margin-left:-18.86px}a.pinit-button.default.jpibfi-size-large .jpibfi-icon-thumb-tack:before{margin-top:-14.93px;margin-left:-10.38px}a.pinit-button.default.jpibfi-size-large .jpibfi-icon-pushpin:before{margin-top:-16.2px;margin-left:-16.2px}a.pinit-button.default.jpibfi-size-large .jpibfi-icon-pinterest2{font-size:54px}a.pinit-button.default.jpibfi-size-large .jpibfi-icon-pinterest2:before{margin-top:-27px;margin-left:-27px}a.pinit-button.default.jpibfi-button-rounded-rectangle,a.pinit-button.default.jpibfi-button-rounded-square{border-radius:10px}a.pinit-button.default.jpibfi-button-round{border-radius:50%}a.pinit-button.default [class*=" jpibfi-icon-"],a.pinit-button.default [class^=jpibfi-icon-]{color:#fff;display:block}a.pinit-button.default [class*=" jpibfi-icon-"]:hover,a.pinit-button.default [class^=jpibfi-icon-]:hover{color:#fff}a.pinit-button.default [class*=" jpibfi-icon-"]:before,a.pinit-button.default [class^=jpibfi-icon-]:before{display:block;position:absolute;top:50%;left:50%}@font-face{font-family:jpibfi-font;src:url(fonts/jpibfi-font.eot?ifsn2k);src:url(fonts/jpibfi-font.eot?ifsn2k#iefix) format("embedded-opentype"),url(fonts/jpibfi-font.ttf?ifsn2k) format("truetype"),url(fonts/jpibfi-font.woff?ifsn2k) format("woff"),url(fonts/jpibfi-font.svg?ifsn2k#jpibfi-font) format("svg");font-weight:400;font-style:normal}[class*=" jpibfi-icon-"],[class^=jpibfi-icon-]{font-family:jpibfi-font!important;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.jpibfi-icon-circle:before{content:""}.jpibfi-icon-plain:before{content:""}.jpibfi-icon-thumb-tack:before{content:""}.jpibfi-icon-pushpin:before{content:""}.jpibfi-icon-pinterest2:before{content:""}.frizzly-sortable li{cursor:move}input[type=checkbox]~label{padding-left:5px}input#custom_image_url{width:100%}div.checkbox-indented{margin-left:20px}table.jpibfi-inner-table td,table.jpibfi-inner-table th{max-width:350px}table.jpibfi-inner-table th{padding:5px;width:auto}table.jpibfi-inner-table td{vertical-align:top;padding:0 15px 0 10px}a.pinit-button{display:block;position:relative}
1
+ @charset "UTF-8";a.pinit-button.custom,a.pinit-button.old_default{text-indent:-9999em!important}a.pinit-button.custom span,a.pinit-button.old_default span{display:block;background-color:transparent!important;background-repeat:no-repeat!important;background-position:0 0!important}a.pinit-button.old_default{width:65px!important;height:41px!important}a.pinit-button.old_default span{height:41px!important;width:65px!important;background-image:url(images/pinit-button.png)!important;background-size:65px 41px!important}a.pinit-button.default{display:block;overflow:hidden;text-decoration:none;color:#fff;background-color:#bd081c}a.pinit-button.default:hover{background-color:#a50718}a.pinit-button.default.jpibfi-size-small{height:43.2px}a.pinit-button.default.jpibfi-size-small.jpibfi-button-round,a.pinit-button.default.jpibfi-size-small.jpibfi-button-rounded-square,a.pinit-button.default.jpibfi-size-small.jpibfi-button-square{width:43.2px}a.pinit-button.default.jpibfi-size-small.jpibfi-button-rectangle,a.pinit-button.default.jpibfi-size-small.jpibfi-button-rounded-rectangle{width:64.8px}a.pinit-button.default.jpibfi-size-small .jpibfi-icon-circle{font-size:28.8px}a.pinit-button.default.jpibfi-size-small .jpibfi-icon-circle:before{margin-top:-14.4px;margin-left:-12.375px}a.pinit-button.default.jpibfi-size-small .jpibfi-icon-plain{font-size:28.8px}a.pinit-button.default.jpibfi-size-small .jpibfi-icon-plain:before{margin-top:-13.5px;margin-left:-10.06027px}a.pinit-button.default.jpibfi-size-small .jpibfi-icon-thumb-tack{font-size:17.28px}a.pinit-button.default.jpibfi-size-small .jpibfi-icon-thumb-tack:before{margin-top:-7.965px;margin-left:-5.535px}a.pinit-button.default.jpibfi-size-small .jpibfi-icon-pushpin{font-size:17.28px}a.pinit-button.default.jpibfi-size-small .jpibfi-icon-pushpin:before{margin-top:-8.64px;margin-left:-8.64px}a.pinit-button.default.jpibfi-size-small .jpibfi-icon-pinterest2{font-size:28.8px}a.pinit-button.default.jpibfi-size-small .jpibfi-icon-pinterest2:before{margin-top:-14.4px;margin-left:-14.4px}a.pinit-button.default.jpibfi-size-normal{height:54px}a.pinit-button.default.jpibfi-size-normal.jpibfi-button-round,a.pinit-button.default.jpibfi-size-normal.jpibfi-button-rounded-square,a.pinit-button.default.jpibfi-size-normal.jpibfi-button-square{width:54px}a.pinit-button.default.jpibfi-size-normal.jpibfi-button-rectangle,a.pinit-button.default.jpibfi-size-normal.jpibfi-button-rounded-rectangle{width:81px}a.pinit-button.default.jpibfi-size-normal .jpibfi-icon-circle{font-size:36px}a.pinit-button.default.jpibfi-size-normal .jpibfi-icon-circle:before{margin-top:-18px;margin-left:-15.46875px}a.pinit-button.default.jpibfi-size-normal .jpibfi-icon-plain{font-size:36px}a.pinit-button.default.jpibfi-size-normal .jpibfi-icon-plain:before{margin-top:-16.875px;margin-left:-12.57534px}a.pinit-button.default.jpibfi-size-normal .jpibfi-icon-thumb-tack{font-size:21.6px}a.pinit-button.default.jpibfi-size-normal .jpibfi-icon-thumb-tack:before{margin-top:-9.95625px;margin-left:-6.91875px}a.pinit-button.default.jpibfi-size-normal .jpibfi-icon-pushpin{font-size:21.6px}a.pinit-button.default.jpibfi-size-normal .jpibfi-icon-pushpin:before{margin-top:-10.8px;margin-left:-10.8px}a.pinit-button.default.jpibfi-size-normal .jpibfi-icon-pinterest2{font-size:36px}a.pinit-button.default.jpibfi-size-normal .jpibfi-icon-pinterest2:before{margin-top:-18px;margin-left:-18px}a.pinit-button.default.jpibfi-size-large{height:81px}a.pinit-button.default.jpibfi-size-large.jpibfi-button-round,a.pinit-button.default.jpibfi-size-large.jpibfi-button-rounded-square,a.pinit-button.default.jpibfi-size-large.jpibfi-button-square{width:81px}a.pinit-button.default.jpibfi-size-large.jpibfi-button-rectangle,a.pinit-button.default.jpibfi-size-large.jpibfi-button-rounded-rectangle{width:121.5px}a.pinit-button.default.jpibfi-size-large .jpibfi-icon-circle{font-size:54px}a.pinit-button.default.jpibfi-size-large .jpibfi-icon-circle:before{margin-top:-27px;margin-left:-23.20313px}a.pinit-button.default.jpibfi-size-large .jpibfi-icon-plain{font-size:54px}a.pinit-button.default.jpibfi-size-large .jpibfi-icon-plain:before{margin-top:-25.3125px;margin-left:-18.86301px}a.pinit-button.default.jpibfi-size-large .jpibfi-icon-thumb-tack{font-size:32.4px}a.pinit-button.default.jpibfi-size-large .jpibfi-icon-thumb-tack:before{margin-top:-14.93437px;margin-left:-10.37812px}a.pinit-button.default.jpibfi-size-large .jpibfi-icon-pushpin{font-size:32.4px}a.pinit-button.default.jpibfi-size-large .jpibfi-icon-pushpin:before{margin-top:-16.2px;margin-left:-16.2px}a.pinit-button.default.jpibfi-size-large .jpibfi-icon-pinterest2{font-size:54px}a.pinit-button.default.jpibfi-size-large .jpibfi-icon-pinterest2:before{margin-top:-27px;margin-left:-27px}a.pinit-button.default.jpibfi-button-rounded-rectangle,a.pinit-button.default.jpibfi-button-rounded-square{border-radius:10px}a.pinit-button.default.jpibfi-button-round{border-radius:50%}a.pinit-button.default [class*=" jpibfi-icon-"],a.pinit-button.default [class^=jpibfi-icon-]{color:#fff;display:block}a.pinit-button.default [class*=" jpibfi-icon-"]:hover,a.pinit-button.default [class^=jpibfi-icon-]:hover{color:#fff}a.pinit-button.default [class*=" jpibfi-icon-"]:before,a.pinit-button.default [class^=jpibfi-icon-]:before{display:block;position:absolute;top:50%;left:50%}@font-face{font-family:jpibfi-font;src:url(fonts/jpibfi-font.eot?ifsn2k);src:url(fonts/jpibfi-font.eot?ifsn2k#iefix) format("embedded-opentype"),url(fonts/jpibfi-font.ttf?ifsn2k) format("truetype"),url(fonts/jpibfi-font.woff?ifsn2k) format("woff"),url(fonts/jpibfi-font.svg?ifsn2k#jpibfi-font) format("svg");font-weight:400;font-style:normal}[class*=" jpibfi-icon-"],[class^=jpibfi-icon-]{font-family:jpibfi-font!important;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.jpibfi-icon-circle:before{content:""}.jpibfi-icon-plain:before{content:""}.jpibfi-icon-thumb-tack:before{content:""}.jpibfi-icon-pushpin:before{content:""}.jpibfi-icon-pinterest2:before{content:""}.frizzly-sortable li{cursor:move}input[type=checkbox]~label{padding-left:5px}input#custom_image_url{width:100%}div.checkbox-indented{margin-left:20px}table.jpibfi-inner-table td,table.jpibfi-inner-table th{max-width:350px}table.jpibfi-inner-table th{padding:5px;width:auto}table.jpibfi-inner-table td{vertical-align:top;padding:0 15px 0 10px}a.pinit-button{display:block;position:relative}
css/client.css CHANGED
@@ -1 +1 @@
1
- @charset "UTF-8";a.pinit-button.old_default,a.pinit-button.old_default span{height:41px!important;width:65px!important}a.pinit-button.default.jpibfi-size-small .jpibfi-icon-circle,a.pinit-button.default.jpibfi-size-small .jpibfi-icon-plain{font-size:28.8px}a.pinit-button.custom,a.pinit-button.old_default{text-indent:-9999em!important}a.pinit-button.custom span,a.pinit-button.old_default span{display:block;background-color:transparent!important;background-repeat:no-repeat!important;background-position:0 0!important}a.pinit-button.old_default span{background-image:url(images/pinit-button.png)!important;background-size:65px 41px!important}a.pinit-button.default{display:block;overflow:hidden;text-decoration:none;color:#fff;background-color:#bd081c}a.pinit-button.default:hover{background-color:#a50718}a.pinit-button.default.jpibfi-size-small{height:43.2px}a.pinit-button.default.jpibfi-size-small.jpibfi-button-round,a.pinit-button.default.jpibfi-size-small.jpibfi-button-rounded-square,a.pinit-button.default.jpibfi-size-small.jpibfi-button-square{width:43.2px}a.pinit-button.default.jpibfi-size-small.jpibfi-button-rectangle,a.pinit-button.default.jpibfi-size-small.jpibfi-button-rounded-rectangle{width:64.8px}a.pinit-button.default.jpibfi-size-small .jpibfi-icon-circle:before{margin-top:-14.4px;margin-left:-12.38px}a.pinit-button.default.jpibfi-size-small .jpibfi-icon-pushpin,a.pinit-button.default.jpibfi-size-small .jpibfi-icon-thumb-tack{font-size:17.28px}a.pinit-button.default.jpibfi-size-small .jpibfi-icon-plain:before{margin-top:-13.5px;margin-left:-10.06px}a.pinit-button.default.jpibfi-size-small .jpibfi-icon-thumb-tack:before{margin-top:-7.97px;margin-left:-5.54px}a.pinit-button.default.jpibfi-size-small .jpibfi-icon-pushpin:before{margin-top:-8.64px;margin-left:-8.64px}a.pinit-button.default.jpibfi-size-small .jpibfi-icon-pinterest2{font-size:28.8px}a.pinit-button.default.jpibfi-size-normal .jpibfi-icon-circle,a.pinit-button.default.jpibfi-size-normal .jpibfi-icon-plain{font-size:36px}a.pinit-button.default.jpibfi-size-small .jpibfi-icon-pinterest2:before{margin-top:-14.4px;margin-left:-14.4px}a.pinit-button.default.jpibfi-size-normal{height:54px}a.pinit-button.default.jpibfi-size-normal.jpibfi-button-round,a.pinit-button.default.jpibfi-size-normal.jpibfi-button-rounded-square,a.pinit-button.default.jpibfi-size-normal.jpibfi-button-square{width:54px}a.pinit-button.default.jpibfi-size-large.jpibfi-button-round,a.pinit-button.default.jpibfi-size-large.jpibfi-button-rounded-square,a.pinit-button.default.jpibfi-size-large.jpibfi-button-square,a.pinit-button.default.jpibfi-size-normal.jpibfi-button-rectangle,a.pinit-button.default.jpibfi-size-normal.jpibfi-button-rounded-rectangle{width:81px}a.pinit-button.default.jpibfi-size-normal .jpibfi-icon-circle:before{margin-top:-18px;margin-left:-15.47px}a.pinit-button.default.jpibfi-size-normal .jpibfi-icon-pushpin,a.pinit-button.default.jpibfi-size-normal .jpibfi-icon-thumb-tack{font-size:21.6px}a.pinit-button.default.jpibfi-size-normal .jpibfi-icon-plain:before{margin-top:-16.88px;margin-left:-12.58px}a.pinit-button.default.jpibfi-size-normal .jpibfi-icon-thumb-tack:before{margin-top:-9.96px;margin-left:-6.92px}a.pinit-button.default.jpibfi-size-normal .jpibfi-icon-pushpin:before{margin-top:-10.8px;margin-left:-10.8px}a.pinit-button.default.jpibfi-size-normal .jpibfi-icon-pinterest2{font-size:36px}a.pinit-button.default.jpibfi-size-large .jpibfi-icon-circle,a.pinit-button.default.jpibfi-size-large .jpibfi-icon-plain{font-size:54px}a.pinit-button.default.jpibfi-size-normal .jpibfi-icon-pinterest2:before{margin-top:-18px;margin-left:-18px}a.pinit-button.default.jpibfi-size-large{height:81px}a.pinit-button.default.jpibfi-size-large.jpibfi-button-rectangle,a.pinit-button.default.jpibfi-size-large.jpibfi-button-rounded-rectangle{width:121.5px}a.pinit-button.default.jpibfi-size-large .jpibfi-icon-circle:before{margin-top:-27px;margin-left:-23.2px}a.pinit-button.default.jpibfi-size-large .jpibfi-icon-pushpin,a.pinit-button.default.jpibfi-size-large .jpibfi-icon-thumb-tack{font-size:32.4px}a.pinit-button.default.jpibfi-size-large .jpibfi-icon-plain:before{margin-top:-25.31px;margin-left:-18.86px}a.pinit-button.default.jpibfi-size-large .jpibfi-icon-thumb-tack:before{margin-top:-14.93px;margin-left:-10.38px}a.pinit-button.default.jpibfi-size-large .jpibfi-icon-pushpin:before{margin-top:-16.2px;margin-left:-16.2px}a.pinit-button.default.jpibfi-size-large .jpibfi-icon-pinterest2{font-size:54px}a.pinit-button.default.jpibfi-size-large .jpibfi-icon-pinterest2:before{margin-top:-27px;margin-left:-27px}a.pinit-button.default.jpibfi-button-rounded-rectangle,a.pinit-button.default.jpibfi-button-rounded-square{border-radius:10px}a.pinit-button.default.jpibfi-button-round{border-radius:50%}a.pinit-button.default [class*=" jpibfi-icon-"],a.pinit-button.default [class^=jpibfi-icon-]{color:#fff;display:block}a.pinit-button.default [class*=" jpibfi-icon-"]:hover,a.pinit-button.default [class^=jpibfi-icon-]:hover{color:#fff}a.pinit-button.default [class*=" jpibfi-icon-"]:before,a.pinit-button.default [class^=jpibfi-icon-]:before{display:block;position:absolute;top:50%;left:50%}@font-face{font-family:jpibfi-font;src:url(fonts/jpibfi-font.eot?ifsn2k);src:url(fonts/jpibfi-font.eot?ifsn2k#iefix) format("embedded-opentype"),url(fonts/jpibfi-font.ttf?ifsn2k) format("truetype"),url(fonts/jpibfi-font.woff?ifsn2k) format("woff"),url(fonts/jpibfi-font.svg?ifsn2k#jpibfi-font) format("svg");font-weight:400;font-style:normal}[class*=" jpibfi-icon-"],[class^=jpibfi-icon-]{font-family:jpibfi-font!important;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.jpibfi-icon-circle:before{content:""}.jpibfi-icon-plain:before{content:""}.jpibfi-icon-thumb-tack:before{content:""}.jpibfi-icon-pushpin:before{content:""}.jpibfi-icon-pinterest2:before{content:""}a.pinit-button{position:absolute;display:none}
1
+ @charset "UTF-8";a.pinit-button.custom,a.pinit-button.old_default{text-indent:-9999em!important}a.pinit-button.custom span,a.pinit-button.old_default span{display:block;background-color:transparent!important;background-repeat:no-repeat!important;background-position:0 0!important}a.pinit-button.old_default{width:65px!important;height:41px!important}a.pinit-button.old_default span{height:41px!important;width:65px!important;background-image:url(images/pinit-button.png)!important;background-size:65px 41px!important}a.pinit-button.default{display:block;overflow:hidden;text-decoration:none;color:#fff;background-color:#bd081c}a.pinit-button.default:hover{background-color:#a50718}a.pinit-button.default.jpibfi-size-small{height:43.2px}a.pinit-button.default.jpibfi-size-small.jpibfi-button-round,a.pinit-button.default.jpibfi-size-small.jpibfi-button-rounded-square,a.pinit-button.default.jpibfi-size-small.jpibfi-button-square{width:43.2px}a.pinit-button.default.jpibfi-size-small.jpibfi-button-rectangle,a.pinit-button.default.jpibfi-size-small.jpibfi-button-rounded-rectangle{width:64.8px}a.pinit-button.default.jpibfi-size-small .jpibfi-icon-circle{font-size:28.8px}a.pinit-button.default.jpibfi-size-small .jpibfi-icon-circle:before{margin-top:-14.4px;margin-left:-12.375px}a.pinit-button.default.jpibfi-size-small .jpibfi-icon-plain{font-size:28.8px}a.pinit-button.default.jpibfi-size-small .jpibfi-icon-plain:before{margin-top:-13.5px;margin-left:-10.06027px}a.pinit-button.default.jpibfi-size-small .jpibfi-icon-thumb-tack{font-size:17.28px}a.pinit-button.default.jpibfi-size-small .jpibfi-icon-thumb-tack:before{margin-top:-7.965px;margin-left:-5.535px}a.pinit-button.default.jpibfi-size-small .jpibfi-icon-pushpin{font-size:17.28px}a.pinit-button.default.jpibfi-size-small .jpibfi-icon-pushpin:before{margin-top:-8.64px;margin-left:-8.64px}a.pinit-button.default.jpibfi-size-small .jpibfi-icon-pinterest2{font-size:28.8px}a.pinit-button.default.jpibfi-size-small .jpibfi-icon-pinterest2:before{margin-top:-14.4px;margin-left:-14.4px}a.pinit-button.default.jpibfi-size-normal{height:54px}a.pinit-button.default.jpibfi-size-normal.jpibfi-button-round,a.pinit-button.default.jpibfi-size-normal.jpibfi-button-rounded-square,a.pinit-button.default.jpibfi-size-normal.jpibfi-button-square{width:54px}a.pinit-button.default.jpibfi-size-normal.jpibfi-button-rectangle,a.pinit-button.default.jpibfi-size-normal.jpibfi-button-rounded-rectangle{width:81px}a.pinit-button.default.jpibfi-size-normal .jpibfi-icon-circle{font-size:36px}a.pinit-button.default.jpibfi-size-normal .jpibfi-icon-circle:before{margin-top:-18px;margin-left:-15.46875px}a.pinit-button.default.jpibfi-size-normal .jpibfi-icon-plain{font-size:36px}a.pinit-button.default.jpibfi-size-normal .jpibfi-icon-plain:before{margin-top:-16.875px;margin-left:-12.57534px}a.pinit-button.default.jpibfi-size-normal .jpibfi-icon-thumb-tack{font-size:21.6px}a.pinit-button.default.jpibfi-size-normal .jpibfi-icon-thumb-tack:before{margin-top:-9.95625px;margin-left:-6.91875px}a.pinit-button.default.jpibfi-size-normal .jpibfi-icon-pushpin{font-size:21.6px}a.pinit-button.default.jpibfi-size-normal .jpibfi-icon-pushpin:before{margin-top:-10.8px;margin-left:-10.8px}a.pinit-button.default.jpibfi-size-normal .jpibfi-icon-pinterest2{font-size:36px}a.pinit-button.default.jpibfi-size-normal .jpibfi-icon-pinterest2:before{margin-top:-18px;margin-left:-18px}a.pinit-button.default.jpibfi-size-large{height:81px}a.pinit-button.default.jpibfi-size-large.jpibfi-button-round,a.pinit-button.default.jpibfi-size-large.jpibfi-button-rounded-square,a.pinit-button.default.jpibfi-size-large.jpibfi-button-square{width:81px}a.pinit-button.default.jpibfi-size-large.jpibfi-button-rectangle,a.pinit-button.default.jpibfi-size-large.jpibfi-button-rounded-rectangle{width:121.5px}a.pinit-button.default.jpibfi-size-large .jpibfi-icon-circle{font-size:54px}a.pinit-button.default.jpibfi-size-large .jpibfi-icon-circle:before{margin-top:-27px;margin-left:-23.20313px}a.pinit-button.default.jpibfi-size-large .jpibfi-icon-plain{font-size:54px}a.pinit-button.default.jpibfi-size-large .jpibfi-icon-plain:before{margin-top:-25.3125px;margin-left:-18.86301px}a.pinit-button.default.jpibfi-size-large .jpibfi-icon-thumb-tack{font-size:32.4px}a.pinit-button.default.jpibfi-size-large .jpibfi-icon-thumb-tack:before{margin-top:-14.93437px;margin-left:-10.37812px}a.pinit-button.default.jpibfi-size-large .jpibfi-icon-pushpin{font-size:32.4px}a.pinit-button.default.jpibfi-size-large .jpibfi-icon-pushpin:before{margin-top:-16.2px;margin-left:-16.2px}a.pinit-button.default.jpibfi-size-large .jpibfi-icon-pinterest2{font-size:54px}a.pinit-button.default.jpibfi-size-large .jpibfi-icon-pinterest2:before{margin-top:-27px;margin-left:-27px}a.pinit-button.default.jpibfi-button-rounded-rectangle,a.pinit-button.default.jpibfi-button-rounded-square{border-radius:10px}a.pinit-button.default.jpibfi-button-round{border-radius:50%}a.pinit-button.default [class*=" jpibfi-icon-"],a.pinit-button.default [class^=jpibfi-icon-]{color:#fff;display:block}a.pinit-button.default [class*=" jpibfi-icon-"]:hover,a.pinit-button.default [class^=jpibfi-icon-]:hover{color:#fff}a.pinit-button.default [class*=" jpibfi-icon-"]:before,a.pinit-button.default [class^=jpibfi-icon-]:before{display:block;position:absolute;top:50%;left:50%}@font-face{font-family:jpibfi-font;src:url(fonts/jpibfi-font.eot?ifsn2k);src:url(fonts/jpibfi-font.eot?ifsn2k#iefix) format("embedded-opentype"),url(fonts/jpibfi-font.ttf?ifsn2k) format("truetype"),url(fonts/jpibfi-font.woff?ifsn2k) format("woff"),url(fonts/jpibfi-font.svg?ifsn2k#jpibfi-font) format("svg");font-weight:400;font-style:normal}[class*=" jpibfi-icon-"],[class^=jpibfi-icon-]{font-family:jpibfi-font!important;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.jpibfi-icon-circle:before{content:""}.jpibfi-icon-plain:before{content:""}.jpibfi-icon-thumb-tack:before{content:""}.jpibfi-icon-pushpin:before{content:""}.jpibfi-icon-pinterest2:before{content:""}a.pinit-button{position:absolute;display:none}
includes/public/class-jpibfi-client.php CHANGED
@@ -170,7 +170,10 @@ class JPIBFI_Client {
170
(function () {
171
if (!jQuery) return;
172
jQuery(document).ready(function () {
173
- jQuery('.jpibfi').closest('div').addClass('jpibfi_container');
174
});
175
})();
176
</script>
170
(function () {
171
if (!jQuery) return;
172
jQuery(document).ready(function () {
173
+ var $inputs = jQuery('.jpibfi');
174
+ var $closest = $inputs.closest('div, article');
175
+ $closest = $closest.length ? $closest : $inputs.parent();
176
+ $closest.addClass('jpibfi_container');
177
});
178
})();
179
</script>
jquery-pin-it-button-for-images.php CHANGED
@@ -6,7 +6,7 @@ Description: Highlights images on hover and adds a "Pin It" button over them for
6
Text Domain: jquery-pin-it-button-for-images
7
Domain Path: /languages
8
Author: Marcin Skrzypiec
9
- Version:2.3.0
10
Author URI: https://highfiveplugins.com/
11
*/
12
@@ -18,7 +18,7 @@ if ( !class_exists( 'jQuery_Pin_It_Button_For_Images' ) ) {
18
final class jQuery_Pin_It_Button_For_Images {
19
20
function __construct() {
21
- $version = '2.3.0';
22
require_once plugin_dir_path(__FILE__) . 'includes/jpibfi.php';
23
new JPIBFI(__FILE__, $version);
24
}
6
Text Domain: jquery-pin-it-button-for-images
7
Domain Path: /languages
8
Author: Marcin Skrzypiec
9
+ Version:2.3.1
10
Author URI: https://highfiveplugins.com/
11
*/
12
18
final class jQuery_Pin_It_Button_For_Images {
19
20
function __construct() {
21
+ $version = '2.3.1';
22
require_once plugin_dir_path(__FILE__) . 'includes/jpibfi.php';
23
new JPIBFI(__FILE__, $version);
24
}
js/jpibfi.admin.js CHANGED
@@ -1,20087 +1,13 @@
1
-
2
- (function() {
3
- var existingWindowDotAngular = window.angular;
4
- var angular = (window.angular = {});
5
- (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
6
- 'use strict';
7
-
8
- Object.defineProperty(exports, "__esModule", {
9
- value: true
10
- });
11
-
12
- var _app = require('./app.controller');
13
-
14
- var _app2 = _interopRequireDefault(_app);
15
-
16
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
-
18
- var AppComponent = {
19
- bindings: {
20
- settingsName: '@'
21
- },
22
- controller: _app2.default,
23
- template: '<navbar id="settings-navbar"\n tabs="$ctrl.config.tabs"\n page="$ctrl.config.page"\n links="$ctrl.config.links"\n current-tab="$ctrl.config.currentTab">\n </navbar>\n <form method="POST" enctype="multipart/form-data" id="jpibfi-form" action="{{ $ctrl.config.save.post_url }}">\n <input name="{{ ::$ctrl.config.save.action }}" value="{{ ::$ctrl.config.save.nonce }}" type="hidden" />\n <input name="{{ ::$ctrl.config.save.tab }}" value="{{ ::$ctrl.config.currentTab }}" type="hidden" />\n <select-editor\n ng-if="$ctrl.config.currentTab == \'select\'"\n settings="$ctrl.config.settings"\n i18n="$ctrl.config.i18n.editor">\n </select-editor>\n <visual-editor\n ng-if="$ctrl.config.currentTab == \'visual\'"\n settings="$ctrl.config.settings"\n i18n="$ctrl.config.i18n.editor">\n </visual-editor>\n <advanced-editor\n ng-if="$ctrl.config.currentTab == \'advanced\'"\n settings="$ctrl.config.settings"\n i18n="$ctrl.config.i18n.editor">\n </advanced-editor>\n <import-editor\n ng-if="$ctrl.config.currentTab == \'import\'"\n settings="$ctrl.config.settings"\n i18n="$ctrl.config.i18n.editor">\n </import-editor>\n <input ng-if="$ctrl.config.currentTab == \'select\' || $ctrl.config.currentTab == \'visual\' || $ctrl.config.currentTab == \'advanced\'" \n type="submit" class="button button-primary" value="{{ ::$ctrl.config.save.submit }}" /> \n </form>\n '
24
- };
25
-
26
- exports.default = AppComponent;
27
-
28
- },{"./app.controller":2}],2:[function(require,module,exports){
29
- 'use strict';
30
-
31
- Object.defineProperty(exports, "__esModule", {
32
- value: true
33
- });
34
-
35
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
36
-
37
- var _angular = require('angular');
38
-
39
- var _angular2 = _interopRequireDefault(_angular);
40
-
41
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
42
-
43
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
44
-
45
- var AppController = function () {
46
- function AppController(linkService) {
47
- _classCallCheck(this, AppController);
48
-
49
- this.linkService = linkService;
50
- this.config = {};
51
- this.settingsValue = {};
52
- }
53
-
54
- _createClass(AppController, [{
55
- key: '$onInit',
56
- value: function $onInit() {
57
- this.config = window[this.settingsName];
58
- this.linkService.init(this.config.page);
59
-
60
- _angular2.default.element('#jpibfi-error').css({ display: 'none' });
61
- }
62
- }]);
63
-
64
- return AppController;
65
- }();
66
-
67
- AppController.$inject = ['linkService'];
68
-
69
- exports.default = AppController;
70
-
71
- },{"angular":42}],3:[function(require,module,exports){
72
- 'use strict';
73
-
74
- Object.defineProperty(exports, "__esModule", {
75
- value: true
76
- });
77
-
78
- var _angular = require('angular');
79
-
80
- var _angular2 = _interopRequireDefault(_angular);
81
-
82
- var _angularSanitize = require('angular-sanitize');
83
-
84
- var _angularSanitize2 = _interopRequireDefault(_angularSanitize);
85
-
86
- var _ngFileUpload = require('ng-file-upload');
87
-
88
- var _ngFileUpload2 = _interopRequireDefault(_ngFileUpload);
89
-
90
- var _angularDragAndDropLists = require('angular-drag-and-drop-lists');
91
-
92
- var _angularDragAndDropLists2 = _interopRequireDefault(_angularDragAndDropLists);
93
-
94
- var _app = require('./app.component');
95
-
96
- var _app2 = _interopRequireDefault(_app);
97
-
98
- var _components = require('./components/components');
99
-
100
- var _components2 = _interopRequireDefault(_components);
101
-
102
- var _components3 = require('./common/components');
103
-
104
- var _components4 = _interopRequireDefault(_components3);
105
-
106
- var _services = require('./services');
107
-
108
- var _services2 = _interopRequireDefault(_services);
109
-
110
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
111
-
112
-
113
- var root = _angular2.default.module('jpibfi', [_angularSanitize2.default, _ngFileUpload2.default, _components2.default, _components4.default, _services2.default]).component('jpibfi', _app2.default).name;
114
-
115
- exports.default = root;
116
-
117
- },{"./app.component":1,"./common/components":8,"./components/components":18,"./services":35,"angular":42,"angular-drag-and-drop-lists":38,"angular-sanitize":40,"ng-file-upload":44}],4:[function(require,module,exports){
118
- 'use strict';
119
-
120
- Object.defineProperty(exports, "__esModule", {
121
- value: true
122
- });
123
-
124
- var _base = require('./../base.controller');
125
-
126
- var _base2 = _interopRequireDefault(_base);
127
-
128
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
129
-
130
- var AdvancedComponent = {
131
- bindings: {
132
- settings: '<',
133
- i18n: '<'
134
- },
135
- controller: _base2.default,
136
- template: '\n <h2>{{ $ctrl.i18n.title }}</h2>\n <table class="form-table">\n <tbody>\n <tr>\n <th>{{ ::$ctrl.i18n.filters_label }}</th>\n <td>\n <p>\n <filter name="$ctrl.settings.filter_the_content_on" priority="$ctrl.settings.filter_the_content_priority"\n update="$ctrl.update($event)" template="$ctrl.i18n.filter_template">\n </filter>\n </p>\n <p>\n <filter name="$ctrl.settings.filter_the_excerpt_on" priority="$ctrl.settings.filter_the_excerpt_priority"\n update="$ctrl.update($event)" template="$ctrl.i18n.filter_template">\n </filter>\n </p>\n <p>\n <filter name="$ctrl.settings.filter_post_thumbnail_html_on" priority="$ctrl.settings.filter_post_thumbnail_html_priority"\n update="$ctrl.update($event)" template="$ctrl.i18n.filter_template">\n </filter>\n </p>\n <p class="description" ng-bind-html="$ctrl.i18n.filters_description"></p>\n </td>\n </tr>\n </tbody>\n </table>\n '
137
- };
138
-
139
- exports.default = AdvancedComponent;
140
-
141
- },{"./../base.controller":7}],5:[function(require,module,exports){
142
- 'use strict';
143
-
144
- Object.defineProperty(exports, "__esModule", {
145
- value: true
146
- });
147
-
148
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
149
-
150
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
151
-
152
- var FilterDirective = function () {
153
- function FilterDirective($compile) {
154
- _classCallCheck(this, FilterDirective);
155
-
156
- this.$compile = $compile;
157
- this.restrict = 'E';
158
- this.scope = {
159
- name: '=',
160
- priority: '=',
161
- template: '=',
162
- update: '&'
163
- };
164
- }
165
-
166
- _createClass(FilterDirective, [{
167
- key: 'link',
168
- value: function link($scope, $element, $attrs) {
169
- var template = $scope.template;
170
- var html = template.replace('%name%', '<editor-checkbox args="name" on-update="update({ $event })" add-br="false"></editor-checkbox>').replace('%priority%', '<editor-number args="priority" on-update="update({ $event })"></editor-number>');
171
- $element.html(html);
172
- this.$compile($element.contents())($scope);
173
- }
174
- }]);
175
-
176
- return FilterDirective;
177
- }();
178
-
179
- exports.default = FilterDirective;
180
-
181
- },{}],6:[function(require,module,exports){
182
- 'use strict';
183
-
184
- Object.defineProperty(exports, "__esModule", {
185
- value: true
186
- });
187
-
188
- var _angular = require('angular');
189
-
190
- var _angular2 = _interopRequireDefault(_angular);
191
-
192
- var _filter = require('./filter.directive');
193
-
194
- var _filter2 = _interopRequireDefault(_filter);
195
-
196
- var _advanced = require('./advanced.component');
197
-
198
- var _advanced2 = _interopRequireDefault(_advanced);
199
-
200
- var _components = require('./../../components/components');
201
-
202
- var _components2 = _interopRequireDefault(_components);
203
-
204
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
205
-
206
- var advanced = _angular2.default.module('app.common.advanced', [_components2.default]).directive('filter', ['$compile', function ($compile) {
207
- return new _filter2.default($compile);
208
- }]).component('advancedEditor', _advanced2.default).name;
209
-
210
- exports.default = advanced;
211
-
212
- },{"./../../components/components":18,"./advanced.component":4,"./filter.directive":5,"angular":42}],7:[function(require,module,exports){
213
- "use strict";
214
-
215
- Object.defineProperty(exports, "__esModule", {
216
- value: true
217
- });
218
-
219
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
220
-
221
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
222
-
223
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
224
-
225
- var BaseController = function () {
226
- function BaseController() {
227
- _classCallCheck(this, BaseController);
228
- }
229
-
230
- _createClass(BaseController, [{
231
- key: "$onChanges",
232
- value: function $onChanges(changes) {
233
- var _this = this;
234
-
235
- if (changes.settings) {
236
- this.settings = _extends({}, this.settings);
237
- this.values = Object.keys(this.settings).reduce(function (prev, key) {
238
- prev[key] = _this.settings[key].value;
239
- return prev;
240
- }, {});
241
- }
242
- }
243
- }, {
244
- key: "update",
245
- value: function update(_ref) {
246
- var key = _ref.key,
247
- value = _ref.value;
248
-
249
- this.values[key] = value;
250
- }
251
- }, {
252
- key: "updateValue",
253
- value: function updateValue(key, value) {
254
- this.settings[key] = _extends({}, this.settings[key], { value: value });
255
- this.values[key] = value;
256
- }
257
- }]);
258
-
259
- return BaseController;
260
- }();
261
-
262
- exports.default = BaseController;
263
-
264
- },{}],8:[function(require,module,exports){
265
- 'use strict';
266
-
267
- Object.defineProperty(exports, "__esModule", {
268
- value: true
269
- });
270
-
271
- var _angular = require('angular');
272
-
273
- var _angular2 = _interopRequireDefault(_angular);
274
-
275
- var _select = require('./select');
276
-
277
- var _select2 = _interopRequireDefault(_select);
278
-
279
- var _visual = require('./visual');
280
-
281
- var _visual2 = _interopRequireDefault(_visual);
282
-
283
- var _import = require('./import');
284
-
285
- var _import2 = _interopRequireDefault(_import);
286
-
287
- var _advanced = require('./advanced');
288
-
289
- var _advanced2 = _interopRequireDefault(_advanced);
290
-
291
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
292
-
293
- var components = _angular2.default.module('app.common', [_select2.default, _visual2.default, _import2.default, _advanced2.default]).name;
294
-
295
- exports.default = components;
296
-
297
- },{"./advanced":6,"./import":11,"./select":12,"./visual":15,"angular":42}],9:[function(require,module,exports){
298
- 'use strict';
299
-
300
- Object.defineProperty(exports, "__esModule", {
301
- value: true
302
- });
303
-
304
- var _import = require('./import.controller');
305
-
306
- var _import2 = _interopRequireDefault(_import);
307
-
308
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
309
-
310
- var ImportComponent = {
311
- bindings: {
312
- i18n: '<'
313
- },
314
- require: {
315
- form: '^form'
316
- },
317
- controller: _import2.default,
318
- template: '\n <h2>{{ ::$ctrl.i18n.title }}</h2>\n <table class="form-table">\n <tbody>\n <tr>\n <th><label>{{ ::$ctrl.i18n.export_title }}</label></th>\n <td>\n <a href="{{ ::$ctrl.i18n.export_url }}" class="button button-default">\n {{ ::$ctrl.i18n.export_button_text }}\n </a>\n </td>\n </tr>\n <tr>\n <th><label>{{ ::$ctrl.i18n.import_title }}</label></th>\n <td>\n <input type="file" name="import" ng-change="$ctrl.upload()" ng-model="$ctrl.file" ngf-accept="\'.json\'"\n ngf-select="$ctrl.upload()" ngf-max-size="1MB" />\n </td>\n </tr>\n </tbody>\n </table>\n '
319
- };
320
-
321
- exports.default = ImportComponent;
322
-
323
- },{"./import.controller":10}],10:[function(require,module,exports){
324
- 'use strict';
325
-
326
- Object.defineProperty(exports, "__esModule", {
327
- value: true
328
- });
329
-
330
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
331
-
332
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
333
-
334
- var ImportController = function () {
335
- function ImportController(Upload) {
336
- _classCallCheck(this, ImportController);
337
-
338
- this.Upload = Upload;
339
- }
340
-
341
- _createClass(ImportController, [{
342
- key: 'upload',
343
- value: function upload() {
344
- document.getElementById('jpibfi-form').submit();
345
- }
346
- }]);
347
-
348
- return ImportController;
349
- }();
350
-
351
- ImportController.$inject = ['Upload'];
352
-
353
- exports.default = ImportController;
354
-
355
- },{}],11:[function(require,module,exports){
356
- 'use strict';
357
-
358
- Object.defineProperty(exports, "__esModule", {
359
- value: true
360
- });
361
-
362
- var _angular = require('angular');
363
-
364
- var _angular2 = _interopRequireDefault(_angular);
365
-
366
- var _import = require('./import.component');
367
-
368
- var _import2 = _interopRequireDefault(_import);
369
-
370
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
371
-
372
- var importComponentName = _angular2.default.module('app.common.import', []).component('importEditor', _import2.default).name;
373
-
374
- exports.default = importComponentName;
375
-
376
- },{"./import.component":9,"angular":42}],12:[function(require,module,exports){
377
- 'use strict';
378
-
379
- Object.defineProperty(exports, "__esModule", {
380
- value: true
381
- });
382
-
383
- var _angular = require('angular');
384
-
385
- var _angular2 = _interopRequireDefault(_angular);
386
-
387
- var _resolution = require('./resolution.directive');
388
-
389
- var _resolution2 = _interopRequireDefault(_resolution);
390
-
391
- var _select = require('./select.component');
392
-
393
- var _select2 = _interopRequireDefault(_select);
394
-
395
- var _components = require('./../../components/components');
396
-
397
- var _components2 = _interopRequireDefault(_components);
398
-
399
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
400
-
401
- var select = _angular2.default.module('app.common.select', [_components2.default]).directive('resolution', ['$compile', function ($compile) {
402
- return new _resolution2.default($compile);
403
- }]).component('selectEditor', _select2.default).name;
404
-
405
- exports.default = select;
406
-
407
- },{"./../../components/components":18,"./resolution.directive":13,"./select.component":14,"angular":42}],13:[function(require,module,exports){
408
- 'use strict';
409
-
410
- Object.defineProperty(exports, "__esModule", {
411
- value: true
412
- });
413
-
414
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
415
-
416
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
417
-
418
- var ResolutionDirective = function () {
419
- function ResolutionDirective($compile) {
420
- _classCallCheck(this, ResolutionDirective);
421
-
422
- this.$compile = $compile;
423
- this.restrict = 'E';
424
- this.scope = {
425
- height: '=',
426
- width: '=',
427
- template: '=',
428
- update: '&'
429
- };
430
- }
431
-
432
- _createClass(ResolutionDirective, [{
433
- key: 'link',
434
- value: function link($scope, $element, $attrs) {
435
- var template = $scope.template;
436
- var html = template.replace('%height%', '<editor-number args="height" on-update="update({ $event })"></editor-number>').replace('%width%', '<editor-number args="width" on-update="update({ $event })"></editor-number>');
437
- $element.html(html);
438
- this.$compile($element.contents())($scope);
439
- }
440
- }]);
441
-
442
- return ResolutionDirective;
443
- }();
444
-
445
- exports.default = ResolutionDirective;
446
-
447
- },{}],14:[function(require,module,exports){
448
- 'use strict';
449
-
450
- Object.defineProperty(exports, "__esModule", {
451
- value: true
452
- });
453
-
454
- var _base = require('./../base.controller');
455
-
456
- var _base2 = _interopRequireDefault(_base);
457
-
458
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
459
-
460
- var SelectComponent = {
461
- bindings: {
462
- settings: '<',
463
- i18n: '<'
464
- },
465
- controller: _base2.default,
466
- template: '\n <h2>{{ $ctrl.i18n.title }}</h2>\n <table class="form-table">\n <tbody>\n <tr>\n <th><label for="image_selector">{{ ::$ctrl.settings.image_selector.label }}</label></th>\n <td>\n <editor-textarea args="$ctrl.settings.image_selector" on-update="$ctrl.update($event)"></editor-textarea>\n <p class="description" ng-bind-html="$ctrl.settings.image_selector.desc"></p>\n </td>\n </tr>\n <tr>\n <th><label for="disabled_classes">{{ ::$ctrl.settings.disabled_classes.label }}</label></th>\n <td>\n <editor-text args="$ctrl.settings.disabled_classes" on-update="$ctrl.update($event)"></editor-text>\n <p class="description" ng-bind-html="$ctrl.settings.disabled_classes.desc"></p>\n </td>\n </tr>\n <tr>\n <th><label for="enabled_classes">{{ ::$ctrl.settings.enabled_classes.label }}</label></th>\n <td>\n <editor-text args="$ctrl.settings.enabled_classes" on-update="$ctrl.update($event)"></editor-text>\n <p class="description" ng-bind-html="$ctrl.settings.enabled_classes.desc"></p>\n </td>\n </tr>\n <tr>\n <th>{{ ::$ctrl.i18n.image_resolution_label }}</th>\n <td>\n <p>\n <resolution height="$ctrl.settings.min_image_height_small" width="$ctrl.settings.min_image_width_small"\n update="$ctrl.update($event)" template="$ctrl.i18n.min_resolution_template_small">\n </resolution>\n </p>\n <p>\n <resolution height="$ctrl.settings.min_image_height" width="$ctrl.settings.min_image_width"\n update="$ctrl.update($event)" template="$ctrl.i18n.min_resolution_template">\n </resolution>\n </p>\n <p class="description" ng-bind-html="$ctrl.i18n.image_resolution_desc"></p>\n <p class="description" ng-bind-html="$ctrl.i18n.image_resolution_desc_2"></p>\n </td>\n </tr>\n <tr>\n <th>{{ ::$ctrl.i18n.show_on_field_label }}</th>\n <td>\n <p>\n <label for="show_on">{{ ::$ctrl.settings.show_on.label }}:</label><br/>\n <editor-textarea args="$ctrl.settings.show_on" on-update="$ctrl.update($event)"></editor-text>\n </p>\n <p>\n <label for="disable_on">{{ ::$ctrl.settings.disable_on.label }}:</label><br/>\n <editor-textarea args="$ctrl.settings.disable_on" on-update="$ctrl.update($event)"></editor-text>\n </p>\n <p class="description" ng-bind-html="$ctrl.i18n.show_on_field_desc"></p>\n </td>\n </tr>\n </tbody>\n </table>\n '
467
- };
468
-
469
- exports.default = SelectComponent;
470
-
471
- },{"./../base.controller":7}],15:[function(require,module,exports){
472
- 'use strict';
473
-
474
- Object.defineProperty(exports, "__esModule", {
475
- value: true
476
- });
477
-
478
- var _angular = require('angular');
479
-
480
- var _angular2 = _interopRequireDefault(_angular);
481
-
482
- var _visual = require('./visual.component');
483
-
484
- var _visual2 = _interopRequireDefault(_visual);
485
-
486
- var _components = require('./../../components/components');
487
-
488
- var _components2 = _interopRequireDefault(_components);
489
-
490
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
491
-
492
- var visual = _angular2.default.module('app.common.visual', [_components2.default]).component('visualEditor', _visual2.default).name;
493
-
494
- exports.default = visual;
495
-
496
- },{"./../../components/components":18,"./visual.component":16,"angular":42}],16:[function(require,module,exports){
497
- 'use strict';
498
-
499
- Object.defineProperty(exports, "__esModule", {
500
- value: true
501
- });
502
-
503
- var _visual = require('./visual.controller');
504
-
505
- var _visual2 = _interopRequireDefault(_visual);
506
-
507
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
508
-
509
- var VisualComponent = {
510
- bindings: {
511
- settings: '<',
512
- i18n: '<'
513
- },
514
- controller: _visual2.default,
515
- template: '\n <h2>{{ $ctrl.i18n.title }}</h2>\n <table class="form-table">\n <tbody>\n <tr>\n <th><label for="show_button">{{ ::$ctrl.settings.show_button.label }}</label></th>\n <td>\n <editor-select args="$ctrl.settings.show_button" on-update="$ctrl.update($event)"></editor-select>\n <p class="description" ng-bind-html="$ctrl.settings.show_button.desc"></p>\n <p ng-if="$ctrl.values.show_button != \'hover\'">\n <b ng-bind-html="$ctrl.i18n.pro_feature_error"></b>\n </p>\n </td>\n </tr>\n <tr>\n <th><label>{{ ::$ctrl.settings.description_option.label }}</label></th>\n <td>\n <editor-sortable-select args="$ctrl.settings.description_option" on-update="$ctrl.update($event)"></editor-sortable-select>\n <p class="description" ng-bind-html="$ctrl.settings.description_option.desc"></p>\n </td>\n </tr>\n <tr>\n <th><label for="pinLinkedImages">{{ ::$ctrl.settings.pinLinkedImages.label }}</label></th>\n <td>\n <editor-checkbox args="$ctrl.settings.pinLinkedImages" on-update="$ctrl.update($event)"></editor-checkbox>\n <p class="description" ng-bind-html="$ctrl.settings.pinLinkedImages.desc"></p>\n </td>\n </tr>\n <tr>\n <th><label for="transparency_value">{{ ::$ctrl.settings.transparency_value.label }}</label></th>\n <td>\n <editor-number args="$ctrl.settings.transparency_value" on-update="$ctrl.update($event)"></editor-number>\n <p class="description" ng-bind-html="$ctrl.settings.transparency_value.desc"></p>\n </td>\n </tr>\n <tr>\n <th><label>{{ ::$ctrl.settings.pin_image.label }}</label></th>\n <td>\n <table class="jpibfi-inner-table">\n <tr>\n <th>{{ ::$ctrl.i18n.mode }}</th>\n <th ng-if="$ctrl.values.pin_image != \'old_default\'">{{ ::$ctrl.i18n.settings }}</th>\n <th>{{ ::$ctrl.i18n.preview }}</th>\n </tr>\n <tr>\n <td>\n <p><label><input type="radio" name="{{ ::$ctrl.settings.pin_image.key }}" ng_model="$ctrl.values.pin_image" value="old_default">{{ ::$ctrl.settings.pin_image.options[\'old_default\'] }}</label></p>\n <p><label><input type="radio" name="{{ ::$ctrl.settings.pin_image.key }}" ng_model="$ctrl.values.pin_image" value="default">{{ ::$ctrl.settings.pin_image.options[\'default\'] }}</label></p>\n <p><label><input type="radio" name="{{ ::$ctrl.settings.pin_image.key }}" ng_model="$ctrl.values.pin_image" value="custom">{{ ::$ctrl.settings.pin_image.options[\'custom\'] }}</label></p>\n </td>\n <td ng-if="$ctrl.values.pin_image != \'old_default\'">\n <div ng-show="$ctrl.values.pin_image == \'default\'">\n <p>\n <label for="pin_image_icon">{{ ::$ctrl.settings.pin_image_icon.label }}</label>\n <editor-select args="$ctrl.settings.pin_image_icon" on-update="$ctrl.update($event)"></editor-select>\n <p ng-if="$ctrl.values.pin_image_icon != \'circle\'">\n <b ng-bind-html="$ctrl.i18n.pro_feature_error"></b>\n </p>\n </p>\n <p>\n <label for="pin_image_size">{{ ::$ctrl.settings.pin_image_size.label }}</label>\n <editor-select args="$ctrl.settings.pin_image_size" on-update="$ctrl.update($event)"></editor-select>\n </p>\n <p>\n <label for="pin_image_button">{{ ::$ctrl.settings.pin_image_button.label }}</label>\n <editor-select args="$ctrl.settings.pin_image_button" on-update="$ctrl.update($event)"></editor-select>\n </p>\n </div>\n <div ng-if="$ctrl.values.pin_image == \'custom\'">\n <p><button type="button" class="button button-default" ng-click="$ctrl.upload()">{{ ::$ctrl.i18n.custom_button_upload }}</button></p>\n <p>\n <label for="custom_image_url">{{ ::$ctrl.settings.custom_image_url.label }}</label>\n <editor-text args="$ctrl.settings.custom_image_url" on-update="$ctrl.update($event)"></editor-text>\n </p>\n <p>\n <div style="display: inline-block; width: 49%;">\n <label for="custom_image_height">{{ ::$ctrl.settings.custom_image_height.label }}</label>\n <editor-number args="$ctrl.settings.custom_image_height" on-update="$ctrl.update($event)"></editor-number>\n </div>\n <div style="display: inline-block; width: 49%;">\n <label for="custom_image_width">{{ ::$ctrl.settings.custom_image_width.label }}</label>\n <editor-number args="$ctrl.settings.custom_image_width" on-update="$ctrl.update($event)"></editor-number>\n </div>\n </p>\n <p class="description" ng-bind-html="$ctrl.i18n.custom_button_desc"></p>\n </div>\n </td>\n <td>\n <div ng-if="$ctrl.values.pin_image == \'old_default\'">\n <a class="pinit-button old_default"><span></span></a>\n </div>\n <div ng-show="$ctrl.values.pin_image == \'default\'">\n <a class="pinit-button default" ng-class="[\'jpibfi-size-\' + $ctrl.values.pin_image_size, \'jpibfi-button-\' + $ctrl.values.pin_image_button]">\n <span ng-class="[\'jpibfi-icon-\' + $ctrl.values.pin_image_icon]"></span>\n </a>\n </div>\n <div ng-show="$ctrl.values.pin_image == \'custom\'">\n <div ng-if="$ctrl.values.custom_image_url">\n <div style="width: {{ $ctrl.values.custom_image_width }}px;\n height: {{ $ctrl.values.custom_image_height }}px;\n background-image: url(\'{{ $ctrl.values.custom_image_url }}\');">\n </div>\n </div>\n <div ng-if="!$ctrl.values.custom_image_url">\n {{ ::$ctrl.i18n.custom_button_no_image_to_preview }}\n </div>\n </div>\n </td>\n </tr>\n </table>\n </tr>\n <tr>\n <th><label for="button_position">{{ ::$ctrl.settings.button_position.label }}</label></th>\n <td>\n <editor-select args="$ctrl.settings.button_position" on-update="$ctrl.update($event)"></editor-select>\n <p class="description" ng-bind-html="$ctrl.settings.button_position.desc"></p>\n </td>\n </tr>\n <tr>\n <th><label>{{ ::$ctrl.i18n.margins_label }}</label></th>\n <td>\n <p>\n <label for="button_margin_top">{{ ::$ctrl.settings.button_margin_top.label }}</label>\n <editor-number ng-disabled="!$ctrl.marginAvailability.top" args="$ctrl.settings.button_margin_top" on-update="$ctrl.update($event)">\n </editor-number>\n </p>\n <p>\n <label for="button_margin_bottom">{{ ::$ctrl.settings.button_margin_bottom.label }}</label>\n <editor-number ng-disabled="!$ctrl.marginAvailability.bottom" args="$ctrl.settings.button_margin_bottom" on-update="$ctrl.update($event)">\n </editor-number>\n </p>\n <p>\n <label for="button_margin_left">{{ ::$ctrl.settings.button_margin_left.label }}</label>\n <editor-number ng-disabled="!$ctrl.marginAvailability.left" args="$ctrl.settings.button_margin_left" on-update="$ctrl.update($event)">\n </editor-number>\n </p>\n <p>\n <label for="button_margin_right">{{ ::$ctrl.settings.button_margin_right.label }}</label>\n <editor-number ng-disabled="!$ctrl.marginAvailability.right" args="$ctrl.settings.button_margin_right" on-update="$ctrl.update($event)">\n </editor-number>\n </p>\n <p class="description" ng-bind-html="$ctrl.i18n.margins_desc"></p>\n </td>\n </tr>\n </tbody>\n </table>\n <p ng-bind-html="$ctrl.i18n.attribution"></p>\n '
516
- };
517
-
518
- exports.default = VisualComponent;
519
-
520
- },{"./visual.controller":17}],17:[function(require,module,exports){
521
- 'use strict';
522
-
523
- Object.defineProperty(exports, "__esModule", {
524
- value: true
525
- });
526
-
527
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
528
-
529
- var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
530
-
531
- var _base = require('./../base.controller');
532
-
533
- var _base2 = _interopRequireDefault(_base);
534
-
535
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
536
-
537
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
538
-
539
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
540
-
541
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
542
-
543
- var VisualController = function (_BaseController) {
544
- _inherits(VisualController, _BaseController);
545
-
546
- function VisualController($scope) {
547
- _classCallCheck(this, VisualController);
548
-
549
- var _this = _possibleConstructorReturn(this, (VisualController.__proto__ || Object.getPrototypeOf(VisualController)).call(this));
550
-
551
- _this.$scope = $scope;
552
- _this.fileFrame = null;
553
- return _this;
554
- }
555
-
556
- _createClass(VisualController, [{
557
- key: '$onChanges',
558
- value: function $onChanges(changes) {
559
- _get(VisualController.prototype.__proto__ || Object.getPrototypeOf(VisualController.prototype), '$onChanges', this).call(this, changes);
560
- this.updateMarginAvailability();
561
- }
562
- }, {
563
- key: 'update',
564
- value: function update(_ref) {
565
- var key = _ref.key,
566
- value = _ref.value;
567
-
568
- this.values[key] = value;
569
- if (key === 'button_position') {
570
- this.updateMarginAvailability();
571
- }
572
- }
573
- }, {
574
- key: 'updateMarginAvailability',
575
- value: function updateMarginAvailability() {
576
- var btnPosition = this.values.button_position;
577
- this.marginAvailability = {
578
- top: btnPosition === 'top-left' || btnPosition === 'top-right',
579
- bottom: btnPosition === 'bottom-left' || btnPosition === 'bottom-right',
580
- left: btnPosition === 'top-left' || btnPosition === 'bottom-left',
581
- right: btnPosition === 'top-right' || btnPosition === 'bottom-right'
582
- };
583
- }
584
- }, {
585
- key: 'upload',
586
- value: function upload($event) {
587
- var _this2 = this;
588
-
589
- if (this.fileFrame) {
590
- this.fileFrame.open();
591
- return;
592
- }
593
-
594
- this.fileFrame = wp.media.frames.file_frame = wp.media({
595
- title: this.i18n.custom_button_frame_title,
596
- button: {
597
- text: this.i18n.custom_button_frame_button_text
598
- },
599
- multiple: false
600
- }).on('select', function () {
601
- var image = _this2.fileFrame.state().get('selection').first().toJSON();
602
- _this2.updateValue('custom_image_url', image.url);
603
- _this2.updateValue('custom_image_width', image.width);
604
- _this2.updateValue('custom_image_height', image.height);
605
- _this2.$scope.$digest();
606
- });
607
-
608
- this.fileFrame.open();
609
- }
610
- }]);
611
-
612
- return VisualController;
613
- }(_base2.default);
614
-
615
- VisualController.$inject = ['$scope'];
616
-
617
- exports.default = VisualController;
618
-
619
- },{"./../base.controller":7}],18:[function(require,module,exports){
620
- 'use strict';
621
-
622
- Object.defineProperty(exports, "__esModule", {
623
- value: true
624
- });
625
-
626
- var _angular = require('angular');
627
-
628
- var _angular2 = _interopRequireDefault(_angular);
629
-
630
- var _navbar = require('./navbar');
631
-
632
- var _navbar2 = _interopRequireDefault(_navbar);
633
-
634
- var _editors = require('./editors');
635
-
636
- var _editors2 = _interopRequireDefault(_editors);
637
-
638
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
639
-
640
- var components = _angular2.default.module('app.components', [_navbar2.default, _editors2.default]).name;
641
-
642
- exports.default = components;
643
-
644
- },{"./editors":32,"./navbar":33,"angular":42}],19:[function(require,module,exports){
645
- 'use strict';
646
-
647
- Object.defineProperty(exports, "__esModule", {
648
- value: true
649
- });
650
-
651
- var _editorCheckbox = require('./editor.checkbox.controller');
652
-
653
- var _editorCheckbox2 = _interopRequireDefault(_editorCheckbox);
654
-
655
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
656
-
657
- var EditorCheckboxComponent = {
658
- bindings: {
659
- args: '<',
660
- onUpdate: '&',
661
- addBr: '<?'
662
- },
663
- controller: _editorCheckbox2.default,
664
- template: '<input type="checkbox" ng-change="$ctrl.change()" name="{{ ::$ctrl.key }}" id="{{ ::$ctrl.key }}" ng-model="$ctrl.value">\n <label for="{{ ::$ctrl.key }}">{{ ::$ctrl.args.text }}</label>\n <span ng-if="$ctrl.args.tooltip" tooltips tooltip-template="{{ ::$ctrl.args.tooltip }}" class="dashicons dashicons-editor-help"></span>\n <br ng-if="$ctrl.addBr" />'
665
- };
666
-
667
- exports.default = EditorCheckboxComponent;
668
-
669
- },{"./editor.checkbox.controller":20}],20:[function(require,module,exports){
670
- 'use strict';
671
-
672
- Object.defineProperty(exports, "__esModule", {
673
- value: true
674
- });
675
-
676
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
677
-
678
- var _editor = require('./editor.controller');
679
-
680
- var _editor2 = _interopRequireDefault(_editor);
681
-
682
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
683
-
684
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
685
-
686
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
687
-
688
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
689
-
690
- var EditorCheckboxController = function (_controller) {
691
- _inherits(EditorCheckboxController, _controller);
692
-
693
- function EditorCheckboxController() {
694
- _classCallCheck(this, EditorCheckboxController);
695
-
696
- return _possibleConstructorReturn(this, (EditorCheckboxController.__proto__ || Object.getPrototypeOf(EditorCheckboxController)).apply(this, arguments));
697
- }
698
-
699
- _createClass(EditorCheckboxController, [{
700
- key: '$onInit',
701
- value: function $onInit() {
702
- if (undefined === this.addBr) {
703
- this.addBr = true;
704
- }
705
- }
706
- }]);
707
-
708
- return EditorCheckboxController;
709
- }(_editor2.default);
710
-
711
- exports.default = EditorCheckboxController;
712
-
713
- },{"./editor.controller":21}],21:[function(require,module,exports){
714
- "use strict";
715
-
716
- Object.defineProperty(exports, "__esModule", {
717
- value: true
718
- });
719
-
720
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
721
-
722
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
723
-
724
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
725
-
726
- var EditorController = function () {
727
- function EditorController() {
728
- _classCallCheck(this, EditorController);
729
- }
730
-
731
- _createClass(EditorController, [{
732
- key: "$onChanges",
733
- value: function $onChanges(changes) {
734
- if (changes.args) {
735
- this.args = _extends({}, this.args);
736
- this.key = this.args.key;
737
- this.value = this.args.value;
738
- }
739
- }
740
- }, {
741
- key: "change",
742
- value: function change() {
743
- this.onUpdate({
744
- $event: {
745
- key: this.key,
746
- value: this.value
747
- }
748
- });
749
- }
750
- }]);
751
-
752
- return EditorController;
753
- }();
754
-
755
- EditorController.$inject = [];
756
-
757
- exports.default = EditorController;
758
-
759
- },{}],22:[function(require,module,exports){
760
- 'use strict';
761
-
762
- Object.defineProperty(exports, "__esModule", {
763
- value: true
764
- });
765
-
766
- var _editorImage = require('./editor.image.controller');
767
-
768
- var _editorImage2 = _interopRequireDefault(_editorImage);
769
-
770
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
771
-
772
- var EditorImageComponent = {
773
- bindings: {
774
- args: '<',
775
- onUpdate: '&',
776
- class: '@'
777
- },
778
- controller: _editorImage2.default,
779
- template: '<input type="text" id="{{ $ctrl.key }}" name="{{ ::$ctrl.args.key }}" ng-model="$ctrl.value" ng-change="$ctrl.change()" class="regular-text" />\n<input type="button" class="button" value="{{ ::$ctrl.args.button_text }}" ng-click="$ctrl.selectFile()" />'
780
- };
781
-
782
- exports.default = EditorImageComponent;
783
-
784
- },{"./editor.image.controller":23}],23:[function(require,module,exports){
785
- 'use strict';
786
-
787
- Object.defineProperty(exports, "__esModule", {
788
- value: true
789
- });
790
-
791
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
792
-
793
- var _editor = require('./editor.controller');
794
-
795
- var _editor2 = _interopRequireDefault(_editor);
796
-
797
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
798
-
799
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
800
-
801
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
802
-
803
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
804
-
805
- var ImageController = function (_BaseController) {
806
- _inherits(ImageController, _BaseController);
807
-
808
- function ImageController($scope) {
809
- _classCallCheck(this, ImageController);
810
-
811
- var _this = _possibleConstructorReturn(this, (ImageController.__proto__ || Object.getPrototypeOf(ImageController)).call(this));
812
-
813
- _this.$scope = $scope;
814
- return _this;
815
- }
816
-
817
- _createClass(ImageController, [{
818
- key: 'selectFile',
819
- value: function selectFile() {
820
- var _this2 = this;
821
-
822
- this.fileFrame = this.fileFrame || null;
823
- if (this.fileFrame) {
824
- return this.fileFrame.open();
825
- }
826
-
827
- this.fileFrame = wp.media.frames.file_frame = wp.media({
828
- title: this.args.title_text,
829
- button: {
830
- text: this.args.button_text
831
- },
832
- multiple: false
833
- }).on('select', function () {
834
- var image = _this2.fileFrame.state().get('selection').first().toJSON();
835
- _this2.value = image.url;
836
- _this2.onUpdate({
837
- $event: {
838
- key: _this2.key,
839
- value: _this2.value
840
- }
841
- });
842
- _this2.$scope.$apply();
843
- });
844
-
845
- this.fileFrame.open();
846
- }
847
- }]);
848
-
849
- return ImageController;
850
- }(_editor2.default);
851
-
852
- ImageController.$inject = ['$scope'];
853
-
854
- exports.default = ImageController;
855
-
856
- },{"./editor.controller":21}],24:[function(require,module,exports){
857
- 'use strict';
858
-
859
- Object.defineProperty(exports, "__esModule", {
860
- value: true
861
- });
862
-
863
- var _editor = require('./editor.controller');
864
-
865
- var _editor2 = _interopRequireDefault(_editor);
866
-
867
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
868
-
869
- var EditorNumberComponent = {
870
- bindings: {
871
- args: '<',
872
- ngDisabled: '<',
873
- onUpdate: '&'
874
- },
875
- controller: _editor2.default,
876
- template: '\n <input id="{{ $ctrl.key }}" name="{{ ::$ctrl.args.key }}" ng-disabled="$ctrl.ngDisabled" number-attributes="$ctrl.args" class="small-text" type="number" ng-model="$ctrl.value" ng-change="$ctrl.change()" />'
877
- };
878
-
879
- exports.default = EditorNumberComponent;
880
-
881
- },{"./editor.controller":21}],25:[function(require,module,exports){
882
- 'use strict';
883
-
884
- Object.defineProperty(exports, "__esModule", {
885
- value: true
886
- });
887
-
888
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
889
-
890
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
891
-
892
- var NumberAttributes = function () {
893
- function NumberAttributes($parse) {
894
- _classCallCheck(this, NumberAttributes);
895
-
896
- this.$parse = $parse;
897
- this.restrict = 'A';
898
- }
899
-
900
- _createClass(NumberAttributes, [{
901
- key: 'link',
902
- value: function link($scope, $element, $attrs) {
903
- var args = this.$parse($attrs.numberAttributes)($scope);
904
- var attributes = ['step', 'min', 'max'];
905
- attributes.forEach(function (attName) {
906
- if (args[attName] !== undefined) {
907
- $element.attr(attName, args[attName]);
908
- }
909
- });
910
- }
911
- }]);
912
-
913
- return NumberAttributes;
914
- }();
915
-
916
- exports.default = NumberAttributes;
917
-
918
- },{}],26:[function(require,module,exports){
919
- 'use strict';
920
-
921
- Object.defineProperty(exports, "__esModule", {
922
- value: true
923
- });
924
-
925
- var _editorSelect = require('./editor.select.controller');
926
-
927
- var _editorSelect2 = _interopRequireDefault(_editorSelect);
928
-
929
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
930
-
931
- var EditorSelectComponent = {
932
- bindings: {
933
- args: '<',
934
- onUpdate: '&'
935
- },
936
- controller: _editorSelect2.default,
937
- template: '\n <select name="{{ ::$ctrl.key }}" ng-model="$ctrl.value" id="{{ ::$ctrl.args.key }}" ng-change="$ctrl.change()">\n <option ng-repeat="(value, name) in $ctrl.args.options" value="{{ value }}">{{ name }}</option>\n </select>'
938
- };
939
-
940
- exports.default = EditorSelectComponent;
941
-
942
- },{"./editor.select.controller":27}],27:[function(require,module,exports){
943
- 'use strict';
944
-
945
- Object.defineProperty(exports, "__esModule", {
946
- value: true
947
- });
948
-
949
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
950
-
951
- var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
952
-
953
- var _editor = require('./editor.controller');
954
-
955
- var _editor2 = _interopRequireDefault(_editor);
956
-
957
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
958
-
959
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
960
-
961
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
962
-
963
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
964
-
965
- var SelectEditorController = function (_EditorController) {
966
- _inherits(SelectEditorController, _EditorController);
967
-
968
- function SelectEditorController() {
969
- _classCallCheck(this, SelectEditorController);
970
-
971
- return _possibleConstructorReturn(this, (SelectEditorController.__proto__ || Object.getPrototypeOf(SelectEditorController)).apply(this, arguments));
972
- }
973
-
974
- _createClass(SelectEditorController, [{
975
- key: '$onChanges',
976
- value: function $onChanges(changes) {
977
- _get(SelectEditorController.prototype.__proto__ || Object.getPrototypeOf(SelectEditorController.prototype), '$onChanges', this).call(this, changes);
978
- if (changes.args) {
979
- if (this.args.value === undefined || this.args.value === null) {
980
- this.value = Object.keys(this.args.options)[0];
981
- this.change();
982
- }
983
- if (this.args.truthy) {
984
- this.value = this.value ? '1' : '0';
985
- }
986
- }
987
- }
988
- }, {
989
- key: 'change',
990
- value: function change() {
991
- this.onUpdate({
992
- $event: {
993
- key: this.key,
994
- value: this.args.truthy ? this.value === '1' : this.value
995
- }
996
- });
997
- }
998
- }]);
999
-
1000
- return SelectEditorController;
1001
- }(_editor2.default);
1002
-
1003
- SelectEditorController.$inject = [];
1004
-
1005
- exports.default = SelectEditorController;
1006
-
1007
- },{"./editor.controller":21}],28:[function(require,module,exports){
1008
- 'use strict';
1009
-
1010
- Object.defineProperty(exports, "__esModule", {
1011
- value: true
1012
- });
1013
-
1014
- var _editorSortableSelect = require('./editor.sortableSelect.controller');
1015
-
1016
- var _editorSortableSelect2 = _interopRequireDefault(_editorSortableSelect);
1017
-
1018
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1019
-
1020
- var EditorSortableSelectComponent = {
1021
- bindings: {
1022
- args: '<',
1023
- onUpdate: '&'
1024
- },
1025
- controller: _editorSortableSelect2.default,
1026
- template: '\n <input type="hidden" name="{{ ::$ctrl.args.key }}" ng-value="$ctrl.hiddenInputValue" />\n <ul class="frizzly-sortable" dnd-list="$ctrl.options">\n <li ng-repeat="item in $ctrl.options"\n dnd-draggable="item"\n dnd-moved="$ctrl.options.splice($index, 1); $ctrl.change()"\n dnd-effect-allowed="move">\n <input type="checkbox" id="{{ item.key }}" ng-model="item.selected" ng-change="$ctrl.change()" />\n <label for="{{ item.key }}">{{ item.label }}\n </li>\n </ul>\n '
1027
- };
1028
-
1029
- exports.default = EditorSortableSelectComponent;
1030
-
1031
- },{"./editor.sortableSelect.controller":29}],29:[function(require,module,exports){
1032
- "use strict";
1033
-
1034
- Object.defineProperty(exports, "__esModule", {
1035
- value: true
1036
- });
1037
-
1038
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
1039
-
1040
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
1041
-
1042
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
1043
-
1044
- var EditorController = function () {
1045
- function EditorController() {
1046
- _classCallCheck(this, EditorController);
1047
- }
1048
-
1049
- _createClass(EditorController, [{
1050
- key: "$onChanges",
1051
- value: function $onChanges(changes) {
1052
- var _this = this;
1053
-
1054
- if (changes.args) {
1055
- this.args = _extends({}, this.args);
1056
- this.key = this.args.key;
1057
- this.value = this.args.value || [];
1058
- this.hiddenInputValue = this.value;
1059
- var keysSorted = this.value.slice().concat(Object.keys(this.args.options).filter(function (key) {
1060
- return _this.value.indexOf(key) === -1;
1061
- }));
1062
- this.options = keysSorted.map(function (key) {
1063
- return { key: key, label: _this.args.options[key], selected: _this.value.indexOf(key) !== -1 };
1064
- });
1065
- }
1066
- }
1067
- }, {
1068
- key: "change",
1069
- value: function change() {
1070
- var value = this.options.reduce(function (prev, option) {
1071
- return option.selected ? prev.concat([option.key]) : prev;
1072
- }, []);
1073
- this.hiddenInputValue = value;
1074
- this.onUpdate({
1075
- $event: {
1076
- key: this.key,
1077
- value: value
1078
- }
1079
- });
1080
- }
1081
- }]);
1082
-
1083
- return EditorController;
1084
- }();
1085
-
1086
- EditorController.$inject = [];
1087
-
1088
- exports.default = EditorController;
1089
-
1090
- },{}],30:[function(require,module,exports){
1091
- 'use strict';
1092
-
1093
- Object.defineProperty(exports, "__esModule", {
1094
- value: true
1095
- });
1096
-
1097
- var _editor = require('./editor.controller');
1098
-
1099
- var _editor2 = _interopRequireDefault(_editor);
1100
-
1101
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1102
-
1103
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
1104
-
1105
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
1106
-
1107
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
1108
-
1109
- var controller = function (_BaseController) {
1110
- _inherits(controller, _BaseController);
1111
-
1112
- function controller() {
1113
- _classCallCheck(this, controller);
1114
-
1115
- var _this = _possibleConstructorReturn(this, (controller.__proto__ || Object.getPrototypeOf(controller)).call(this));
1116
-
1117
- _this.class = 'regular-text';
1118
- return _this;
1119
- }
1120
-
1121
- return controller;
1122
- }(_editor2.default);
1123
-
1124
- var EditorTextComponent = {
1125
- bindings: {
1126
- args: '<',
1127
- onUpdate: '&',
1128
- class: '@',
1129
- ngDisabled: '<'
1130
- },
1131
- controller: controller,
1132
- template: '<input type="text" placeholder="{{ $ctrl.args.placeholder || \'\' }}" name="{{ ::$ctrl.key }}" id="{{ $ctrl.key }}" ng-model="$ctrl.value" ng-change="$ctrl.change()" ng-class="$ctrl.class" ng-disabled="$ctrl.ngDisabled" />'
1133
- };
1134
-
1135
- exports.default = EditorTextComponent;
1136
-
1137
- },{"./editor.controller":21}],31:[function(require,module,exports){
1138
- 'use strict';
1139
-
1140
- Object.defineProperty(exports, "__esModule", {
1141
- value: true
1142
- });
1143
-
1144
- var _editor = require('./editor.controller');
1145
-
1146
- var _editor2 = _interopRequireDefault(_editor);
1147
-
1148
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1149
-
1150
- var EditorTextAreaComponent = {
1151
- bindings: {
1152
- args: '<',
1153
- onUpdate: '&'
1154
- },
1155
- controller: _editor2.default,
1156
- template: '<textarea rows="3" cols="50" id="{{ $ctrl.key }}" name="{{ ::$ctrl.args.key }}" class="large-text code" ng-model="$ctrl.value" ng-change="$ctrl.change()"></textarea>'
1157
- };
1158
-
1159
- exports.default = EditorTextAreaComponent;
1160
-
1161
- },{"./editor.controller":21}],32:[function(require,module,exports){
1162
- 'use strict';
1163
-
1164
- Object.defineProperty(exports, "__esModule", {
1165
- value: true
1166
- });
1167
-
1168
- var _angular = require('angular');
1169
-
1170
- var _angular2 = _interopRequireDefault(_angular);
1171
-
1172
- var _editorText = require('./editor.text.component');
1173
-
1174
- var _editorText2 = _interopRequireDefault(_editorText);
1175
-
1176
- var _editorTextarea = require('./editor.textarea.component');
1177
-
1178
- var _editorTextarea2 = _interopRequireDefault(_editorTextarea);
1179
-
1180
- var _editorImage = require('./editor.image.component');
1181
-
1182
- var _editorImage2 = _interopRequireDefault(_editorImage);
1183
-
1184
- var _editorNumber = require('./editor.number.component');
1185
-
1186
- var _editorNumber2 = _interopRequireDefault(_editorNumber);
1187
-
1188
- var _editorNumber3 = require('./editor.number.directive');
1189
-
1190
- var _editorNumber4 = _interopRequireDefault(_editorNumber3);
1191
-
1192
- var _editorCheckbox = require('./editor.checkbox.component');
1193
-
1194
- var _editorCheckbox2 = _interopRequireDefault(_editorCheckbox);
1195
-
1196
- var _editorSelect = require('./editor.select.component');
1197
-
1198
- var _editorSelect2 = _interopRequireDefault(_editorSelect);
1199
-
1200
- var _editorSortableSelect = require('./editor.sortableSelect.component');
1201
-
1202
- var _editorSortableSelect2 = _interopRequireDefault(_editorSortableSelect);
1203
-
1204
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1205
-
1206
- var editors = _angular2.default.module('editors', ['dndLists']).component('editorText', _editorText2.default).component('editorTextarea', _editorTextarea2.default).component('editorImage', _editorImage2.default).component('editorNumber', _editorNumber2.default).component('editorCheckbox', _editorCheckbox2.default).component('editorSelect', _editorSelect2.default).component('editorSortableSelect', _editorSortableSelect2.default).directive('numberAttributes', ['$parse', function ($parse) {
1207
- return new _editorNumber4.default($parse);
1208
- }]).name;
1209
-
1210
- exports.default = editors;
1211
-
1212
- },{"./editor.checkbox.component":19,"./editor.image.component":22,"./editor.number.component":24,"./editor.number.directive":25,"./editor.select.component":26,"./editor.sortableSelect.component":28,"./editor.text.component":30,"./editor.textarea.component":31,"angular":42}],33:[function(require,module,exports){
1213
- 'use strict';
1214
-
1215
- Object.defineProperty(exports, "__esModule", {
1216
- value: true
1217
- });
1218
-
1219
- var _angular = require('angular');
1220
-
1221
- var _angular2 = _interopRequireDefault(_angular);
1222
-
1223
- var _navbar = require('./navbar.component');
1224
-
1225
- var _navbar2 = _interopRequireDefault(_navbar);
1226
-
1227
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1228
-
1229
- var navbar = _angular2.default.module('navbar', []).component('navbar', _navbar2.default).name;
1230
-
1231
- exports.default = navbar;
1232
-
1233
- },{"./navbar.component":34,"angular":42}],34:[function(require,module,exports){
1234
- 'use strict';
1235
-
1236
- Object.defineProperty(exports, "__esModule", {
1237
- value: true
1238
- });
1239
- var NavbarComponent = {
1240
- bindings: {
1241
- currentTab: '<',
1242
- tabs: '<',
1243
- page: '<',
1244
- links: '<'
1245
- },
1246
- controller: function controller() {},
1247
- template: '\n <h2 class="nav-tab-wrapper">\n <a ng-repeat="tab in $ctrl.tabs" \n href="?page={{ $ctrl.page }}&tab={{ tab.slug }}" class="nav-tab {{ $ctrl.currentTab == tab.slug ? \'nav-tab-active\' : \'\' }}">\n {{ tab.name }}\n </a>\n <a ng-repeat="link in $ctrl.links" href="{{ link.url }}" target="_blank" class="nav-tab">\n {{ link.label }}\n </a>\n </h2>\n '
1248
- };
1249
-
1250
- exports.default = NavbarComponent;
1251
-
1252
- },{}],35:[function(require,module,exports){
1253
- 'use strict';
1254
-
1255
- Object.defineProperty(exports, "__esModule", {
1256
- value: true
1257
- });
1258
-
1259
- var _angular = require('angular');
1260
-
1261
- var _angular2 = _interopRequireDefault(_angular);
1262
-
1263
- var _link = require('./link.service');
1264
-
1265
- var _link2 = _interopRequireDefault(_link);
1266
-
1267
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1268
-
1269
- var services = _angular2.default.module('services', []).service('linkService', _link2.default).name;
1270
-
1271
- exports.default = services;
1272
-
1273
- },{"./link.service":36,"angular":42}],36:[function(require,module,exports){
1274
- 'use strict';
1275
-
1276
- Object.defineProperty(exports, "__esModule", {
1277
- value: true
1278
- });
1279
-
1280
- var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
1281
-
1282
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
1283
-
1284
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
1285
-
1286
- var LinkService = function () {
1287
- function LinkService() {
1288
- _classCallCheck(this, LinkService);
1289
-
1290
- this.baseLink = '';
1291
- }
1292
-
1293
- _createClass(LinkService, [{
1294
- key: 'init',
1295
- value: function init(page) {
1296
- this.baseLink = '?page=' + page;
1297
- }
1298
- }, {
1299
- key: 'generateQuery',
1300
- value: function generateQuery() {
1301
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
1302
- args[_key] = arguments[_key];
1303
- }
1304
-
1305
- return args.reduce(function (prev, _ref) {
1306
- var _ref2 = _slicedToArray(_ref, 2),
1307
- key = _ref2[0],
1308
- value = _ref2[1];
1309
-
1310
- return prev + '&' + key + '=' + value;
1311
- }, this.baseLink);
1312
- }
1313
- }]);
1314
-
1315
- return LinkService;
1316
- }();
1317
-
1318
- LinkService.$inject = [];
1319
-
1320
- exports.default = LinkService;
1321
-
1322
- },{}],37:[function(require,module,exports){
1323
- 'use strict';
1324
-
1325
- var _app = require('./app/app');
1326
-
1327
- var _app2 = _interopRequireDefault(_app);
1328
-
1329
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1330
-
1331
- },{"./app/app":3}],38:[function(require,module,exports){
1332
- angular.module('dndLists', [])
1333
-
1334
- .directive('dndDraggable', ['$parse', '$timeout', 'dndDropEffectWorkaround', 'dndDragTypeWorkaround',
1335
- function($parse, $timeout, dndDropEffectWorkaround, dndDragTypeWorkaround) {
1336
- return function(scope, element, attr) {
1337
- element.attr("draggable", "true");
1338
-
1339
- if (attr.dndDisableIf) {
1340
- scope.$watch(attr.dndDisableIf, function(disabled) {
1341
- element.attr("draggable", !disabled);
1342
- });
1343
- }
1344
-
1345
- element.on('dragstart', function(event) {
1346
- event = event.originalEvent || event;
1347
-
1348
- if (element.attr('draggable') == 'false') return true;
1349
-
1350
- event.dataTransfer.setData("Text", angular.toJson(scope.$eval(attr.dndDraggable)));
1351
-
1352
- event.dataTransfer.effectAllowed = attr.dndEffectAllowed || "move";
1353
-
1354
- element.addClass("dndDragging");
1355
- $timeout(function() { element.addClass("dndDraggingSource"); }, 0);
1356
-
1357
- dndDropEffectWorkaround.dropEffect = "none";
1358
- dndDragTypeWorkaround.isDragging = true;
1359
-
1360
- dndDragTypeWorkaround.dragType = attr.dndType ? scope.$eval(attr.dndType) : undefined;
1361
-
1362
- if (event._dndHandle && event.dataTransfer.setDragImage) {
1363
- event.dataTransfer.setDragImage(element[0], 0, 0);
1364
- }
1365
-
1366
- $parse(attr.dndDragstart)(scope, {event: event});
1367
-
1368
- event.stopPropagation();
1369
- });
1370
-
1371
- element.on('dragend', function(event) {
1372
- event = event.originalEvent || event;
1373
-
1374
- var dropEffect = dndDropEffectWorkaround.dropEffect;
1375
- scope.$apply(function() {
1376
- switch (dropEffect) {
1377
- case "move":
1378
- $parse(attr.dndMoved)(scope, {event: event});
1379
- break;
1380
- case "copy":
1381
- $parse(attr.dndCopied)(scope, {event: event});
1382
- break;
1383
- case "none":
1384
- $parse(attr.dndCanceled)(scope, {event: event});
1385
- break;
1386
- }
1387
- $parse(attr.dndDragend)(scope, {event: event, dropEffect: dropEffect});
1388
- });
1389
-
1390
- element.removeClass("dndDragging");
1391
- $timeout(function() { element.removeClass("dndDraggingSource"); }, 0);
1392
- dndDragTypeWorkaround.isDragging = false;
1393
- event.stopPropagation();
1394
- });
1395
-
1396
- element.on('click', function(event) {
1397
- if (!attr.dndSelected) return;
1398
-
1399
- event = event.originalEvent || event;
1400
- scope.$apply(function() {
1401
- $parse(attr.dndSelected)(scope, {event: event});
1402
- });
1403
-
1404
- event.stopPropagation();
1405
- });
1406
-
1407
- element.on('selectstart', function() {
1408
- if (this.dragDrop) this.dragDrop();
1409
- });
1410
- };
1411
- }])
1412
-
1413
- .directive('dndList', ['$parse', '$timeout', 'dndDropEffectWorkaround', 'dndDragTypeWorkaround',
1414
- function($parse, $timeout, dndDropEffectWorkaround, dndDragTypeWorkaround) {
1415
- return function(scope, element, attr) {
1416
- var placeholder = getPlaceholderElement();
1417
- var placeholderNode = placeholder[0];
1418
- var listNode = element[0];
1419
- placeholder.remove();
1420
-
1421
- var horizontal = attr.dndHorizontalList && scope.$eval(attr.dndHorizontalList);
1422
- var externalSources = attr.dndExternalSources && scope.$eval(attr.dndExternalSources);
1423
-
1424
- element.on('dragenter', function (event) {
1425
- event = event.originalEvent || event;
1426
- if (!isDropAllowed(event)) return true;
1427
- event.preventDefault();
1428
- });
1429
-
1430
- element.on('dragover', function(event) {
1431
- event = event.originalEvent || event;
1432
-
1433
- if (!isDropAllowed(event)) return true;
1434
-
1435
- if (placeholderNode.parentNode != listNode) {
1436
- element.append(placeholder);
1437
- }
1438
-
1439
- if (event.target !== listNode) {
1440
- var listItemNode = event.target;
1441
- while (listItemNode.parentNode !== listNode && listItemNode.parentNode) {
1442
- listItemNode = listItemNode.parentNode;
1443
- }
1444
-
1445
- if (listItemNode.parentNode === listNode && listItemNode !== placeholderNode) {
1446
- if (isMouseInFirstHalf(event, listItemNode)) {
1447
- listNode.insertBefore(placeholderNode, listItemNode);
1448
- } else {
1449
- listNode.insertBefore(placeholderNode, listItemNode.nextSibling);
1450
- }
1451
- }
1452
- } else {
1453
- if (isMouseInFirstHalf(event, placeholderNode, true)) {
1454
- while (placeholderNode.previousElementSibling
1455
- && (isMouseInFirstHalf(event, placeholderNode.previousElementSibling, true)
1456
- || placeholderNode.previousElementSibling.offsetHeight === 0)) {
1457
- listNode.insertBefore(placeholderNode, placeholderNode.previousElementSibling);
1458
- }
1459
- } else {
1460
- while (placeholderNode.nextElementSibling &&
1461
- !isMouseInFirstHalf(event, placeholderNode.nextElementSibling, true)) {
1462
- listNode.insertBefore(placeholderNode,
1463
- placeholderNode.nextElementSibling.nextElementSibling);
1464
- }
1465
- }
1466
- }
1467
-
1468
- if (attr.dndDragover && !invokeCallback(attr.dndDragover, event, getPlaceholderIndex())) {
1469
- return stopDragover();
1470
- }
1471
-
1472
- element.addClass("dndDragover");
1473
- event.preventDefault();
1474
- event.stopPropagation();
1475
- return false;
1476
- });
1477
-
1478
- element.on('drop', function(event) {
1479
- event = event.originalEvent || event;
1480
-
1481
- if (!isDropAllowed(event)) return true;
1482
-
1483
- event.preventDefault();
1484
-
1485
- var data = event.dataTransfer.getData("Text") || event.dataTransfer.getData("text/plain");
1486
- var transferredObject;
1487
- try {
1488
- transferredObject = JSON.parse(data);
1489
- } catch(e) {
1490
- return stopDragover();
1491
- }
1492
-
1493
- var index = getPlaceholderIndex();
1494
- if (attr.dndDrop) {
1495
- transferredObject = invokeCallback(attr.dndDrop, event, index, transferredObject);
1496
- if (!transferredObject) {
1497
- return stopDragover();
1498
- }
1499
- }
1500
-
1501
- if (transferredObject !== true) {
1502
- scope.$apply(function() {
1503
- scope.$eval(attr.dndList).splice(index, 0, transferredObject);
1504
- });
1505
- }
1506
- invokeCallback(attr.dndInserted, event, index, transferredObject);
1507
-
1508
- if (event.dataTransfer.dropEffect === "none") {
1509
- if (event.dataTransfer.effectAllowed === "copy" ||
1510
- event.dataTransfer.effectAllowed === "move") {
1511
- dndDropEffectWorkaround.dropEffect = event.dataTransfer.effectAllowed;
1512
- } else {
1513
- dndDropEffectWorkaround.dropEffect = event.ctrlKey ? "copy" : "move";
1514
- }
1515
- } else {
1516
- dndDropEffectWorkaround.dropEffect = event.dataTransfer.dropEffect;
1517
- }
1518
-
1519
- stopDragover();
1520
- event.stopPropagation();
1521
- return false;
1522
- });
1523
-
1524
- element.on('dragleave', function(event) {
1525
- event = event.originalEvent || event;
1526
-
1527
- element.removeClass("dndDragover");
1528
- $timeout(function() {
1529
- if (!element.hasClass("dndDragover")) {
1530
- placeholder.remove();
1531
- }
1532
- }, 100);
1533
- });
1534
-
1535
- function isMouseInFirstHalf(event, targetNode, relativeToParent) {
1536
- var mousePointer = horizontal ? (event.offsetX || event.layerX)
1537
- : (event.offsetY || event.layerY);
1538
- var targetSize = horizontal ? targetNode.offsetWidth : targetNode.offsetHeight;
1539
- var targetPosition = horizontal ? targetNode.offsetLeft : targetNode.offsetTop;
1540
- targetPosition = relativeToParent ? targetPosition : 0;
1541
- return mousePointer < targetPosition + targetSize / 2;
1542
- }
1543
-
1544
- function getPlaceholderElement() {
1545
- var placeholder;
1546
- angular.forEach(element.children(), function(childNode) {
1547
- var child = angular.element(childNode);
1548
- if (child.hasClass('dndPlaceholder')) {
1549
- placeholder = child;
1550
- }
1551
- });
1552
- return placeholder || angular.element("<li class='dndPlaceholder'></li>");
1553
- }
1554
-
1555
- function getPlaceholderIndex() {
1556
- return Array.prototype.indexOf.call(listNode.children, placeholderNode);
1557
- }
1558
-
1559
- function isDropAllowed(event) {
1560
- if (!dndDragTypeWorkaround.isDragging && !externalSources) return false;
1561
-
1562
- if (!hasTextMimetype(event.dataTransfer.types)) return false;
1563
-
1564
- if (attr.dndAllowedTypes && dndDragTypeWorkaround.isDragging) {
1565
- var allowed = scope.$eval(attr.dndAllowedTypes);
1566
- if (angular.isArray(allowed) && allowed.indexOf(dndDragTypeWorkaround.dragType) === -1) {
1567
- return false;
1568
- }
1569
- }
1570
-
1571
- if (attr.dndDisableIf && scope.$eval(attr.dndDisableIf)) return false;
1572
-
1573
- return true;
1574
- }
1575
-
1576
- function stopDragover() {
1577
- placeholder.remove();
1578
- element.removeClass("dndDragover");
1579
- return true;
1580
- }
1581
-
1582
- function invokeCallback(expression, event, index, item) {
1583
- return $parse(expression)(scope, {
1584
- event: event,
1585
- index: index,
1586
- item: item || undefined,
1587
- external: !dndDragTypeWorkaround.isDragging,
1588
- type: dndDragTypeWorkaround.isDragging ? dndDragTypeWorkaround.dragType : undefined
1589
- });
1590
- }
1591
-
1592
- function hasTextMimetype(types) {
1593
- if (!types) return true;
1594
- for (var i = 0; i < types.length; i++) {
1595
- if (types[i] === "Text" || types[i] === "text/plain") return true;
1596
- }
1597
-
1598
- return false;
1599
- }
1600
- };
1601
- }])
1602
-
1603
- .directive('dndNodrag', function() {
1604
- return function(scope, element, attr) {
1605
- element.attr("draggable", "true");
1606
-
1607
- element.on('dragstart', function(event) {
1608
- event = event.originalEvent || event;
1609
-
1610
- if (!event._dndHandle) {
1611
- if (!(event.dataTransfer.types && event.dataTransfer.types.length)) {
1612
- event.preventDefault();
1613
- }
1614
- event.stopPropagation();
1615
- }
1616
- });
1617
-
1618
- element.on('dragend', function(event) {
1619
- event = event.originalEvent || event;
1620
- if (!event._dndHandle) {
1621
- event.stopPropagation();
1622
- }
1623
- });
1624
- };
1625
- })
1626
-
1627
- .directive('dndHandle', function() {
1628
- return function(scope, element, attr) {
1629
- element.attr("draggable", "true");
1630
-
1631
- element.on('dragstart dragend', function(event) {
1632
- event = event.originalEvent || event;
1633
- event._dndHandle = true;
1634
- });
1635
- };
1636
- })
1637
-
1638
- .factory('dndDragTypeWorkaround', function(){ return {} })
1639
-
1640
- .factory('dndDropEffectWorkaround', function(){ return {} });
1641
-
1642
- },{}],39:[function(require,module,exports){
1643
- (function(window, angular) {'use strict';
1644
-
1645
-
1646
- var $sanitizeMinErr = angular.$minErr('$sanitize');
1647
- var bind;
1648
- var extend;
1649
- var forEach;
1650
- var isDefined;
1651
- var lowercase;
1652
- var noop;
1653
- var htmlParser;
1654
- var htmlSanitizeWriter;
1655
-
1656
-
1657
-
1658
-
1659
- function $SanitizeProvider() {
1660
- var svgEnabled = false;
1661
-
1662
- this.$get = ['$sanitizeUri', function($sanitizeUri) {
1663
- if (svgEnabled) {
1664
- extend(validElements, svgElements);
1665
- }
1666
- return function(html) {
1667
- var buf = [];
1668
- htmlParser(html, htmlSanitizeWriter(buf, function(uri, isImage) {
1669
- return !/^unsafe:/.test($sanitizeUri(uri, isImage));
1670
- }));
1671
- return buf.join('');
1672
- };
1673
- }];
1674
-
1675
-
1676
- this.enableSvg = function(enableSvg) {
1677
- if (isDefined(enableSvg)) {
1678
- svgEnabled = enableSvg;
1679
- return this;
1680
- } else {
1681
- return svgEnabled;
1682
- }
1683
- };
1684
-
1685
-
1686
- bind = angular.bind;
1687
- extend = angular.extend;
1688
- forEach = angular.forEach;
1689
- isDefined = angular.isDefined;
1690
- lowercase = angular.lowercase;
1691
- noop = angular.noop;
1692
-
1693
- htmlParser = htmlParserImpl;
1694
- htmlSanitizeWriter = htmlSanitizeWriterImpl;
1695
-
1696
- var SURROGATE_PAIR_REGEXP = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g,
1697
- NON_ALPHANUMERIC_REGEXP = /([^#-~ |!])/g;
1698
-
1699
-
1700
-
1701
- var voidElements = toMap('area,br,col,hr,img,wbr');
1702
-
1703
- var optionalEndTagBlockElements = toMap('colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr'),
1704
- optionalEndTagInlineElements = toMap('rp,rt'),
1705
- optionalEndTagElements = extend({},
1706
- optionalEndTagInlineElements,
1707
- optionalEndTagBlockElements);
1708
-
1709
- var blockElements = extend({}, optionalEndTagBlockElements, toMap('address,article,' +
1710
- 'aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,' +
1711
- 'h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,section,table,ul'));
1712
-
1713
- var inlineElements = extend({}, optionalEndTagInlineElements, toMap('a,abbr,acronym,b,' +
1714
- 'bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,' +
1715
- 'samp,small,span,strike,strong,sub,sup,time,tt,u,var'));
1716
-
1717
- var svgElements = toMap('circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,' +
1718
- 'hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,' +
1719
- 'radialGradient,rect,stop,svg,switch,text,title,tspan');
1720
-
1721
- var blockedElements = toMap('script,style');
1722
-
1723
- var validElements = extend({},
1724
- voidElements,
1725
- blockElements,
1726
- inlineElements,
1727
- optionalEndTagElements);
1728
-
1729
- var uriAttrs = toMap('background,cite,href,longdesc,src,xlink:href');
1730
-
1731
- var htmlAttrs = toMap('abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,' +
1732
- 'color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,' +
1733
- 'ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,' +
1734
- 'scope,scrolling,shape,size,span,start,summary,tabindex,target,title,type,' +
1735
- 'valign,value,vspace,width');
1736
-
1737
- var svgAttrs = toMap('accent-height,accumulate,additive,alphabetic,arabic-form,ascent,' +
1738
- 'baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,' +
1739
- 'cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,' +
1740
- 'font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,' +
1741
- 'height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,' +
1742
- 'marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,' +
1743
- 'max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,' +
1744
- 'path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,' +
1745
- 'requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,' +
1746
- 'stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,' +
1747
- 'stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,' +
1748
- 'stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,' +
1749
- 'underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,' +
1750
- 'width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,' +
1751
- 'xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan', true);
1752
-
1753
- var validAttrs = extend({},
1754
- uriAttrs,
1755
- svgAttrs,
1756
- htmlAttrs);
1757
-
1758
- function toMap(str, lowercaseKeys) {
1759
- var obj = {}, items = str.split(','), i;
1760
- for (i = 0; i < items.length; i++) {
1761
- obj[lowercaseKeys ? lowercase(items[i]) : items[i]] = true;
1762
- }
1763
- return obj;
1764
- }
1765
-
1766
- var inertBodyElement;
1767
- (function(window) {
1768
- var doc;
1769
- if (window.document && window.document.implementation) {
1770
- doc = window.document.implementation.createHTMLDocument('inert');
1771
- } else {
1772
- throw $sanitizeMinErr('noinert', 'Can\'t create an inert html document');
1773
- }
1774
- var docElement = doc.documentElement || doc.getDocumentElement();
1775
- var bodyElements = docElement.getElementsByTagName('body');
1776
-
1777
- if (bodyElements.length === 1) {
1778
- inertBodyElement = bodyElements[0];
1779
- } else {
1780
- var html = doc.createElement('html');
1781
- inertBodyElement = doc.createElement('body');
1782
- html.appendChild(inertBodyElement);
1783
- doc.appendChild(html);
1784
- }
1785
- })(window);
1786
-
1787
- function htmlParserImpl(html, handler) {
1788
- if (html === null || html === undefined) {
1789
- html = '';
1790
- } else if (typeof html !== 'string') {
1791
- html = '' + html;
1792
- }
1793
- inertBodyElement.innerHTML = html;
1794
-
1795
- var mXSSAttempts = 5;
1796
- do {
1797
- if (mXSSAttempts === 0) {
1798
- throw $sanitizeMinErr('uinput', 'Failed to sanitize html because the input is unstable');
1799
- }
1800
- mXSSAttempts--;
1801
-
1802
- if (window.document.documentMode) {
1803
- stripCustomNsAttrs(inertBodyElement);
1804
- }
1805
- html = inertBodyElement.innerHTML;
1806
- inertBodyElement.innerHTML = html;
1807
- } while (html !== inertBodyElement.innerHTML);
1808
-
1809
- var node = inertBodyElement.firstChild;
1810
- while (node) {
1811
- switch (node.nodeType) {
1812
- case 1:
1813
- handler.start(node.nodeName.toLowerCase(), attrToMap(node.attributes));
1814
- break;
1815
- case 3:
1816
- handler.chars(node.textContent);
1817
- break;
1818
- }
1819
-
1820
- var nextNode;
1821
- if (!(nextNode = node.firstChild)) {
1822
- if (node.nodeType === 1) {
1823
- handler.end(node.nodeName.toLowerCase());
1824
- }
1825
- nextNode = node.nextSibling;
1826
- if (!nextNode) {
1827
- while (nextNode == null) {
1828
- node = node.parentNode;
1829
- if (node === inertBodyElement) break;
1830
- nextNode = node.nextSibling;
1831
- if (node.nodeType === 1) {
1832
- handler.end(node.nodeName.toLowerCase());
1833
- }
1834
- }
1835
- }
1836
- }
1837
- node = nextNode;
1838
- }
1839
-
1840
- while ((node = inertBodyElement.firstChild)) {
1841
- inertBodyElement.removeChild(node);
1842
- }
1843
- }
1844
-
1845
- function attrToMap(attrs) {
1846
- var map = {};
1847
- for (var i = 0, ii = attrs.length; i < ii; i++) {
1848
- var attr = attrs[i];
1849
- map[attr.name] = attr.value;
1850
- }
1851
- return map;
1852
- }
1853
-
1854
-
1855
- function encodeEntities(value) {
1856
- return value.
1857
- replace(/&/g, '&amp;').
1858
- replace(SURROGATE_PAIR_REGEXP, function(value) {
1859
- var hi = value.charCodeAt(0);
1860
- var low = value.charCodeAt(1);
1861
- return '&#' + (((hi - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000) + ';';
1862
- }).
1863
- replace(NON_ALPHANUMERIC_REGEXP, function(value) {
1864
- return '&#' + value.charCodeAt(0) + ';';
1865
- }).
1866
- replace(/</g, '&lt;').
1867
- replace(/>/g, '&gt;');
1868
- }
1869
-
1870
- function htmlSanitizeWriterImpl(buf, uriValidator) {
1871
- var ignoreCurrentElement = false;
1872
- var out = bind(buf, buf.push);
1873
- return {
1874
- start: function(tag, attrs) {
1875
- tag = lowercase(tag);
1876
- if (!ignoreCurrentElement && blockedElements[tag]) {
1877
- ignoreCurrentElement = tag;
1878
- }
1879
- if (!ignoreCurrentElement && validElements[tag] === true) {
1880
- out('<');
1881
- out(tag);
1882
- forEach(attrs, function(value, key) {
1883
- var lkey = lowercase(key);
1884
- var isImage = (tag === 'img' && lkey === 'src') || (lkey === 'background');
1885
- if (validAttrs[lkey] === true &&
1886
- (uriAttrs[lkey] !== true || uriValidator(value, isImage))) {
1887
- out(' ');
1888
- out(key);
1889
- out('="');
1890
- out(encodeEntities(value));
1891
- out('"');
1892
- }
1893
- });
1894
- out('>');
1895
- }
1896
- },
1897
- end: function(tag) {
1898
- tag = lowercase(tag);
1899
- if (!ignoreCurrentElement && validElements[tag] === true && voidElements[tag] !== true) {
1900
- out('</');
1901
- out(tag);
1902
- out('>');
1903
- }
1904
- if (tag == ignoreCurrentElement) {
1905
- ignoreCurrentElement = false;
1906
- }
1907
- },
1908
- chars: function(chars) {
1909
- if (!ignoreCurrentElement) {
1910
- out(encodeEntities(chars));
1911
- }
1912
- }
1913
- };
1914
- }
1915
-
1916
-
1917
- function stripCustomNsAttrs(node) {
1918
- while (node) {
1919
- if (node.nodeType === window.Node.ELEMENT_NODE) {
1920
- var attrs = node.attributes;
1921
- for (var i = 0, l = attrs.length; i < l; i++) {
1922
- var attrNode = attrs[i];
1923
- var attrName = attrNode.name.toLowerCase();
1924
- if (attrName === 'xmlns:ns1' || attrName.lastIndexOf('ns1:', 0) === 0) {
1925
- node.removeAttributeNode(attrNode);
1926
- i--;
1927
- l--;
1928
- }
1929
- }
1930
- }
1931
-
1932
- var nextNode = node.firstChild;
1933
- if (nextNode) {
1934
- stripCustomNsAttrs(nextNode);
1935
- }
1936
-
1937
- node = node.nextSibling;
1938
- }
1939
- }
1940
- }
1941
-
1942
- function sanitizeText(chars) {
1943
- var buf = [];
1944
- var writer = htmlSanitizeWriter(buf, noop);
1945
- writer.chars(chars);
1946
- return buf.join('');
1947
- }
1948
-
1949
-
1950
- angular.module('ngSanitize', []).provider('$sanitize', $SanitizeProvider);
1951
-
1952
- angular.module('ngSanitize').filter('linky', ['$sanitize', function($sanitize) {
1953
- var LINKY_URL_REGEXP =
1954
- /((ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/i,
1955
- MAILTO_REGEXP = /^mailto:/i;
1956
-
1957
- var linkyMinErr = angular.$minErr('linky');
1958
- var isDefined = angular.isDefined;
1959
- var isFunction = angular.isFunction;
1960
- var isObject = angular.isObject;
1961
- var isString = angular.isString;
1962
-
1963
- return function(text, target, attributes) {
1964
- if (text == null || text === '') return text;
1965
- if (!isString(text)) throw linkyMinErr('notstring', 'Expected string but received: {0}', text);
1966
-
1967
- var attributesFn =
1968
- isFunction(attributes) ? attributes :
1969
- isObject(attributes) ? function getAttributesObject() {return attributes;} :
1970
- function getEmptyAttributesObject() {return {};};
1971
-
1972
- var match;
1973
- var raw = text;
1974
- var html = [];
1975
- var url;
1976
- var i;
1977
- while ((match = raw.match(LINKY_URL_REGEXP))) {
1978
- url = match[0];
1979
- if (!match[2] && !match[4]) {
1980
- url = (match[3] ? 'http://' : 'mailto:') + url;
1981
- }
1982
- i = match.index;
1983
- addText(raw.substr(0, i));
1984
- addLink(url, match[0].replace(MAILTO_REGEXP, ''));
1985
- raw = raw.substring(i + match[0].length);
1986
- }
1987
- addText(raw);
1988
- return $sanitize(html.join(''));
1989
-
1990
- function addText(text) {
1991
- if (!text) {
1992
- return;
1993
- }
1994
- html.push(sanitizeText(text));
1995
- }
1996
-
1997
- function addLink(url, text) {
1998
- var key, linkAttributes = attributesFn(url);
1999
- html.push('<a ');
2000
-
2001
- for (key in linkAttributes) {
2002
- html.push(key + '="' + linkAttributes[key] + '" ');
2003
- }
2004
-
2005
- if (isDefined(target) && !('target' in linkAttributes)) {
2006
- html.push('target="',
2007
- target,
2008
- '" ');
2009
- }
2010
- html.push('href="',
2011
- url.replace(/"/g, '&quot;'),
2012
- '">');
2013
- addText(text);
2014
- html.push('</a>');
2015
- }
2016
- };
2017
- }]);
2018
-
2019
-
2020
- })(window, window.angular);
2021
-
2022
- },{}],40:[function(require,module,exports){
2023
- require('./angular-sanitize');
2024
- module.exports = 'ngSanitize';
2025
-
2026
- },{"./angular-sanitize":39}],41:[function(require,module,exports){
2027
- (function(window) {'use strict';
2028
-
2029
-
2030
- function minErr(module, ErrorConstructor) {
2031
- ErrorConstructor = ErrorConstructor || Error;
2032
- return function() {
2033
- var SKIP_INDEXES = 2;
2034
-
2035
- var templateArgs = arguments,
2036
- code = templateArgs[0],
2037
- message = '[' + (module ? module + ':' : '') + code + '] ',
2038
- template = templateArgs[1],
2039
- paramPrefix, i;
2040
-
2041
- message += template.replace(/\{\d+\}/g, function(match) {
2042
- var index = +match.slice(1, -1),
2043
- shiftedIndex = index + SKIP_INDEXES;
2044
-
2045
- if (shiftedIndex < templateArgs.length) {
2046
- return toDebugString(templateArgs[shiftedIndex]);
2047
- }
2048
-
2049
- return match;
2050
- });
2051
-
2052
- message += '\nhttp://errors.angularjs.org/1.6.1/' +
2053
- (module ? module + '/' : '') + code;
2054
-
2055
- for (i = SKIP_INDEXES, paramPrefix = '?'; i < templateArgs.length; i++, paramPrefix = '&') {
2056
- message += paramPrefix + 'p' + (i - SKIP_INDEXES) + '=' +
2057
- encodeURIComponent(toDebugString(templateArgs[i]));
2058
- }
2059
-
2060
- return new ErrorConstructor(message);
2061
- };
2062
- }
2063
-
2064
-
2065
-
2066
-
2067
- var REGEX_STRING_REGEXP = /^\/(.+)\/([a-z]*)#x2F;;
2068
-
2069
- var VALIDITY_STATE_PROPERTY = 'validity';
2070
-
2071
-
2072
- var hasOwnProperty = Object.prototype.hasOwnProperty;
2073
-
2074
- var lowercase = function(string) {return isString(string) ? string.toLowerCase() : string;};
2075
-
2076
- var uppercase = function(string) {return isString(string) ? string.toUpperCase() : string;};
2077
-
2078
-
2079
- var manualLowercase = function(s) {
2080
- return isString(s)
2081
- ? s.replace(/[A-Z]/g, function(ch) {return String.fromCharCode(ch.charCodeAt(0) | 32);})
2082
- : s;
2083
- };
2084
- var manualUppercase = function(s) {
2085
- return isString(s)
2086
- ? s.replace(/[a-z]/g, function(ch) {return String.fromCharCode(ch.charCodeAt(0) & ~32);})
2087
- : s;
2088
- };
2089
-
2090
-
2091
- if ('i' !== 'I'.toLowerCase()) {
2092
- lowercase = manualLowercase;
2093
- uppercase = manualUppercase;
2094
- }
2095
-
2096
-
2097
- var
2098
- msie,
2099
- jqLite,
2100
- jQuery,
2101
- slice = [].slice,
2102
- splice = [].splice,
2103
- push = [].push,
2104
- toString = Object.prototype.toString,
2105
- getPrototypeOf = Object.getPrototypeOf,
2106
- ngMinErr = minErr('ng'),
2107
-
2108
- angular = window.angular || (window.angular = {}),
2109
- angularModule,
2110
- uid = 0;
2111
-
2112
- msie = window.document.documentMode;
2113
-
2114
-
2115
- function isArrayLike(obj) {
2116
-
2117
- if (obj == null || isWindow(obj)) return false;
2118
-
2119
- if (isArray(obj) || isString(obj) || (jqLite && obj instanceof jqLite)) return true;
2120
-
2121
- var length = 'length' in Object(obj) && obj.length;
2122
-
2123
- return isNumber(length) &&
2124
- (length >= 0 && ((length - 1) in obj || obj instanceof Array) || typeof obj.item === 'function');
2125
-
2126
- }
2127
-
2128
-
2129
- function forEach(obj, iterator, context) {
2130
- var key, length;
2131
- if (obj) {
2132
- if (isFunction(obj)) {
2133
- for (key in obj) {
2134
- if (key !== 'prototype' && key !== 'length' && key !== 'name' && obj.hasOwnProperty(key)) {
2135
- iterator.call(context, obj[key], key, obj);
2136
- }
2137
- }
2138
- } else if (isArray(obj) || isArrayLike(obj)) {
2139
- var isPrimitive = typeof obj !== 'object';
2140
- for (key = 0, length = obj.length; key < length; key++) {
2141
- if (isPrimitive || key in obj) {
2142
- iterator.call(context, obj[key], key, obj);
2143
- }
2144
- }
2145
- } else if (obj.forEach && obj.forEach !== forEach) {
2146
- obj.forEach(iterator, context, obj);
2147
- } else if (isBlankObject(obj)) {
2148
- for (key in obj) {
2149
- iterator.call(context, obj[key], key, obj);
2150
- }
2151
- } else if (typeof obj.hasOwnProperty === 'function') {
2152
- for (key in obj) {
2153
- if (obj.hasOwnProperty(key)) {
2154
- iterator.call(context, obj[key], key, obj);
2155
- }
2156
- }
2157
- } else {
2158
- for (key in obj) {
2159
- if (hasOwnProperty.call(obj, key)) {
2160
- iterator.call(context, obj[key], key, obj);
2161
- }
2162
- }
2163
- }
2164
- }
2165
- return obj;
2166
- }
2167
-
2168
- function forEachSorted(obj, iterator, context) {
2169
- var keys = Object.keys(obj).sort();
2170
- for (var i = 0; i < keys.length; i++) {
2171
- iterator.call(context, obj[keys[i]], keys[i]);
2172
- }
2173
- return keys;
2174
- }
2175
-
2176
-
2177
- function reverseParams(iteratorFn) {
2178
- return function(value, key) {iteratorFn(key, value);};
2179
- }
2180
-
2181
- function nextUid() {
2182
- return ++uid;
2183
- }
2184
-
2185
-
2186
- function setHashKey(obj, h) {
2187
- if (h) {
2188
- obj.$hashKey = h;
2189
- } else {
2190
- delete obj.$hashKey;
2191
- }
2192
- }
2193
-
2194
-
2195
- function baseExtend(dst, objs, deep) {
2196
- var h = dst.$hashKey;
2197
-
2198
- for (var i = 0, ii = objs.length; i < ii; ++i) {
2199
- var obj = objs[i];
2200
- if (!isObject(obj) && !isFunction(obj)) continue;
2201
- var keys = Object.keys(obj);
2202
- for (var j = 0, jj = keys.length; j < jj; j++) {
2203
- var key = keys[j];
2204
- var src = obj[key];
2205
-
2206
- if (deep && isObject(src)) {
2207
- if (isDate(src)) {
2208
- dst[key] = new Date(src.valueOf());
2209
- } else if (isRegExp(src)) {
2210
- dst[key] = new RegExp(src);
2211
- } else if (src.nodeName) {
2212
- dst[key] = src.cloneNode(true);
2213
- } else if (isElement(src)) {
2214
- dst[key] = src.clone();
2215
- } else {
2216
- if (!isObject(dst[key])) dst[key] = isArray(src) ? [] : {};
2217
- baseExtend(dst[key], [src], true);
2218
- }
2219
- } else {
2220
- dst[key] = src;
2221
- }
2222
- }
2223
- }
2224
-
2225
- setHashKey(dst, h);
2226
- return dst;
2227
- }
2228
-
2229
- function extend(dst) {
2230
- return baseExtend(dst, slice.call(arguments, 1), false);
2231
- }
2232
-
2233
-
2234
- function merge(dst) {
2235
- return baseExtend(dst, slice.call(arguments, 1), true);
2236
- }
2237
-
2238
-
2239
-
2240
- function toInt(str) {
2241
- return parseInt(str, 10);
2242
- }
2243
-
2244
- var isNumberNaN = Number.isNaN || function isNumberNaN(num) {
2245
- return num !== num;
2246
- };
2247
-
2248
-
2249
- function inherit(parent, extra) {
2250
- return extend(Object.create(parent), extra);
2251
- }
2252
-
2253
- function noop() {}
2254
- noop.$inject = [];
2255
-
2256
-
2257
- function identity($) {return $;}
2258
- identity.$inject = [];
2259
-
2260
-
2261
- function valueFn(value) {return function valueRef() {return value;};}
2262
-
2263
- function hasCustomToString(obj) {
2264
- return isFunction(obj.toString) && obj.toString !== toString;
2265
- }
2266
-
2267
-
2268
- function isUndefined(value) {return typeof value === 'undefined';}
2269
-
2270
-
2271
- function isDefined(value) {return typeof value !== 'undefined';}
2272
-
2273
-
2274
- function isObject(value) {
2275
- return value !== null && typeof value === 'object';
2276
- }
2277
-
2278
-
2279
- function isBlankObject(value) {
2280
- return value !== null && typeof value === 'object' && !getPrototypeOf(value);
2281
- }
2282
-
2283
-
2284
- function isString(value) {return typeof value === 'string';}
2285
-
2286
-
2287
- function isNumber(value) {return typeof value === 'number';}
2288
-
2289
-
2290
- function isDate(value) {
2291
- return toString.call(value) === '[object Date]';
2292
- }
2293
-
2294
-
2295
- var isArray = Array.isArray;
2296
-
2297
- function isFunction(value) {return typeof value === 'function';}
2298
-
2299
-
2300
- function isRegExp(value) {
2301
- return toString.call(value) === '[object RegExp]';
2302
- }
2303
-
2304
-
2305
- function isWindow(obj) {
2306
- return obj && obj.window === obj;
2307
- }
2308
-
2309
-
2310
- function isScope(obj) {
2311
- return obj && obj.$evalAsync && obj.$watch;
2312
- }
2313
-
2314
-
2315
- function isFile(obj) {
2316
- return toString.call(obj) === '[object File]';
2317
- }
2318
-
2319
-
2320
- function isFormData(obj) {
2321
- return toString.call(obj) === '[object FormData]';
2322
- }
2323
-
2324
-
2325
- function isBlob(obj) {
2326
- return toString.call(obj) === '[object Blob]';
2327
- }
2328
-
2329
-
2330
- function isBoolean(value) {
2331
- return typeof value === 'boolean';
2332
- }
2333
-
2334
-
2335
- function isPromiseLike(obj) {
2336
- return obj && isFunction(obj.then);
2337
- }
2338
-
2339
-
2340
- var TYPED_ARRAY_REGEXP = /^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array]#x2F;;
2341
- function isTypedArray(value) {
2342
- return value && isNumber(value.length) && TYPED_ARRAY_REGEXP.test(toString.call(value));
2343
- }
2344
-
2345
- function isArrayBuffer(obj) {
2346
- return toString.call(obj) === '[object ArrayBuffer]';
2347
- }
2348
-
2349
-
2350
- var trim = function(value) {
2351
- return isString(value) ? value.trim() : value;
2352
- };
2353
-
2354
- var escapeForRegexp = function(s) {
2355
- return s
2356
- .replace(/([-()[\]{}+?*.$^|,:#<!\\])/g, '\\$1')
2357
- .replace(/\x08/g, '\\x08');
2358
- };
2359
-
2360
-
2361
- function isElement(node) {
2362
- return !!(node &&
2363
- (node.nodeName
2364
- || (node.prop && node.attr && node.find)));
2365
- }
2366
-
2367
- function makeMap(str) {
2368
- var obj = {}, items = str.split(','), i;
2369
- for (i = 0; i < items.length; i++) {
2370
- obj[items[i]] = true;
2371
- }
2372
- return obj;
2373
- }
2374
-
2375
-
2376
- function nodeName_(element) {
2377
- return lowercase(element.nodeName || (element[0] && element[0].nodeName));
2378
- }
2379
-
2380
- function includes(array, obj) {
2381
- return Array.prototype.indexOf.call(array, obj) !== -1;
2382
- }
2383
-
2384
- function arrayRemove(array, value) {
2385
- var index = array.indexOf(value);
2386
- if (index >= 0) {
2387
- array.splice(index, 1);
2388
- }
2389
- return index;
2390
- }
2391
-
2392
- function copy(source, destination) {
2393
- var stackSource = [];
2394
- var stackDest = [];
2395
-
2396
- if (destination) {
2397
- if (isTypedArray(destination) || isArrayBuffer(destination)) {
2398
- throw ngMinErr('cpta', 'Can\'t copy! TypedArray destination cannot be mutated.');
2399
- }
2400
- if (source === destination) {
2401
- throw ngMinErr('cpi', 'Can\'t copy! Source and destination are identical.');
2402
- }
2403
-
2404
- if (isArray(destination)) {
2405
- destination.length = 0;
2406
- } else {
2407
- forEach(destination, function(value, key) {
2408
- if (key !== '$hashKey') {
2409
- delete destination[key];
2410
- }
2411
- });
2412
- }
2413
-
2414
- stackSource.push(source);
2415
- stackDest.push(destination);
2416
- return copyRecurse(source, destination);
2417
- }
2418
-
2419
- return copyElement(source);
2420
-
2421
- function copyRecurse(source, destination) {
2422
- var h = destination.$hashKey;
2423
- var key;
2424
- if (isArray(source)) {
2425
- for (var i = 0, ii = source.length; i < ii; i++) {
2426
- destination.push(copyElement(source[i]));
2427
- }
2428
- } else if (isBlankObject(source)) {
2429
- for (key in source) {
2430
- destination[key] = copyElement(source[key]);
2431
- }
2432
- } else if (source && typeof source.hasOwnProperty === 'function') {
2433
- for (key in source) {
2434
- if (source.hasOwnProperty(key)) {
2435
- destination[key] = copyElement(source[key]);
2436
- }
2437
- }
2438
- } else {
2439
- for (key in source) {
2440
- if (hasOwnProperty.call(source, key)) {
2441
- destination[key] = copyElement(source[key]);
2442
- }
2443
- }
2444
- }
2445
- setHashKey(destination, h);
2446
- return destination;
2447
- }
2448
-
2449
- function copyElement(source) {
2450
- if (!isObject(source)) {
2451
- return source;
2452
- }
2453
-
2454
- var index = stackSource.indexOf(source);
2455
- if (index !== -1) {
2456
- return stackDest[index];
2457
- }
2458
-
2459
- if (isWindow(source) || isScope(source)) {
2460
- throw ngMinErr('cpws',
2461
- 'Can\'t copy! Making copies of Window or Scope instances is not supported.');
2462
- }
2463
-
2464
- var needsRecurse = false;
2465
- var destination = copyType(source);
2466
-
2467
- if (destination === undefined) {
2468
- destination = isArray(source) ? [] : Object.create(getPrototypeOf(source));
2469
- needsRecurse = true;
2470
- }
2471
-
2472
- stackSource.push(source);
2473
- stackDest.push(destination);
2474
-
2475
- return needsRecurse
2476
- ? copyRecurse(source, destination)
2477
- : destination;
2478
- }
2479
-
2480
- function copyType(source) {
2481
- switch (toString.call(source)) {
2482
- case '[object Int8Array]':
2483
- case '[object Int16Array]':
2484
- case '[object Int32Array]':
2485
- case '[object Float32Array]':
2486
- case '[object Float64Array]':
2487
- case '[object Uint8Array]':
2488
- case '[object Uint8ClampedArray]':
2489
- case '[object Uint16Array]':
2490
- case '[object Uint32Array]':
2491
- return new source.constructor(copyElement(source.buffer), source.byteOffset, source.length);
2492
-
2493
- case '[object ArrayBuffer]':
2494
- if (!source.slice) {
2495
- var copied = new ArrayBuffer(source.byteLength);
2496
- new Uint8Array(copied).set(new Uint8Array(source));
2497
- return copied;
2498
- }
2499
- return source.slice(0);
2500
-
2501
- case '[object Boolean]':
2502
- case '[object Number]':
2503
- case '[object String]':
2504
- case '[object Date]':
2505
- return new source.constructor(source.valueOf());
2506
-
2507
- case '[object RegExp]':
2508
- var re = new RegExp(source.source, source.toString().match(/[^/]*#x2F;)[0]);
2509
- re.lastIndex = source.lastIndex;
2510
- return re;
2511
-
2512
- case '[object Blob]':
2513
- return new source.constructor([source], {type: source.type});
2514
- }
2515
-
2516
- if (isFunction(source.cloneNode)) {
2517
- return source.cloneNode(true);
2518
- }
2519
- }
2520
- }
2521
-
2522
-
2523
- function equals(o1, o2) {
2524
- if (o1 === o2) return true;
2525
- if (o1 === null || o2 === null) return false;
2526
- if (o1 !== o1 && o2 !== o2) return true;
2527
- var t1 = typeof o1, t2 = typeof o2, length, key, keySet;
2528
- if (t1 === t2 && t1 === 'object') {
2529
- if (isArray(o1)) {
2530
- if (!isArray(o2)) return false;
2531
- if ((length = o1.length) === o2.length) {
2532
- for (key = 0; key < length; key++) {
2533
- if (!equals(o1[key], o2[key])) return false;
2534
- }
2535
- return true;
2536
- }
2537
- } else if (isDate(o1)) {
2538
- if (!isDate(o2)) return false;
2539
- return equals(o1.getTime(), o2.getTime());
2540
- } else if (isRegExp(o1)) {
2541
- if (!isRegExp(o2)) return false;
2542
- return o1.toString() === o2.toString();
2543
- } else {
2544
- if (isScope(o1) || isScope(o2) || isWindow(o1) || isWindow(o2) ||
2545
- isArray(o2) || isDate(o2) || isRegExp(o2)) return false;
2546
- keySet = createMap();
2547
- for (key in o1) {
2548
- if (key.charAt(0) === '#x27; || isFunction(o1[key])) continue;
2549
- if (!equals(o1[key], o2[key])) return false;
2550
- keySet[key] = true;
2551
- }
2552
- for (key in o2) {
2553
- if (!(key in keySet) &&
2554
- key.charAt(0) !== '#x27; &&
2555
- isDefined(o2[key]) &&
2556
- !isFunction(o2[key])) return false;
2557
- }
2558
- return true;
2559
- }
2560
- }
2561
- return false;
2562
- }
2563
-
2564
- var csp = function() {
2565
- if (!isDefined(csp.rules)) {
2566
-
2567
-
2568
- var ngCspElement = (window.document.querySelector('[ng-csp]') ||
2569
- window.document.querySelector('[data-ng-csp]'));
2570
-
2571
- if (ngCspElement) {
2572
- var ngCspAttribute = ngCspElement.getAttribute('ng-csp') ||
2573
- ngCspElement.getAttribute('data-ng-csp');
2574
- csp.rules = {
2575
- noUnsafeEval: !ngCspAttribute || (ngCspAttribute.indexOf('no-unsafe-eval') !== -1),
2576
- noInlineStyle: !ngCspAttribute || (ngCspAttribute.indexOf('no-inline-style') !== -1)
2577
- };
2578
- } else {
2579
- csp.rules = {
2580
- noUnsafeEval: noUnsafeEval(),
2581
- noInlineStyle: false
2582
- };
2583
- }
2584
- }
2585
-
2586
- return csp.rules;
2587
-
2588
- function noUnsafeEval() {
2589
- try {
2590
- new Function('');
2591
- return false;
2592
- } catch (e) {
2593
- return true;
2594
- }
2595
- }
2596
- };
2597
-
2598
- var jq = function() {
2599
- if (isDefined(jq.name_)) return jq.name_;
2600
- var el;
2601
- var i, ii = ngAttrPrefixes.length, prefix, name;
2602
- for (i = 0; i < ii; ++i) {
2603
- prefix = ngAttrPrefixes[i];
2604
- el = window.document.querySelector('[' + prefix.replace(':', '\\:') + 'jq]');
2605
- if (el) {
2606
- name = el.getAttribute(prefix + 'jq');
2607
- break;
2608
- }
2609
- }
2610
-
2611
- return (jq.name_ = name);
2612
- };
2613
-
2614
- function concat(array1, array2, index) {
2615
- return array1.concat(slice.call(array2, index));
2616
- }
2617
-
2618
- function sliceArgs(args, startIndex) {
2619
- return slice.call(args, startIndex || 0);
2620
- }
2621
-
2622
-
2623
- function bind(self, fn) {
2624
- var curryArgs = arguments.length > 2 ? sliceArgs(arguments, 2) : [];
2625
- if (isFunction(fn) && !(fn instanceof RegExp)) {
2626
- return curryArgs.length
2627
- ? function() {
2628
- return arguments.length
2629
- ? fn.apply(self, concat(curryArgs, arguments, 0))
2630
- : fn.apply(self, curryArgs);
2631
- }
2632
- : function() {
2633
- return arguments.length
2634
- ? fn.apply(self, arguments)
2635
- : fn.call(self);
2636
- };
2637
- } else {
2638
- return fn;
2639
- }
2640
- }
2641
-
2642
-
2643
- function toJsonReplacer(key, value) {
2644
- var val = value;
2645
-
2646
- if (typeof key === 'string' && key.charAt(0) === '#x27; && key.charAt(1) === '#x27;) {
2647
- val = undefined;
2648
- } else if (isWindow(value)) {
2649
- val = '$WINDOW';
2650
- } else if (value && window.document === value) {
2651
- val = '$DOCUMENT';
2652
- } else if (isScope(value)) {
2653
- val = '$SCOPE';
2654
- }
2655
-
2656
- return val;
2657
- }
2658
-
2659
-
2660
- function toJson(obj, pretty) {
2661
- if (isUndefined(obj)) return undefined;
2662
- if (!isNumber(pretty)) {
2663
- pretty = pretty ? 2 : null;
2664
- }
2665
- return JSON.stringify(obj, toJsonReplacer, pretty);
2666
- }
2667
-
2668
-
2669
- function fromJson(json) {
2670
- return isString(json)
2671
- ? JSON.parse(json)
2672
- : json;
2673
- }
2674
-
2675
-
2676
- var ALL_COLONS = /:/g;
2677
- function timezoneToOffset(timezone, fallback) {
2678
- timezone = timezone.replace(ALL_COLONS, '');
2679
- var requestedTimezoneOffset = Date.parse('Jan 01, 1970 00:00:00 ' + timezone) / 60000;
2680
- return isNumberNaN(requestedTimezoneOffset) ? fallback : requestedTimezoneOffset;
2681
- }
2682
-
2683
-
2684
- function addDateMinutes(date, minutes) {
2685
- date = new Date(date.getTime());
2686
- date.setMinutes(date.getMinutes() + minutes);
2687
- return date;
2688
- }
2689
-
2690
-
2691
- function convertTimezoneToLocal(date, timezone, reverse) {
2692
- reverse = reverse ? -1 : 1;
2693
- var dateTimezoneOffset = date.getTimezoneOffset();
2694
- var timezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset);
2695
- return addDateMinutes(date, reverse * (timezoneOffset - dateTimezoneOffset));
2696
- }
2697
-
2698
-
2699
- function startingTag(element) {
2700
- element = jqLite(element).clone();
2701
- try {
2702
- element.empty();
2703
- } catch (e) { }
2704
- var elemHtml = jqLite('<div>').append(element).html();
2705
- try {
2706
- return element[0].nodeType === NODE_TYPE_TEXT ? lowercase(elemHtml) :
2707
- elemHtml.
2708
- match(/^(<[^>]+>)/)[1].
2709
- replace(/^<([\w-]+)/, function(match, nodeName) {return '<' + lowercase(nodeName);});
2710
- } catch (e) {
2711
- return lowercase(elemHtml);
2712
- }
2713
-
2714
- }
2715
-
2716
-
2717
-
2718
- function tryDecodeURIComponent(value) {
2719
- try {
2720
- return decodeURIComponent(value);
2721
- } catch (e) {
2722
- }
2723
- }
2724
-
2725
-
2726
- function parseKeyValue(keyValue) {
2727
- var obj = {};
2728
- forEach((keyValue || '').split('&'), function(keyValue) {
2729
- var splitPoint, key, val;
2730
- if (keyValue) {
2731
- key = keyValue = keyValue.replace(/\+/g,'%20');
2732
- splitPoint = keyValue.indexOf('=');
2733
- if (splitPoint !== -1) {
2734
- key = keyValue.substring(0, splitPoint);
2735
- val = keyValue.substring(splitPoint + 1);
2736
- }
2737
- key = tryDecodeURIComponent(key);
2738
- if (isDefined(key)) {
2739
- val = isDefined(val) ? tryDecodeURIComponent(val) : true;
2740
- if (!hasOwnProperty.call(obj, key)) {
2741
- obj[key] = val;
2742
- } else if (isArray(obj[key])) {
2743
- obj[key].push(val);
2744
- } else {
2745
- obj[key] = [obj[key],val];
2746
- }
2747
- }
2748
- }
2749
- });
2750
- return obj;
2751
- }
2752
-
2753
- function toKeyValue(obj) {
2754
- var parts = [];
2755
- forEach(obj, function(value, key) {
2756
- if (isArray(value)) {
2757
- forEach(value, function(arrayValue) {
2758
- parts.push(encodeUriQuery(key, true) +
2759
- (arrayValue === true ? '' : '=' + encodeUriQuery(arrayValue, true)));
2760
- });
2761
- } else {
2762
- parts.push(encodeUriQuery(key, true) +
2763
- (value === true ? '' : '=' + encodeUriQuery(value, true)));
2764
- }
2765
- });
2766
- return parts.length ? parts.join('&') : '';
2767
- }
2768
-
2769
-
2770
- function encodeUriSegment(val) {
2771
- return encodeUriQuery(val, true).
2772
- replace(/%26/gi, '&').
2773
- replace(/%3D/gi, '=').
2774
- replace(/%2B/gi, '+');
2775
- }
2776
-
2777
-
2778
- function encodeUriQuery(val, pctEncodeSpaces) {
2779
- return encodeURIComponent(val).
2780
- replace(/%40/gi, '@').
2781
- replace(/%3A/gi, ':').
2782
- replace(/%24/g, '#x27;).
2783
- replace(/%2C/gi, ',').
2784
- replace(/%3B/gi, ';').
2785
- replace(/%20/g, (pctEncodeSpaces ? '%20' : '+'));
2786
- }
2787
-
2788
- var ngAttrPrefixes = ['ng-', 'data-ng-', 'ng:', 'x-ng-'];
2789
-
2790
- function getNgAttribute(element, ngAttr) {
2791
- var attr, i, ii = ngAttrPrefixes.length;
2792
- for (i = 0; i < ii; ++i) {
2793
- attr = ngAttrPrefixes[i] + ngAttr;
2794
- if (isString(attr = element.getAttribute(attr))) {
2795
- return attr;
2796
- }
2797
- }
2798
- return null;
2799
- }
2800
-
2801
- function allowAutoBootstrap(document) {
2802
- if (!document.currentScript) {
2803
- return true;
2804
- }
2805
- var src = document.currentScript.getAttribute('src');
2806
- var link = document.createElement('a');
2807
- link.href = src;
2808
- if (document.location.origin === link.origin) {
2809
- return true;
2810
- }
2811
- switch (link.protocol) {
2812
- case 'http:':
2813
- case 'https:':
2814
- case 'ftp:':
2815
- case 'blob:':
2816
- case 'file:':
2817
- case 'data:':
2818
- return true;
2819
- default:
2820
- return false;
2821
- }
2822
- }
2823
-
2824
- var isAutoBootstrapAllowed = allowAutoBootstrap(window.document);
2825
-
2826
- function angularInit(element, bootstrap) {
2827
- var appElement,
2828
- module,
2829
- config = {};
2830
-
2831
- forEach(ngAttrPrefixes, function(prefix) {
2832
- var name = prefix + 'app';
2833
-
2834
- if (!appElement && element.hasAttribute && element.hasAttribute(name)) {
2835
- appElement = element;
2836
- module = element.getAttribute(name);
2837
- }
2838
- });
2839
- forEach(ngAttrPrefixes, function(prefix) {
2840
- var name = prefix + 'app';
2841
- var candidate;
2842
-
2843
- if (!appElement && (candidate = element.querySelector('[' + name.replace(':', '\\:') + ']'))) {
2844
- appElement = candidate;
2845
- module = candidate.getAttribute(name);
2846
- }
2847
- });
2848
- if (appElement) {
2849
- if (!isAutoBootstrapAllowed) {
2850
- window.console.error('Angular: disabling automatic bootstrap. <script> protocol indicates ' +
2851
- 'an extension, document.location.href does not match.');
2852
- return;
2853
- }
2854
- config.strictDi = getNgAttribute(appElement, 'strict-di') !== null;
2855
- bootstrap(appElement, module ? [module] : [], config);
2856
- }
2857
- }
2858
-
2859
- function bootstrap(element, modules, config) {
2860
- if (!isObject(config)) config = {};
2861
- var defaultConfig = {
2862
- strictDi: false
2863
- };
2864
- config = extend(defaultConfig, config);
2865
- var doBootstrap = function() {
2866
- element = jqLite(element);
2867
-
2868
- if (element.injector()) {
2869
- var tag = (element[0] === window.document) ? 'document' : startingTag(element);
2870
- throw ngMinErr(
2871
- 'btstrpd',
2872
- 'App already bootstrapped with this element \'{0}\'',
2873
- tag.replace(/</,'&lt;').replace(/>/,'&gt;'));
2874
- }
2875
-
2876
- modules = modules || [];
2877
- modules.unshift(['$provide', function($provide) {
2878
- $provide.value('$rootElement', element);
2879
- }]);
2880
-
2881
- if (config.debugInfoEnabled) {
2882
- modules.push(['$compileProvider', function($compileProvider) {
2883
- $compileProvider.debugInfoEnabled(true);
2884
- }]);
2885
- }
2886
-
2887
- modules.unshift('ng');
2888
- var injector = createInjector(modules, config.strictDi);
2889
- injector.invoke(['$rootScope', '$rootElement', '$compile', '$injector',
2890
- function bootstrapApply(scope, element, compile, injector) {
2891
- scope.$apply(function() {
2892
- element.data('$injector', injector);
2893
- compile(element)(scope);
2894
- });
2895
- }]
2896
- );
2897
- return injector;
2898
- };
2899
-
2900
- var NG_ENABLE_DEBUG_INFO = /^NG_ENABLE_DEBUG_INFO!/;
2901
- var NG_DEFER_BOOTSTRAP = /^NG_DEFER_BOOTSTRAP!/;
2902
-
2903
- if (window && NG_ENABLE_DEBUG_INFO.test(window.name)) {
2904
- config.debugInfoEnabled = true;
2905
- window.name = window.name.replace(NG_ENABLE_DEBUG_INFO, '');
2906
- }
2907
-
2908
- if (window && !NG_DEFER_BOOTSTRAP.test(window.name)) {
2909
- return doBootstrap();
2910
- }
2911
-
2912
- window.name = window.name.replace(NG_DEFER_BOOTSTRAP, '');
2913
- angular.resumeBootstrap = function(extraModules) {
2914
- forEach(extraModules, function(module) {
2915
- modules.push(module);
2916
- });
2917
- return doBootstrap();
2918
- };
2919
-
2920
- if (isFunction(angular.resumeDeferredBootstrap)) {
2921
- angular.resumeDeferredBootstrap();
2922
- }
2923
- }
2924
-
2925
- function reloadWithDebugInfo() {
2926
- window.name = 'NG_ENABLE_DEBUG_INFO!' + window.name;
2927
- window.location.reload();
2928
- }
2929
-
2930
- function getTestability(rootElement) {
2931
- var injector = angular.element(rootElement).injector();
2932
- if (!injector) {
2933
- throw ngMinErr('test',
2934
- 'no injector found for element argument to getTestability');
2935
- }
2936
- return injector.get('$testability');
2937
- }
2938
-
2939
- var SNAKE_CASE_REGEXP = /[A-Z]/g;
2940
- function snake_case(name, separator) {
2941
- separator = separator || '_';
2942
- return name.replace(SNAKE_CASE_REGEXP, function(letter, pos) {
2943
- return (pos ? separator : '') + letter.toLowerCase();
2944
- });
2945
- }
2946
-
2947
- var bindJQueryFired = false;
2948
- function bindJQuery() {
2949
- var originalCleanData;
2950
-
2951
- if (bindJQueryFired) {
2952
- return;
2953
- }
2954
-
2955
- var jqName = jq();
2956
- jQuery = isUndefined(jqName) ? window.jQuery :
2957
- !jqName ? undefined :
2958
- window[jqName];
2959
-
2960
- if (jQuery && jQuery.fn.on) {
2961
- jqLite = jQuery;
2962
- extend(jQuery.fn, {
2963
- scope: JQLitePrototype.scope,
2964
- isolateScope: JQLitePrototype.isolateScope,
2965
- controller: JQLitePrototype.controller,
2966
- injector: JQLitePrototype.injector,
2967
- inheritedData: JQLitePrototype.inheritedData
2968
- });
2969
-
2970
- originalCleanData = jQuery.cleanData;
2971
- jQuery.cleanData = function(elems) {
2972
- var events;
2973
- for (var i = 0, elem; (elem = elems[i]) != null; i++) {
2974
- events = jQuery._data(elem, 'events');
2975
- if (events && events.$destroy) {
2976
- jQuery(elem).triggerHandler('$destroy');
2977
- }
2978
- }
2979
- originalCleanData(elems);
2980
- };
2981
- } else {
2982
- jqLite = JQLite;
2983
- }
2984
-
2985
- angular.element = jqLite;
2986
-
2987
- bindJQueryFired = true;
2988
- }
2989
-
2990
- function assertArg(arg, name, reason) {
2991
- if (!arg) {
2992
- throw ngMinErr('areq', 'Argument \'{0}\' is {1}', (name || '?'), (reason || 'required'));
2993
- }
2994
- return arg;
2995
- }
2996