appscms-tools-theme 3.0.4 → 3.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (164) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.txt +21 -21
  3. data/README.md +50 -50
  4. data/_data/about/en/about.json +16 -16
  5. data/_data/blog/alertbar.yml +3 -3
  6. data/_data/blog/authors.yml +11 -11
  7. data/_data/blog/blog.yml +4 -4
  8. data/_data/blog/nav.json +13 -13
  9. data/_data/blog/share.yml +28 -28
  10. data/_data/calculators/en/biology-calc/bulb-spacing.json +78 -78
  11. data/_data/calculators/en/biology-calc/cat-chocolate-toxicity.json +52 -52
  12. data/_data/calculators/en/chemistry-calc/activation-energy.json +44 -44
  13. data/_data/calculators/en/finance-calc/401k.json +122 -122
  14. data/_data/contact/en/contact.json +38 -38
  15. data/_data/disclaimer/en/disclaimer.json +37 -37
  16. data/_data/download/en/download.json +35 -35
  17. data/_data/feature/en/3_shop_posters.json +351 -351
  18. data/_data/feature/en/allele-frequency.json +246 -246
  19. data/_data/feature/en/batch-conversion.json +77 -77
  20. data/_data/feature/en/compress-pdf.json +202 -202
  21. data/_data/feature/en/face-detection.json +52 -52
  22. data/_data/feature/en/split-pdf.json +115 -115
  23. data/_data/feature/en/theframe.json +56 -56
  24. data/_data/feature/hi/compress-pdf.json +81 -81
  25. data/_data/feature/tr/compress-pdf.json +80 -80
  26. data/_data/filecomparison/en/filecomparison.json +38 -38
  27. data/_data/fileinfo/en/fileinfo.json +15 -15
  28. data/_data/footer/en/data.json +166 -166
  29. data/_data/footer/hi/data.json +68 -68
  30. data/_data/footer/networksites.json +15 -15
  31. data/_data/header/en/data.json +173 -173
  32. data/_data/header/hi/data.json +144 -144
  33. data/_data/home/en/en.json +285 -285
  34. data/_data/home/en/photoeffects.json +22 -22
  35. data/_data/home/en/posters.json +323 -323
  36. data/_data/home/hi/hi.json +86 -86
  37. data/_data/home-1/en/en.json +229 -229
  38. data/_data/languagesupport/compress-pdf-langs.json +11 -11
  39. data/_data/languagesupport/index-langs.json +13 -13
  40. data/_data/photo-categories.json +104 -104
  41. data/_data/photoeffects.json +31 -31
  42. data/_data/privacy/en/privacyPolicy.json +265 -265
  43. data/_data/termAndCondition/en/termAndCondition.json +358 -358
  44. data/_includes/Rating/rating.html +92 -92
  45. data/_includes/Rating/structureddata.html +53 -53
  46. data/_includes/Usp/usp.html +95 -95
  47. data/_includes/adblocker.html +240 -240
  48. data/_includes/adsense/adsense.html +7 -7
  49. data/_includes/alternates/alternates.html +45 -45
  50. data/_includes/author_bio.html +16 -16
  51. data/_includes/authors/authors.html +67 -67
  52. data/_includes/batch-conversion.html +65 -65
  53. data/_includes/bookmark.html +5 -5
  54. data/_includes/cssfile/links.html +11 -11
  55. data/_includes/custom-head.html +136 -136
  56. data/_includes/customblog/recentposts.html +67 -67
  57. data/_includes/customblog/relatedposts.html +203 -203
  58. data/_includes/disqus_comments.html +10 -10
  59. data/_includes/dropdown/langdropdown.html +22 -22
  60. data/_includes/feature.html +56 -56
  61. data/_includes/fileformat/Tabularcompariosn.html +158 -158
  62. data/_includes/fileformat/comparisonfiles.html +151 -151
  63. data/_includes/fileformat/fileformatdetail.html +101 -101
  64. data/_includes/fileformat/fileinfoformat.html +93 -93
  65. data/_includes/footer/index.html +538 -538
  66. data/_includes/google-analytics.html +22 -22
  67. data/_includes/head/index.html +235 -235
  68. data/_includes/header/blogHeader.html +34 -34
  69. data/_includes/header/index.html +188 -188
  70. data/_includes/languages/languages.html +60 -60
  71. data/_includes/monumetric/ads.html +57 -57
  72. data/_includes/monumetric/monumetric.html +57 -57
  73. data/_includes/monumetric/profitablecpmgate.html +51 -51
  74. data/_includes/nofiletransfer/nofiletransfer.html +38 -38
  75. data/_includes/paginationBlogPage.html +71 -71
  76. data/_includes/paginationPostPage.html +14 -14
  77. data/_includes/postauthorbio.html +17 -17
  78. data/_includes/postbox.html +31 -31
  79. data/_includes/script.html +508 -508
  80. data/_includes/section/alertbar.html +11 -11
  81. data/_includes/section/count.html +36 -36
  82. data/_includes/section/recent_posts.html +65 -65
  83. data/_includes/section/related_categories_post.html +198 -198
  84. data/_includes/share/socialshare.html +20 -20
  85. data/_includes/staticfooter.html +69 -69
  86. data/_layouts/aboutUs.html +34 -34
  87. data/_layouts/audio.html +33 -33
  88. data/_layouts/batch.html +98 -98
  89. data/_layouts/blog-1.html +83 -83
  90. data/_layouts/blog.html +94 -94
  91. data/_layouts/calculator.html +89 -89
  92. data/_layouts/categories.html +33 -33
  93. data/_layouts/contactUs.html +124 -124
  94. data/_layouts/default.html +1 -1
  95. data/_layouts/disclaimer.html +123 -123
  96. data/_layouts/download.html +299 -299
  97. data/_layouts/feature-1.html +322 -322
  98. data/_layouts/feature-download.html +308 -308
  99. data/_layouts/feature.html +256 -256
  100. data/_layouts/featureResultPage.html +65 -65
  101. data/_layouts/fileInfo.html +39 -39
  102. data/_layouts/filecomparison.html +85 -85
  103. data/_layouts/frame.html +222 -222
  104. data/_layouts/help.html +23 -23
  105. data/_layouts/home-1.html +229 -229
  106. data/_layouts/home.html +265 -265
  107. data/_layouts/homeResultPage.html +31 -31
  108. data/_layouts/imagekit.html +125 -125
  109. data/_layouts/page.html +5 -5
  110. data/_layouts/photo-effects-home.html +5 -5
  111. data/_layouts/post.html +177 -177
  112. data/_layouts/privacyPolicy.html +637 -637
  113. data/_layouts/termAndCondition.html +646 -646
  114. data/_layouts/video.html +33 -33
  115. data/assets/cross.svg +4 -4
  116. data/assets/css/adblocker.css +187 -187
  117. data/assets/css/batch.css +437 -437
  118. data/assets/css/blog-1.css +65 -65
  119. data/assets/css/blog.css +491 -491
  120. data/assets/css/bootstrap.min.css +6 -6
  121. data/assets/css/calculators.css +47 -47
  122. data/assets/css/common.css +550 -550
  123. data/assets/css/feature-1.css +290 -290
  124. data/assets/css/filecomparison.css +25 -25
  125. data/assets/css/frame.css +780 -780
  126. data/assets/css/home-1.css +187 -187
  127. data/assets/css/imagekit.css +840 -840
  128. data/assets/css/tools.css +1546 -1328
  129. data/assets/facebook.svg +4 -4
  130. data/assets/images/abp.svg +41 -41
  131. data/assets/images/adblock.svg +266 -266
  132. data/assets/images/addimg.svg +2 -2
  133. data/assets/images/convert.svg +8 -8
  134. data/assets/images/safevideoconverter.svg +23 -23
  135. data/assets/images/uo.svg +41 -41
  136. data/assets/images/vectorpaint.svg +5 -5
  137. data/assets/instagram.svg +4 -4
  138. data/assets/js/TopScroll.js +8 -8
  139. data/assets/js/adBlocker.js +68 -68
  140. data/assets/js/ads.js +8 -8
  141. data/assets/js/append-div.js +10 -10
  142. data/assets/js/batch.js +229 -229
  143. data/assets/js/calculator-tooltip.js +3 -3
  144. data/assets/js/face-api.js +38064 -38064
  145. data/assets/js/face-detection.js +303 -303
  146. data/assets/js/featureResult.js +48 -48
  147. data/assets/js/frame.js +263 -263
  148. data/assets/js/googledrive.js +155 -155
  149. data/assets/js/homeResult.js +36 -36
  150. data/assets/js/manifest.json +16 -16
  151. data/assets/js/multiselect.js +157 -157
  152. data/assets/js/perspective.min.js +182 -182
  153. data/assets/js/photo-effects.json +84 -84
  154. data/assets/js/redirectResult.js +9 -9
  155. data/assets/js/testing-batch.js +39 -39
  156. data/assets/js/theme.js +44 -44
  157. data/assets/linkdin.svg +4 -4
  158. data/assets/noserverupload.svg +4 -4
  159. data/assets/pdf.svg +20 -20
  160. data/assets/secure.svg +43 -43
  161. data/assets/star.svg +4 -4
  162. data/assets/twitter.svg +4 -4
  163. data/assets/youtube.svg +4 -4
  164. metadata +7 -7
@@ -1,158 +1,158 @@
1
- ---
2
- ---
3
-
4
- const addScripts=()=>{
5
- const scripts=document.getElementsByTagName('script')
6
- const check= Array.from(scripts).find(item=>item.src==='https://www.dropbox.com/static/api/2/dropins.js')
7
- if(!check){
8
- const dropboxscript = document.createElement('script')
9
- dropboxscript.src = 'https://www.dropbox.com/static/api/2/dropins.js'
10
- dropboxscript.dataset.appKey = '{{site.dropboxapikey}}'
11
- dropboxscript.id='dropboxjs'
12
- dropboxscript.crossOrigin = 'anonymous'
13
- document.head.append(dropboxscript)
14
- }
15
- const checkgooglescript= Array.from(scripts).find(item=>item.src==='https://apis.google.com/js/api.js')
16
- if(!checkgooglescript){
17
- const googlescript = document.createElement('script')
18
- googlescript.src = 'https://apis.google.com/js/api.js'
19
- googlescript.crossOrigin = 'anonymous'
20
- document.head.append(googlescript)
21
- }
22
- }
23
- const developerKey = '{{site.developerKey}}'
24
- const clientId ='{{site.clientId}}'
25
- const appId = '{{site.appId}}'
26
- const scope = [
27
- 'https://www.googleapis.com/auth/drive.file',
28
- 'https://www.googleapis.com/auth/drive.appdata',
29
- ]
30
- let pickerApiLoaded = false
31
- let oauthToken
32
- const loadPicker = () => {
33
- gapi.load('auth', { callback: onAuthApiLoad })
34
- gapi.load('picker', { callback: onPickerApiLoad })
35
- }
36
- const onAuthApiLoad = () => {
37
- window.gapi.auth.authorize(
38
- {
39
- client_id: clientId,
40
- scope: scope,
41
- immediate: false,
42
- },
43
- handleAuthResult
44
- )
45
- }
46
- let onPickerApiLoad = () => {
47
- pickerApiLoaded = true
48
- createPicker()
49
- }
50
- const handleAuthResult = (authResult) => {
51
- if (authResult && !authResult.error) {
52
- oauthToken = authResult.access_token
53
- createPicker()
54
- }
55
- }
56
- const createPicker = () => {
57
- if (pickerApiLoaded && oauthToken) {
58
- const view = new google.picker.View(google.picker.ViewId.DOCS)
59
- view.setMimeTypes(mimeTypes)
60
- const picker = new google.picker.PickerBuilder()
61
- .enableFeature(google.picker.Feature.NAV_HIDDEN)
62
- .enableFeature(google.picker.Feature.MULTISELECT_ENABLED)
63
- .setAppId(appId)
64
- .setOAuthToken(oauthToken)
65
- .addView(view)
66
- .addView(new google.picker.DocsUploadView())
67
- .setDeveloperKey(developerKey)
68
- .setCallback(pickerCallback)
69
- .build()
70
- picker.setVisible(true)
71
- }
72
- }
73
- const pickerCallback = async (data) => {
74
- if (data.action == google.picker.Action.PICKED) {
75
- showLoader()
76
- var filesArray=data.docs.map(async(i)=>{
77
- const res= await fetch(`https://www.googleapis.com/drive/v3/files/${i.id}?alt=media`,{
78
- headers: {
79
- 'Authorization': `Bearer ${oauthToken}` }
80
- }).then(res=>res.blob())
81
- let metadata = {
82
- type: i.mimeType
83
- }
84
- const file = new File([res], i.name, metadata);
85
- return file
86
- })
87
- closeLoader()
88
- getFile(filesArray)
89
- }
90
- }
91
- function chooseFromDropbox() {
92
- Dropbox.choose({
93
- success: async (files) => {
94
- if (files.length < 0) {
95
- return
96
- }
97
- var dropboxArray=files.map(async(file)=>{
98
- showLoader()
99
- const url = new URL(file.link)
100
- const response = await fetch(url).then((res) => res.blob())
101
- let metadata = {
102
- type: response.type,
103
- }
104
- let newFile = new File([response], file.name, metadata)
105
- return newFile
106
- })
107
-
108
- closeLoader()
109
- getDropBoxFile(dropboxArray)
110
- },
111
- cancel: function () {},
112
- linkType: 'direct',
113
- multiselect: true,
114
- extensions: [...filemimes],
115
- folderselect: false,
116
- })
117
- }
118
-
119
- const fileupload=(file)=>{
120
- gapi.load('auth', {'callback': onAuthLoad});
121
- }
122
- const onAuthLoad=()=> {
123
- window.gapi.auth.authorize(
124
- {
125
- 'client_id': clientId,
126
- 'scope': scope,
127
- 'immediate': false
128
- },
129
- handleAuth);
130
- }
131
- const handleAuth=(authResult)=> {
132
- if (authResult && !authResult.error) {
133
- showuploadloading()
134
- var formData = new FormData();
135
- const fileToUpload = file
136
- var metadata = {
137
- name: fileToUpload.name,
138
- mimeType: fileToUpload.type
139
- };
140
- formData.append( "metadata", new Blob( [JSON.stringify( metadata )], {type: "application/json"} ));
141
- formData.append( "file", fileToUpload );
142
- fetch( "https://www.googleapis.com/upload/drive/v3/files?uploadType=multipart", {
143
- method: "POST",
144
- headers: new Headers({ "Authorization": "Bearer " + gapi.auth.getToken().access_token }),
145
- body: formData
146
- }).then( function( response ){
147
- stopuploadloading()
148
- return response.json();
149
-
150
- }).then( function( value ){
151
- stopuploadloading()
152
- showmessage()
153
- });
154
- }
155
- }
156
-
157
-
1
+ ---
2
+ ---
3
+
4
+ const addScripts=()=>{
5
+ const scripts=document.getElementsByTagName('script')
6
+ const check= Array.from(scripts).find(item=>item.src==='https://www.dropbox.com/static/api/2/dropins.js')
7
+ if(!check){
8
+ const dropboxscript = document.createElement('script')
9
+ dropboxscript.src = 'https://www.dropbox.com/static/api/2/dropins.js'
10
+ dropboxscript.dataset.appKey = '{{site.dropboxapikey}}'
11
+ dropboxscript.id='dropboxjs'
12
+ dropboxscript.crossOrigin = 'anonymous'
13
+ document.head.append(dropboxscript)
14
+ }
15
+ const checkgooglescript= Array.from(scripts).find(item=>item.src==='https://apis.google.com/js/api.js')
16
+ if(!checkgooglescript){
17
+ const googlescript = document.createElement('script')
18
+ googlescript.src = 'https://apis.google.com/js/api.js'
19
+ googlescript.crossOrigin = 'anonymous'
20
+ document.head.append(googlescript)
21
+ }
22
+ }
23
+ const developerKey = '{{site.developerKey}}'
24
+ const clientId ='{{site.clientId}}'
25
+ const appId = '{{site.appId}}'
26
+ const scope = [
27
+ 'https://www.googleapis.com/auth/drive.file',
28
+ 'https://www.googleapis.com/auth/drive.appdata',
29
+ ]
30
+ let pickerApiLoaded = false
31
+ let oauthToken
32
+ const loadPicker = () => {
33
+ gapi.load('auth', { callback: onAuthApiLoad })
34
+ gapi.load('picker', { callback: onPickerApiLoad })
35
+ }
36
+ const onAuthApiLoad = () => {
37
+ window.gapi.auth.authorize(
38
+ {
39
+ client_id: clientId,
40
+ scope: scope,
41
+ immediate: false,
42
+ },
43
+ handleAuthResult
44
+ )
45
+ }
46
+ let onPickerApiLoad = () => {
47
+ pickerApiLoaded = true
48
+ createPicker()
49
+ }
50
+ const handleAuthResult = (authResult) => {
51
+ if (authResult && !authResult.error) {
52
+ oauthToken = authResult.access_token
53
+ createPicker()
54
+ }
55
+ }
56
+ const createPicker = () => {
57
+ if (pickerApiLoaded && oauthToken) {
58
+ const view = new google.picker.View(google.picker.ViewId.DOCS)
59
+ view.setMimeTypes(mimeTypes)
60
+ const picker = new google.picker.PickerBuilder()
61
+ .enableFeature(google.picker.Feature.NAV_HIDDEN)
62
+ .enableFeature(google.picker.Feature.MULTISELECT_ENABLED)
63
+ .setAppId(appId)
64
+ .setOAuthToken(oauthToken)
65
+ .addView(view)
66
+ .addView(new google.picker.DocsUploadView())
67
+ .setDeveloperKey(developerKey)
68
+ .setCallback(pickerCallback)
69
+ .build()
70
+ picker.setVisible(true)
71
+ }
72
+ }
73
+ const pickerCallback = async (data) => {
74
+ if (data.action == google.picker.Action.PICKED) {
75
+ showLoader()
76
+ var filesArray=data.docs.map(async(i)=>{
77
+ const res= await fetch(`https://www.googleapis.com/drive/v3/files/${i.id}?alt=media`,{
78
+ headers: {
79
+ 'Authorization': `Bearer ${oauthToken}` }
80
+ }).then(res=>res.blob())
81
+ let metadata = {
82
+ type: i.mimeType
83
+ }
84
+ const file = new File([res], i.name, metadata);
85
+ return file
86
+ })
87
+ closeLoader()
88
+ getFile(filesArray)
89
+ }
90
+ }
91
+ function chooseFromDropbox() {
92
+ Dropbox.choose({
93
+ success: async (files) => {
94
+ if (files.length < 0) {
95
+ return
96
+ }
97
+ var dropboxArray=files.map(async(file)=>{
98
+ showLoader()
99
+ const url = new URL(file.link)
100
+ const response = await fetch(url).then((res) => res.blob())
101
+ let metadata = {
102
+ type: response.type,
103
+ }
104
+ let newFile = new File([response], file.name, metadata)
105
+ return newFile
106
+ })
107
+
108
+ closeLoader()
109
+ getDropBoxFile(dropboxArray)
110
+ },
111
+ cancel: function () {},
112
+ linkType: 'direct',
113
+ multiselect: true,
114
+ extensions: [...filemimes],
115
+ folderselect: false,
116
+ })
117
+ }
118
+
119
+ const fileupload=(file)=>{
120
+ gapi.load('auth', {'callback': onAuthLoad});
121
+ }
122
+ const onAuthLoad=()=> {
123
+ window.gapi.auth.authorize(
124
+ {
125
+ 'client_id': clientId,
126
+ 'scope': scope,
127
+ 'immediate': false
128
+ },
129
+ handleAuth);
130
+ }
131
+ const handleAuth=(authResult)=> {
132
+ if (authResult && !authResult.error) {
133
+ showuploadloading()
134
+ var formData = new FormData();
135
+ const fileToUpload = file
136
+ var metadata = {
137
+ name: fileToUpload.name,
138
+ mimeType: fileToUpload.type
139
+ };
140
+ formData.append( "metadata", new Blob( [JSON.stringify( metadata )], {type: "application/json"} ));
141
+ formData.append( "file", fileToUpload );
142
+ fetch( "https://www.googleapis.com/upload/drive/v3/files?uploadType=multipart", {
143
+ method: "POST",
144
+ headers: new Headers({ "Authorization": "Bearer " + gapi.auth.getToken().access_token }),
145
+ body: formData
146
+ }).then( function( response ){
147
+ stopuploadloading()
148
+ return response.json();
149
+
150
+ }).then( function( value ){
151
+ stopuploadloading()
152
+ showmessage()
153
+ });
154
+ }
155
+ }
156
+
157
+
158
158
 
@@ -1,182 +1,182 @@
1
- !(function (t) {
2
- 'object' == typeof exports && 'undefined' != typeof module
3
- ? (module.exports = t())
4
- : 'function' == typeof define && define.amd
5
- ? define([], t)
6
- : (('undefined' != typeof window
7
- ? window
8
- : 'undefined' != typeof global
9
- ? global
10
- : 'undefined' != typeof self
11
- ? self
12
- : this
13
- ).Perspective = t())
14
- })(function () {
15
- return (function o(n, r, i) {
16
- function s(e, t) {
17
- if (!r[e]) {
18
- if (!n[e]) {
19
- var a = 'function' == typeof require && require
20
- if (!t && a) return a(e, !0)
21
- if (c) return c(e, !0)
22
- throw (
23
- (((a = new Error("Cannot find module '" + e + "'")).code =
24
- 'MODULE_NOT_FOUND'),
25
- a)
26
- )
27
- }
28
- ;(a = r[e] = { exports: {} }),
29
- n[e][0].call(
30
- a.exports,
31
- function (t) {
32
- return s(n[e][1][t] || t)
33
- },
34
- a,
35
- a.exports,
36
- o,
37
- n,
38
- r,
39
- i
40
- )
41
- }
42
- return r[e].exports
43
- }
44
- for (
45
- var c = 'function' == typeof require && require, t = 0;
46
- t < i.length;
47
- t++
48
- )
49
- s(i[t])
50
- return s
51
- })(
52
- {
53
- 1: [
54
- function (t, e, a) {
55
- var o = window.html5jp || {}
56
- !(function () {
57
- o.perspective = function (t, e) {
58
- var a, o
59
- t &&
60
- t.strokeStyle &&
61
- e &&
62
- e.width &&
63
- e.height &&
64
- (((a = document.createElement('canvas')).width = parseInt(
65
- e.width
66
- )),
67
- (a.height = parseInt(e.height)),
68
- (o = a.getContext('2d')).drawImage(e, 0, 0, a.width, a.height),
69
- ((e = document.createElement('canvas')).width = t.canvas.width),
70
- (e.height = t.canvas.height),
71
- (e = e.getContext('2d')),
72
- (this.p = { ctxd: t, cvso: a, ctxo: o, ctxt: e }))
73
- }
74
- var t = o.perspective.prototype
75
- ;(t.draw = function (t) {
76
- for (
77
- var e = t[0][0],
78
- a = t[0][1],
79
- o = t[1][0],
80
- n = t[1][1],
81
- r = t[2][0],
82
- i = t[2][1],
83
- s = t[3][0],
84
- c = t[3][1],
85
- h = [
86
- Math.sqrt(Math.pow(e - o, 2) + Math.pow(a - n, 2)),
87
- Math.sqrt(Math.pow(o - r, 2) + Math.pow(n - i, 2)),
88
- Math.sqrt(Math.pow(r - s, 2) + Math.pow(i - c, 2)),
89
- Math.sqrt(Math.pow(s - e, 2) + Math.pow(c - a, 2)),
90
- ],
91
- p = this.p.cvso.width,
92
- f = this.p.cvso.height,
93
- d = 0,
94
- v = 0,
95
- w = 0,
96
- l = 0;
97
- l < 4;
98
- l++
99
- ) {
100
- var u = 0
101
- v < (u = l % 2 ? h[l] / p : h[l] / f) && ((d = l), (v = u)),
102
- 0 == h[l] && w++
103
- }
104
- if (!(1 < w)) {
105
- var g,
106
- m = this.p.ctxo,
107
- x = this.p.ctxt
108
- if (
109
- (x.clearRect(0, 0, x.canvas.width, x.canvas.height),
110
- d % 2 == 0)
111
- ) {
112
- ;(g = this.create_canvas_context(
113
- p,
114
- 10
115
- )).globalCompositeOperation = 'copy'
116
- for (var M = g.canvas, y = 0; y < f; y += 2) {
117
- var q = e + (s - e) * (O = y / f),
118
- _ = a + (c - a) * O,
119
- C = o + (r - o) * O,
120
- I = n + (i - n) * O,
121
- T = Math.atan((I - _) / (C - q)),
122
- b = Math.sqrt(Math.pow(C - q, 2) + Math.pow(I - _, 2)) / p
123
- g.setTransform(1, 0, 0, 1, 0, -y),
124
- g.drawImage(m.canvas, 0, 0),
125
- x.translate(q, _),
126
- x.rotate(T),
127
- x.scale(b, b),
128
- x.drawImage(M, 0, 0),
129
- x.setTransform(1, 0, 0, 1, 0, 0)
130
- }
131
- } else if (d % 2 == 1) {
132
- ;(g = this.create_canvas_context(
133
- 10,
134
- f
135
- )).globalCompositeOperation = 'copy'
136
- for (var M = g.canvas, E = 0; E < p; E += 2) {
137
- var O,
138
- q = e + (o - e) * (O = E / p),
139
- _ = a + (n - a) * O,
140
- C = s + (r - s) * O,
141
- I = c + (i - c) * O,
142
- T = Math.atan((q - C) / (I - _)),
143
- b = Math.sqrt(Math.pow(C - q, 2) + Math.pow(I - _, 2)) / f
144
- g.setTransform(1, 0, 0, 1, -E, 0),
145
- g.drawImage(m.canvas, 0, 0),
146
- x.translate(q, _),
147
- x.rotate(T),
148
- x.scale(b, b),
149
- x.drawImage(M, 0, 0),
150
- x.setTransform(1, 0, 0, 1, 0, 0)
151
- }
152
- }
153
- this.p.ctxd.save(),
154
- this._applyClipPath(this.p.ctxd, [
155
- [e, a],
156
- [o, n],
157
- [r, i],
158
- [s, c],
159
- ]),
160
- this.p.ctxd.drawImage(x.canvas, 0, 0),
161
- this.p.ctxd.restore()
162
- }
163
- }),
164
- (t.create_canvas_context = function (t, e) {
165
- var a = document.createElement('canvas')
166
- return (a.width = t), (a.height = e), a.getContext('2d')
167
- }),
168
- (t._applyClipPath = function (t, e) {
169
- t.beginPath(), t.moveTo(e[0][0], e[0][1])
170
- for (var a = 1; a < e.length; a++) t.lineTo(e[a][0], e[a][1])
171
- t.closePath(), t.clip()
172
- })
173
- })(),
174
- (e.exports = o.perspective)
175
- },
176
- {},
177
- ],
178
- },
179
- {},
180
- [1]
181
- )(1)
182
- })
1
+ !(function (t) {
2
+ 'object' == typeof exports && 'undefined' != typeof module
3
+ ? (module.exports = t())
4
+ : 'function' == typeof define && define.amd
5
+ ? define([], t)
6
+ : (('undefined' != typeof window
7
+ ? window
8
+ : 'undefined' != typeof global
9
+ ? global
10
+ : 'undefined' != typeof self
11
+ ? self
12
+ : this
13
+ ).Perspective = t())
14
+ })(function () {
15
+ return (function o(n, r, i) {
16
+ function s(e, t) {
17
+ if (!r[e]) {
18
+ if (!n[e]) {
19
+ var a = 'function' == typeof require && require
20
+ if (!t && a) return a(e, !0)
21
+ if (c) return c(e, !0)
22
+ throw (
23
+ (((a = new Error("Cannot find module '" + e + "'")).code =
24
+ 'MODULE_NOT_FOUND'),
25
+ a)
26
+ )
27
+ }
28
+ ;(a = r[e] = { exports: {} }),
29
+ n[e][0].call(
30
+ a.exports,
31
+ function (t) {
32
+ return s(n[e][1][t] || t)
33
+ },
34
+ a,
35
+ a.exports,
36
+ o,
37
+ n,
38
+ r,
39
+ i
40
+ )
41
+ }
42
+ return r[e].exports
43
+ }
44
+ for (
45
+ var c = 'function' == typeof require && require, t = 0;
46
+ t < i.length;
47
+ t++
48
+ )
49
+ s(i[t])
50
+ return s
51
+ })(
52
+ {
53
+ 1: [
54
+ function (t, e, a) {
55
+ var o = window.html5jp || {}
56
+ !(function () {
57
+ o.perspective = function (t, e) {
58
+ var a, o
59
+ t &&
60
+ t.strokeStyle &&
61
+ e &&
62
+ e.width &&
63
+ e.height &&
64
+ (((a = document.createElement('canvas')).width = parseInt(
65
+ e.width
66
+ )),
67
+ (a.height = parseInt(e.height)),
68
+ (o = a.getContext('2d')).drawImage(e, 0, 0, a.width, a.height),
69
+ ((e = document.createElement('canvas')).width = t.canvas.width),
70
+ (e.height = t.canvas.height),
71
+ (e = e.getContext('2d')),
72
+ (this.p = { ctxd: t, cvso: a, ctxo: o, ctxt: e }))
73
+ }
74
+ var t = o.perspective.prototype
75
+ ;(t.draw = function (t) {
76
+ for (
77
+ var e = t[0][0],
78
+ a = t[0][1],
79
+ o = t[1][0],
80
+ n = t[1][1],
81
+ r = t[2][0],
82
+ i = t[2][1],
83
+ s = t[3][0],
84
+ c = t[3][1],
85
+ h = [
86
+ Math.sqrt(Math.pow(e - o, 2) + Math.pow(a - n, 2)),
87
+ Math.sqrt(Math.pow(o - r, 2) + Math.pow(n - i, 2)),
88
+ Math.sqrt(Math.pow(r - s, 2) + Math.pow(i - c, 2)),
89
+ Math.sqrt(Math.pow(s - e, 2) + Math.pow(c - a, 2)),
90
+ ],
91
+ p = this.p.cvso.width,
92
+ f = this.p.cvso.height,
93
+ d = 0,
94
+ v = 0,
95
+ w = 0,
96
+ l = 0;
97
+ l < 4;
98
+ l++
99
+ ) {
100
+ var u = 0
101
+ v < (u = l % 2 ? h[l] / p : h[l] / f) && ((d = l), (v = u)),
102
+ 0 == h[l] && w++
103
+ }
104
+ if (!(1 < w)) {
105
+ var g,
106
+ m = this.p.ctxo,
107
+ x = this.p.ctxt
108
+ if (
109
+ (x.clearRect(0, 0, x.canvas.width, x.canvas.height),
110
+ d % 2 == 0)
111
+ ) {
112
+ ;(g = this.create_canvas_context(
113
+ p,
114
+ 10
115
+ )).globalCompositeOperation = 'copy'
116
+ for (var M = g.canvas, y = 0; y < f; y += 2) {
117
+ var q = e + (s - e) * (O = y / f),
118
+ _ = a + (c - a) * O,
119
+ C = o + (r - o) * O,
120
+ I = n + (i - n) * O,
121
+ T = Math.atan((I - _) / (C - q)),
122
+ b = Math.sqrt(Math.pow(C - q, 2) + Math.pow(I - _, 2)) / p
123
+ g.setTransform(1, 0, 0, 1, 0, -y),
124
+ g.drawImage(m.canvas, 0, 0),
125
+ x.translate(q, _),
126
+ x.rotate(T),
127
+ x.scale(b, b),
128
+ x.drawImage(M, 0, 0),
129
+ x.setTransform(1, 0, 0, 1, 0, 0)
130
+ }
131
+ } else if (d % 2 == 1) {
132
+ ;(g = this.create_canvas_context(
133
+ 10,
134
+ f
135
+ )).globalCompositeOperation = 'copy'
136
+ for (var M = g.canvas, E = 0; E < p; E += 2) {
137
+ var O,
138
+ q = e + (o - e) * (O = E / p),
139
+ _ = a + (n - a) * O,
140
+ C = s + (r - s) * O,
141
+ I = c + (i - c) * O,
142
+ T = Math.atan((q - C) / (I - _)),
143
+ b = Math.sqrt(Math.pow(C - q, 2) + Math.pow(I - _, 2)) / f
144
+ g.setTransform(1, 0, 0, 1, -E, 0),
145
+ g.drawImage(m.canvas, 0, 0),
146
+ x.translate(q, _),
147
+ x.rotate(T),
148
+ x.scale(b, b),
149
+ x.drawImage(M, 0, 0),
150
+ x.setTransform(1, 0, 0, 1, 0, 0)
151
+ }
152
+ }
153
+ this.p.ctxd.save(),
154
+ this._applyClipPath(this.p.ctxd, [
155
+ [e, a],
156
+ [o, n],
157
+ [r, i],
158
+ [s, c],
159
+ ]),
160
+ this.p.ctxd.drawImage(x.canvas, 0, 0),
161
+ this.p.ctxd.restore()
162
+ }
163
+ }),
164
+ (t.create_canvas_context = function (t, e) {
165
+ var a = document.createElement('canvas')
166
+ return (a.width = t), (a.height = e), a.getContext('2d')
167
+ }),
168
+ (t._applyClipPath = function (t, e) {
169
+ t.beginPath(), t.moveTo(e[0][0], e[0][1])
170
+ for (var a = 1; a < e.length; a++) t.lineTo(e[a][0], e[a][1])
171
+ t.closePath(), t.clip()
172
+ })
173
+ })(),
174
+ (e.exports = o.perspective)
175
+ },
176
+ {},
177
+ ],
178
+ },
179
+ {},
180
+ [1]
181
+ )(1)
182
+ })